diff --git a/rm-server/config/alfresco/module/org_alfresco_module_rm/rm-ui-evaluators-context.xml b/rm-server/config/alfresco/module/org_alfresco_module_rm/rm-ui-evaluators-context.xml
index e7cf19c2dd..9892172cee 100644
--- a/rm-server/config/alfresco/module/org_alfresco_module_rm/rm-ui-evaluators-context.xml
+++ b/rm-server/config/alfresco/module/org_alfresco_module_rm/rm-ui-evaluators-context.xml
@@ -341,6 +341,7 @@
FILE_PLAN
+ RECORD
RECORD_CATEGORY
RECORD_FOLDER
UNFILED_RECORD_CONTAINER
@@ -758,7 +759,7 @@
-
+
diff --git a/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/fileplan/FilePlanServiceImpl.java b/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/fileplan/FilePlanServiceImpl.java
index 80514a902f..89fed24298 100644
--- a/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/fileplan/FilePlanServiceImpl.java
+++ b/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/fileplan/FilePlanServiceImpl.java
@@ -57,12 +57,12 @@ import org.springframework.extensions.surf.util.I18NUtil;
/**
* File plan service implementation.
- *
+ *
* @author Roy Wetherall
* @since 2.1
*/
public class FilePlanServiceImpl extends ServiceBaseImpl
- implements FilePlanService,
+ implements FilePlanService,
RecordsManagementModel
{
/** I18N */
@@ -74,61 +74,61 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
private final static String MSG_CONTAINER_PARENT_TYPE= "rm.service.container-parent-type";
private final static String MSG_CONTAINER_TYPE = "rm.service.container-type";
private final static String MSG_CONTAINER_EXPECTED = "rm.service.container-expected";
-
+
/** File plan containers */
private static final String NAME_UNFILED_CONTAINER = "Unfiled Records";
private static final String NAME_HOLD_CONTAINER = "Holds";
private static final String NAME_TRANSFER_CONTAINER = "Transfers";
-
+
/** RM site file plan container */
private static final String FILE_PLAN_CONTAINER = "documentLibrary";
-
+
/** root container cache */
private SimpleCache, NodeRef> rootContainerCache;
-
+
/**
- * NOTE: for some reason spring couldn't cope with the circular references between these two
+ * NOTE: for some reason spring couldn't cope with the circular references between these two
* beans so we need to grab this one manually.
- *
+ *
* @return file plan role service
*/
protected FilePlanRoleService getFilePlanRoleService()
{
- return (FilePlanRoleService)applicationContext.getBean("FilePlanRoleService");
+ return (FilePlanRoleService)applicationContext.getBean("FilePlanRoleService");
}
-
+
/**
* @return permission service
*/
protected PermissionService getPermissionService()
{
- return (PermissionService)applicationContext.getBean("permissionService");
+ return (PermissionService)applicationContext.getBean("permissionService");
}
-
+
/**
* @return node DAO
*/
protected NodeDAO getNodeDAO()
{
- return (NodeDAO)applicationContext.getBean("nodeDAO");
+ return (NodeDAO)applicationContext.getBean("nodeDAO");
}
-
+
/**
* @return internal node service
*/
protected NodeService getInternalNodeService()
{
- return (NodeService)applicationContext.getBean("nodeService");
+ return (NodeService)applicationContext.getBean("nodeService");
}
-
+
/**
* @return site service
*/
protected SiteService getSiteService()
{
- return (SiteService)applicationContext.getBean("SiteService");
+ return (SiteService)applicationContext.getBean("SiteService");
}
-
+
/**
* @return record service
*/
@@ -136,7 +136,7 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
{
return (RecordService)applicationContext.getBean("RecordService");
}
-
+
/**
* @return record folder service
*/
@@ -144,7 +144,7 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
{
return (RecordFolderService)applicationContext.getBean("RecordFolderService");
}
-
+
/**
* @return freeze service
*/
@@ -152,7 +152,7 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
{
return (FreezeService)applicationContext.getBean("FreezeService");
}
-
+
/**
* @return records management service
*/
@@ -160,7 +160,7 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
{
return (RecordsManagementService)applicationContext.getBean("RecordsManagementService");
}
-
+
/**
* @see org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService#getFilePlans()
*/
@@ -169,15 +169,15 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
{
return getFilePlans(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE);
}
-
+
/**
* @param rootContainerCache root container cache
*/
- public void setRootContainerCache(SimpleCache, NodeRef> rootContainerCache)
+ public void setRootContainerCache(SimpleCache, NodeRef> rootContainerCache)
{
this.rootContainerCache = rootContainerCache;
}
-
+
/**
* @see org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService#getFilePlans(org.alfresco.service.cmr.repository.StoreRef)
*/
@@ -185,35 +185,35 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
public Set getFilePlans(final StoreRef storeRef)
{
ParameterCheck.mandatory("storeRef", storeRef);
-
+
final Set results = new HashSet();
Set aspects = new HashSet(1);
aspects.add(ASPECT_RECORDS_MANAGEMENT_ROOT);
getNodeDAO().getNodesWithAspects(aspects, Long.MIN_VALUE, Long.MAX_VALUE, new NodeDAO.NodeRefQueryCallback()
- {
+ {
@Override
public boolean handle(Pair nodePair)
{
NodeRef nodeRef = nodePair.getSecond();
if (storeRef.equals(nodeRef.getStoreRef()) == true)
- {
+ {
results.add(nodeRef);
}
-
+
return true;
}
});
return results;
}
-
+
/**
* @see org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService#getFilePlanBySiteId(java.lang.String)
*/
@Override
public NodeRef getFilePlanBySiteId(String siteId)
{
- NodeRef filePlan = null;
-
+ NodeRef filePlan = null;
+
SiteInfo siteInfo = getSiteService().getSite(siteId);
if (siteInfo != null)
{
@@ -226,10 +226,10 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
}
}
}
-
+
return filePlan;
}
-
+
/**
* @see org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService#existsUnfiledContainer(org.alfresco.service.cmr.repository.NodeRef)
*/
@@ -237,8 +237,8 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
public boolean existsUnfiledContainer(NodeRef filePlan)
{
return (getUnfiledContainer(filePlan) != null);
- }
-
+ }
+
/**
* @see org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService#getUnfiledContainer(org.alfresco.service.cmr.repository.NodeRef)
*/
@@ -247,7 +247,7 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
{
return getFilePlanRootContainer(filePlan, NAME_UNFILED_CONTAINER);
}
-
+
/**
* @see org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService#getHoldContainer(org.alfresco.service.cmr.repository.NodeRef)
*/
@@ -256,7 +256,7 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
{
return getFilePlanRootContainer(filePlan, NAME_HOLD_CONTAINER);
}
-
+
/**
* @see org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService#getTransferContainer(org.alfresco.service.cmr.repository.NodeRef)
*/
@@ -265,10 +265,10 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
{
return getFilePlanRootContainer(filePlan, NAME_TRANSFER_CONTAINER);
}
-
+
/**
* Get the file root container for the given type.
- *
+ *
* @param filePlan file plan
* @param containerName container type
* @return {@link NodeRef} file plan container
@@ -283,7 +283,7 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
NodeRef result = null;
Pair key = new Pair(filePlan, containerName);
-
+
if (!rootContainerCache.contains(key))
{
// try and get the unfiled record container
@@ -302,18 +302,18 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
{
result = rootContainerCache.get(key);
}
-
+
return result;
}
-
+
/**
* @see org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService#createUnfiledContainer(org.alfresco.service.cmr.repository.NodeRef)
*/
public NodeRef createUnfiledContainer(NodeRef filePlan)
- {
+ {
return createFilePlanRootContainer(filePlan, TYPE_UNFILED_RECORD_CONTAINER, NAME_UNFILED_CONTAINER);
}
-
+
/**
* @see org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService#createHoldContainer(org.alfresco.service.cmr.repository.NodeRef)
*/
@@ -322,7 +322,7 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
{
return createFilePlanRootContainer(filePlan, TYPE_HOLD_CONTAINER, NAME_HOLD_CONTAINER);
}
-
+
/**
* @see org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService#createTransferContainer(org.alfresco.service.cmr.repository.NodeRef)
*/
@@ -331,9 +331,9 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
{
return createFilePlanRootContainer(filePlan, TYPE_TRANSFER_CONTAINER, NAME_TRANSFER_CONTAINER);
}
-
+
/**
- *
+ *
* @param filePlan
* @param containerType
* @param containerName
@@ -347,9 +347,9 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
{
throw new AlfrescoRuntimeException("Unable to create file plan root container, because passed node is not a file plan.");
}
-
+
String allRoles = getFilePlanRoleService().getAllRolesContainerGroup(filePlan);
-
+
// create the properties map
Map properties = new HashMap(1);
properties.put(ContentModel.PROP_NAME, containerName);
@@ -362,7 +362,7 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
containerType,
properties).getChildRef();
-
+
// if (inheritPermissions == false)
// {
// set inheritance to false
@@ -370,8 +370,7 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
getPermissionService().setPermission(container, allRoles, RMPermissionModel.READ_RECORDS, true);
getPermissionService().setPermission(container, ExtendedReaderDynamicAuthority.EXTENDED_READER, RMPermissionModel.READ_RECORDS, true);
getPermissionService().setPermission(container, ExtendedWriterDynamicAuthority.EXTENDED_WRITER, RMPermissionModel.FILING, true);
- getPermissionService().setPermission(container, "Administrator", RMPermissionModel.FILING, true);
-
+
// TODO set the admin users to have filing permissions on the unfiled container!!!
// TODO we will need to be able to get a list of the admin roles from the service
// }
@@ -384,7 +383,7 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
return container;
}
-
+
/**
* @see org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService#createFilePlan(org.alfresco.service.cmr.repository.NodeRef, java.lang.String, org.alfresco.service.namespace.QName, java.util.Map)
*/
@@ -393,21 +392,21 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
ParameterCheck.mandatory("parent", parent);
ParameterCheck.mandatory("name", name);
ParameterCheck.mandatory("type", type);
-
+
// Check the parent is not already an RM component node
// ie: you can't create a rm root in an existing rm hierarchy
if (isFilePlanComponent(parent) == true)
{
throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_DUP_ROOT));
}
-
+
// Check that the passed type is a sub-type of rma:filePlan
if (TYPE_FILE_PLAN.equals(type) == false &&
dictionaryService.isSubClass(type, TYPE_FILE_PLAN) == false)
{
throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_ROOT_TYPE, type.toString()));
}
-
+
// Build map of properties
Map rmRootProps = new HashMap(1);
if (properties != null && properties.size() != 0)
@@ -415,7 +414,7 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
rmRootProps.putAll(properties);
}
rmRootProps.put(ContentModel.PROP_NAME, name);
-
+
// Create the root
ChildAssociationRef assocRef = nodeService.createNode(
parent,
@@ -423,12 +422,12 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, name),
type,
rmRootProps);
-
+
// TODO do we need to create role and security groups or is this done automatically?
-
+
return assocRef.getChildRef();
}
-
+
/**
* @see org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService#createFilePlan(org.alfresco.service.cmr.repository.NodeRef, java.lang.String, java.util.Map)
*/
@@ -436,7 +435,7 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
{
return createFilePlan(parent, name, TYPE_FILE_PLAN, properties);
}
-
+
/**
* @see org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService#createFilePlan(org.alfresco.service.cmr.repository.NodeRef, java.lang.String)
*/
@@ -444,7 +443,7 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
{
return createFilePlan(parent, name, TYPE_FILE_PLAN, null);
}
-
+
/**
* @see org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService#createFilePlan(org.alfresco.service.cmr.repository.NodeRef, java.lang.String, org.alfresco.service.namespace.QName)
*/
@@ -453,7 +452,7 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
{
return createFilePlan(parent, name, type, null);
}
-
+
/**
* @see org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService#getNodeRefPath(org.alfresco.service.cmr.repository.NodeRef)
*/
@@ -470,7 +469,7 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
}
return nodeRefPath;
}
-
+
/**
* Helper method to build a NodeRef path from the node to the RM root
*/
@@ -500,7 +499,7 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
getNodeRefPathRecursive(nodeRef, nodeRefPath);
}
}
-
+
/**
* @see org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService#createRecordCategory(org.alfresco.service.cmr.repository.NodeRef, java.lang.String, org.alfresco.service.namespace.QName, java.util.Map)
*/
@@ -509,7 +508,7 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
ParameterCheck.mandatory("parent", parent);
ParameterCheck.mandatory("name", name);
ParameterCheck.mandatory("type", type);
-
+
// Check that the parent is a container
QName parentType = nodeService.getType(parent);
if (TYPE_RECORDS_MANAGEMENT_CONTAINER.equals(parentType) == false &&
@@ -517,14 +516,14 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
{
throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_CONTAINER_PARENT_TYPE, parentType.toString()));
}
-
+
// Check that the the provided type is a sub-type of rm:recordCategory
if (TYPE_RECORD_CATEGORY.equals(type) == false &&
dictionaryService.isSubClass(type, TYPE_RECORD_CATEGORY) == false)
{
throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_CONTAINER_TYPE, type.toString()));
}
-
+
// Set the properties for the record category
Map props = new HashMap(1);
if (properties != null && properties.size() != 0)
@@ -532,7 +531,7 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
props.putAll(properties);
}
props.put(ContentModel.PROP_NAME, name);
-
+
return nodeService.createNode(
parent,
ContentModel.ASSOC_CONTAINS,
@@ -540,7 +539,7 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
type,
props).getChildRef();
}
-
+
/**
* @see org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService#createRecordCategory(org.alfresco.service.cmr.repository.NodeRef, java.lang.String)
*/
@@ -548,7 +547,7 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
{
return createRecordCategory(parent, name, TYPE_RECORD_CATEGORY);
}
-
+
/**
* @see org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService#createRecordCategory(org.alfresco.service.cmr.repository.NodeRef, java.lang.String, java.util.Map)
*/
@@ -556,7 +555,7 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
{
return createRecordCategory(parent, name, TYPE_RECORD_CATEGORY, properties);
}
-
+
/**
* @see org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService#createRecordCategory(org.alfresco.service.cmr.repository.NodeRef, java.lang.String, org.alfresco.service.namespace.QName)
*/
@@ -564,7 +563,7 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
{
return createRecordCategory(parent, name, type, null);
}
-
+
/**
* @see org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService#getAllContained(org.alfresco.service.cmr.repository.NodeRef)
*/
@@ -573,7 +572,7 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
{
return getAllContained(container, false);
}
-
+
/**
* @see org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService#getAllContained(org.alfresco.service.cmr.repository.NodeRef, boolean)
*/
@@ -582,25 +581,25 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
{
return getContained(container, null, deep);
}
-
+
/**
* Get contained nodes of a particular type. If null return all.
- *
+ *
* @param container container node reference
* @param typeFilter type filter, null if none
* @return {@link List}<{@link NodeRef> list of contained node references
*/
private List getContained(NodeRef container, QName typeFilter, boolean deep)
- {
+ {
// Parameter check
ParameterCheck.mandatory("container", container);
-
+
// Check we have a container in our hands
if (isRecordCategory(container) == false)
{
throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_CONTAINER_EXPECTED));
}
-
+
List result = new ArrayList(1);
List assocs = this.nodeService.getChildAssocs(container, ContentModel.ASSOC_CONTAINS, RegexQNamePattern.MATCH_ALL);
for (ChildAssociationRef assoc : assocs)
@@ -613,7 +612,7 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
{
result.add(child);
}
-
+
// Inspect the containers and add children if deep
if (deep == true &&
(TYPE_RECORD_CATEGORY.equals(childType) == true ||
@@ -622,10 +621,10 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
result.addAll(getContained(child, typeFilter, deep));
}
}
-
+
return result;
}
-
+
/**
* @see org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService#getContainedRecordCategories(org.alfresco.service.cmr.repository.NodeRef)
*/
@@ -634,7 +633,7 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
{
return getContainedRecordCategories(container, false);
}
-
+
/**
* @see org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService#getContainedRecordCategories(org.alfresco.service.cmr.repository.NodeRef, boolean)
*/
@@ -643,7 +642,7 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
{
return getContained(container, TYPE_RECORD_CATEGORY, deep);
}
-
+
/**
* @see org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService#getContainedRecordFolders(org.alfresco.service.cmr.repository.NodeRef)
*/
@@ -652,7 +651,7 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
{
return getContainedRecordFolders(container, false);
}
-
+
/**
* @see org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService#getContainedRecordFolders(org.alfresco.service.cmr.repository.NodeRef, boolean)
*/
diff --git a/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/security/FilePlanPermissionServiceImpl.java b/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/security/FilePlanPermissionServiceImpl.java
index e821ab5e19..83deaeabcc 100644
--- a/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/security/FilePlanPermissionServiceImpl.java
+++ b/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/security/FilePlanPermissionServiceImpl.java
@@ -18,6 +18,8 @@
*/
package org.alfresco.module.org_alfresco_module_rm.security;
+import static org.apache.commons.lang.BooleanUtils.isTrue;
+
import java.util.HashSet;
import java.util.List;
import java.util.Set;
@@ -48,7 +50,7 @@ import org.apache.commons.logging.LogFactory;
/**
* File plan permission service.
- *
+ *
* @author Roy Wetherall
* @since 2.1
*/
@@ -64,16 +66,16 @@ public class FilePlanPermissionServiceImpl extends ServiceBaseImpl
/** Records management service */
protected RecordsManagementService recordsManagementService;
-
+
/** File plan service */
protected FilePlanService filePlanService;
-
+
/** Record service */
protected RecordService recordService;
/** Logger */
protected static Log logger = LogFactory.getLog(FilePlanPermissionServiceImpl.class);
-
+
/**
* Initialisation method
*/
@@ -88,23 +90,23 @@ public class FilePlanPermissionServiceImpl extends ServiceBaseImpl
TYPE_RECORD_FOLDER,
new JavaBehaviour(this, "onCreateRecordFolder", NotificationFrequency.TRANSACTION_COMMIT));
policyComponent.bindClassBehaviour(
- NodeServicePolicies.OnAddAspectPolicy.QNAME,
- ASPECT_RECORD,
+ NodeServicePolicies.OnAddAspectPolicy.QNAME,
+ ASPECT_RECORD,
new JavaBehaviour(this, "onAddRecord", NotificationFrequency.TRANSACTION_COMMIT));
policyComponent.bindClassBehaviour(
- NodeServicePolicies.OnMoveNodePolicy.QNAME,
- ASPECT_RECORD,
+ NodeServicePolicies.OnMoveNodePolicy.QNAME,
+ ASPECT_RECORD,
new JavaBehaviour(this, "onMoveRecord", NotificationFrequency.TRANSACTION_COMMIT));
policyComponent.bindClassBehaviour(
- NodeServicePolicies.OnCreateNodePolicy.QNAME,
- TYPE_HOLD,
+ NodeServicePolicies.OnCreateNodePolicy.QNAME,
+ TYPE_HOLD,
new JavaBehaviour(this, "onCreateHoldTransfer", NotificationFrequency.TRANSACTION_COMMIT));
policyComponent.bindClassBehaviour(
- NodeServicePolicies.OnCreateNodePolicy.QNAME,
- TYPE_TRANSFER,
+ NodeServicePolicies.OnCreateNodePolicy.QNAME,
+ TYPE_TRANSFER,
new JavaBehaviour(this, "onCreateHoldTransfer", NotificationFrequency.TRANSACTION_COMMIT));
}
-
+
/**
* @param permissionService permission service
*/
@@ -112,7 +114,7 @@ public class FilePlanPermissionServiceImpl extends ServiceBaseImpl
{
this.permissionService = permissionService;
}
-
+
/**
* @param nodeService node service
*/
@@ -120,7 +122,7 @@ public class FilePlanPermissionServiceImpl extends ServiceBaseImpl
{
this.nodeService = nodeService;
}
-
+
/**
* @param policyComponent policy component
*/
@@ -128,7 +130,7 @@ public class FilePlanPermissionServiceImpl extends ServiceBaseImpl
{
this.policyComponent = policyComponent;
}
-
+
/**
* @param recordsManagementService records management service
*/
@@ -136,7 +138,7 @@ public class FilePlanPermissionServiceImpl extends ServiceBaseImpl
{
this.recordsManagementService = recordsManagementService;
}
-
+
/**
* @param filePlanService file plan service
*/
@@ -144,7 +146,7 @@ public class FilePlanPermissionServiceImpl extends ServiceBaseImpl
{
this.filePlanService = filePlanService;
}
-
+
/**
* @param recordService record service
*/
@@ -156,48 +158,46 @@ public class FilePlanPermissionServiceImpl extends ServiceBaseImpl
/**
* @param childAssocRef
*/
- public void onCreateRMContainer(ChildAssociationRef childAssocRef)
+ public void onCreateRMContainer(final ChildAssociationRef childAssocRef)
{
- final NodeRef recordCategory = childAssocRef.getChildRef();
- setUpPermissions(recordCategory);
-
// Pull any permissions found on the parent (ie the record category)
final NodeRef parentNodeRef = childAssocRef.getParentRef();
- if (parentNodeRef != null && nodeService.exists(parentNodeRef) == true)
+ if (parentNodeRef != null && nodeService.exists(parentNodeRef))
{
AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork