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:
@@ -5,6 +5,9 @@ rm.ghosting.enabled=true
|
|||||||
rm.notification.role=RecordsManager
|
rm.notification.role=RecordsManager
|
||||||
# NOTE: the notification subject can now be set within the usual I18N property files per notification template
|
# 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.
|
# Turn off imap server attachments if we are using RM.
|
||||||
# TODO : Longer term needs to have a query based, dynamic
|
# TODO : Longer term needs to have a query based, dynamic
|
||||||
|
@@ -37,6 +37,7 @@
|
|||||||
|
|
||||||
<!-- Model behaviour -->
|
<!-- Model behaviour -->
|
||||||
<bean id="dod.dod5015RecordAspect" class="org.alfresco.module.org_alfresco_module_rm.dod5015.model.dod.aspect.DOD5015RecordAspect" parent="rm.baseBehaviour">
|
<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>
|
</bean>
|
||||||
|
|
||||||
</beans>
|
</beans>
|
@@ -39,6 +39,17 @@ public class DOD5015RecordAspect extends BaseBehaviourBean
|
|||||||
implements NodeServicePolicies.OnAddAspectPolicy,
|
implements NodeServicePolicies.OnAddAspectPolicy,
|
||||||
DOD5015Model
|
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.
|
* 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)
|
public void onAddAspect(NodeRef nodeRef, QName aspect)
|
||||||
{
|
{
|
||||||
if (nodeService.exists(nodeRef) == true &&
|
if (nodeService.exists(nodeRef) == true &&
|
||||||
|
addDODRecordAspect == true &&
|
||||||
nodeService.hasAspect(nodeRef, ASPECT_DOD_5015_RECORD) == false)
|
nodeService.hasAspect(nodeRef, ASPECT_DOD_5015_RECORD) == false)
|
||||||
{
|
{
|
||||||
nodeService.addAspect(nodeRef, ASPECT_DOD_5015_RECORD, null);
|
nodeService.addAspect(nodeRef, ASPECT_DOD_5015_RECORD, null);
|
||||||
|
Reference in New Issue
Block a user