diff --git a/pom.xml b/pom.xml
index a559433f19..918749d210 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
org.alfresco
alfresco-governance-services
pom
- 3.5.0-SNAPSHOT
+ 3.5.1-SNAPSHOT
Alfresco Governance Services
http://www.alfresco.org/
diff --git a/rm-automation/pom.xml b/rm-automation/pom.xml
index 5eee570158..20e84fc407 100644
--- a/rm-automation/pom.xml
+++ b/rm-automation/pom.xml
@@ -8,7 +8,7 @@
org.alfresco
alfresco-governance-services
- 3.5.0-SNAPSHOT
+ 3.5.1-SNAPSHOT
diff --git a/rm-automation/rm-automation-community-rest-api/pom.xml b/rm-automation/rm-automation-community-rest-api/pom.xml
index b559c7682d..2606b83732 100644
--- a/rm-automation/rm-automation-community-rest-api/pom.xml
+++ b/rm-automation/rm-automation-community-rest-api/pom.xml
@@ -8,7 +8,7 @@
org.alfresco
alfresco-governance-services-automation
- 3.5.0-SNAPSHOT
+ 3.5.1-SNAPSHOT
diff --git a/rm-community/pom.xml b/rm-community/pom.xml
index 3e065f78e6..e116557e08 100644
--- a/rm-community/pom.xml
+++ b/rm-community/pom.xml
@@ -8,7 +8,7 @@
org.alfresco
alfresco-governance-services
- 3.5.0-SNAPSHOT
+ 3.5.1-SNAPSHOT
diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/patch/rm-patch-v35-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/patch/rm-patch-v35-context.xml
index cc54b588ad..6159adab5f 100644
--- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/patch/rm-patch-v35-context.xml
+++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/patch/rm-patch-v35-context.xml
@@ -5,16 +5,17 @@
http://www.springframework.org/schema/beans/spring-beans.xsd">
-
-
-
-
+
+
+
+
-
\ No newline at end of file
+
diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-service-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-service-context.xml
index 29b5a0e785..3d46d6a87a 100644
--- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-service-context.xml
+++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-service-context.xml
@@ -806,6 +806,7 @@
+
rma:recordCategory
diff --git a/rm-community/rm-community-repo/pom.xml b/rm-community/rm-community-repo/pom.xml
index f942056ed3..814394242f 100644
--- a/rm-community/rm-community-repo/pom.xml
+++ b/rm-community/rm-community-repo/pom.xml
@@ -9,7 +9,7 @@
org.alfresco
alfresco-governance-services-community
- 3.5.0-SNAPSHOT
+ 3.5.1-SNAPSHOT
diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/admin/RecordsManagementAdminServiceImpl.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/admin/RecordsManagementAdminServiceImpl.java
index 9cd8e0c096..6fce532585 100644
--- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/admin/RecordsManagementAdminServiceImpl.java
+++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/admin/RecordsManagementAdminServiceImpl.java
@@ -53,6 +53,8 @@ import org.alfresco.repo.dictionary.M2Aspect;
import org.alfresco.repo.dictionary.M2Constraint;
import org.alfresco.repo.dictionary.M2Model;
import org.alfresco.repo.dictionary.M2Property;
+import org.alfresco.repo.lock.JobLockService;
+import org.alfresco.repo.lock.LockAcquisitionException;
import org.alfresco.repo.node.NodeServicePolicies;
import org.alfresco.repo.policy.Behaviour.NotificationFrequency;
import org.alfresco.repo.policy.annotation.Behaviour;
@@ -71,10 +73,14 @@ import org.alfresco.service.cmr.dictionary.TypeDefinition;
import org.alfresco.service.cmr.repository.AssociationRef;
import org.alfresco.service.cmr.repository.ChildAssociationRef;
import org.alfresco.service.cmr.repository.NodeRef;
+import org.alfresco.service.namespace.NamespaceService;
import org.alfresco.service.namespace.QName;
import org.alfresco.service.namespace.RegexQNamePattern;
import org.alfresco.service.transaction.TransactionService;
import org.alfresco.util.GUID;
+import org.alfresco.util.LockCallback;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.core.Ordered;
@@ -96,6 +102,9 @@ public class RecordsManagementAdminServiceImpl extends RecordsManagementAdminBas
ApplicationListener,
Ordered
{
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(RecordsManagementAdminServiceImpl.class);
+
/** I18N messages*/
private static final String MSG_SERVICE_NOT_INIT = "rm.admin.service-not-init";
private static final String MSG_PROP_EXIST = "rm.admin.prop-exist";
@@ -108,17 +117,23 @@ public class RecordsManagementAdminServiceImpl extends RecordsManagementAdminBas
/** Constants */
private static final String CUSTOM_CONSTRAINT_TYPE = org.alfresco.module.org_alfresco_module_rm.caveat.RMListOfValuesConstraint.class.getName();
- private static final String CAPATIBILITY_CUSTOM_CONTRAINT_TYPE = org.alfresco.module.org_alfresco_module_dod5015.caveat.RMListOfValuesConstraint.class.getName();
+ private static final String CAPABILITY_CUSTOM_CONSTRAINT_TYPE = org.alfresco.module.org_alfresco_module_dod5015.caveat.RMListOfValuesConstraint.class.getName();
private static final String PARAM_ALLOWED_VALUES = "allowedValues";
private static final String PARAM_CASE_SENSITIVE = "caseSensitive";
private static final String PARAM_MATCH_LOGIC = "matchLogic";
+ private static final QName LOCK_QNAME = QName.createQName(NamespaceService.SYSTEM_MODEL_1_0_URI, "RecordsManagementAdminServiceImpl");
+ private static final long DEFAULT_TIME = 30000L;
+
/** Relationship service */
private RelationshipService relationshipService;
/** Transaction service */
private TransactionService transactionService;
+ /** Job Lock service */
+ private JobLockService jobLockService;
+
/** List of types that can be customisable */
private List pendingCustomisableTypes;
private Map customisableTypes;
@@ -152,7 +167,15 @@ public class RecordsManagementAdminServiceImpl extends RecordsManagementAdminBas
return this.relationshipService;
}
- /**
+ /**
+ * @param jobLockService The Job Lock service
+ */
+ public void setJobLockService(JobLockService jobLockService)
+ {
+ this.jobLockService = jobLockService;
+ }
+
+ /**
* Indicate that this application content listener must be executed with the lowest
* precedence. (ie last)
*
@@ -172,30 +195,63 @@ public class RecordsManagementAdminServiceImpl extends RecordsManagementAdminBas
@Override
public void onApplicationEvent(ContextRefreshedEvent event)
{
- if(!isCustomMapInit && getDictionaryService().getAllModels().contains(RM_CUSTOM_MODEL))
- {
- // run as System on bootstrap
- AuthenticationUtil.runAs(new RunAsWork