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

@@ -5,6 +5,9 @@ rm.ghosting.enabled=true
rm.notification.role=RecordsManager
# NOTE: the notification subject can now be set within the usual I18N property files per notification template
# Automatic addition of DOD record meta-data
rm.dodRecords=true
#
# Turn off imap server attachments if we are using RM.
# TODO : Longer term needs to have a query based, dynamic

View File

@@ -37,6 +37,7 @@
<!-- Model behaviour -->
<bean id="dod.dod5015RecordAspect" class="org.alfresco.module.org_alfresco_module_rm.dod5015.model.dod.aspect.DOD5015RecordAspect" parent="rm.baseBehaviour">
<property name="addDODRecordAspect" value="${rm.dodRecords}"/>
</bean>
</beans>

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