mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-08 14:51:49 +00:00
RM-1116: Add global DOD enabled configuration
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@59991 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -39,6 +39,17 @@ public class DOD5015RecordAspect extends BaseBehaviourBean
|
||||
implements NodeServicePolicies.OnAddAspectPolicy,
|
||||
DOD5015Model
|
||||
{
|
||||
/** indicates whether the DOD record aspect should be added or not */
|
||||
private boolean addDODRecordAspect = true;
|
||||
|
||||
/**
|
||||
* @param addDODRecordAspect true if add aspect, false otherwise
|
||||
*/
|
||||
public void setAddDODRecordAspect(boolean addDODRecordAspect)
|
||||
{
|
||||
this.addDODRecordAspect = addDODRecordAspect;
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensure that the DOD record aspect meta-data is applied.
|
||||
*
|
||||
@@ -54,6 +65,7 @@ public class DOD5015RecordAspect extends BaseBehaviourBean
|
||||
public void onAddAspect(NodeRef nodeRef, QName aspect)
|
||||
{
|
||||
if (nodeService.exists(nodeRef) == true &&
|
||||
addDODRecordAspect == true &&
|
||||
nodeService.hasAspect(nodeRef, ASPECT_DOD_5015_RECORD) == false)
|
||||
{
|
||||
nodeService.addAspect(nodeRef, ASPECT_DOD_5015_RECORD, null);
|
||||
|
Reference in New Issue
Block a user