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:
Roy Wetherall
2014-01-16 09:07:02 +00:00
parent 21cc1e28b6
commit e0a707be4e
3 changed files with 16 additions and 0 deletions

View File

@@ -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);