mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Merged DEV to V2.2.1.x
114241: MNT-14900 : Alfresco doesn't work with Records Management - Fixed problem with circular references during Spring dependency injection process git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/BRANCHES/V2.2.1.x@114437 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -53,6 +53,9 @@ import org.apache.commons.lang.StringUtils;
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationContextAware;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
/**
|
||||
@@ -62,7 +65,8 @@ import org.springframework.extensions.surf.util.I18NUtil;
|
||||
* @since 2.1
|
||||
*/
|
||||
public class FilePlanRoleServiceImpl implements FilePlanRoleService,
|
||||
RecordsManagementModel
|
||||
RecordsManagementModel,
|
||||
ApplicationContextAware
|
||||
{
|
||||
/** I18N */
|
||||
private static final String MSG_ALL_ROLES = "rm.role.all";
|
||||
@@ -93,6 +97,8 @@ public class FilePlanRoleServiceImpl implements FilePlanRoleService,
|
||||
|
||||
private BootstrapImporterModuleComponent bootstrapImporterModule;
|
||||
|
||||
private ApplicationContext applicationContext;
|
||||
|
||||
/** Records management role zone */
|
||||
public static final String RM_ROLE_ZONE_PREFIX = "rmRoleZone";
|
||||
|
||||
@@ -147,6 +153,16 @@ public class FilePlanRoleServiceImpl implements FilePlanRoleService,
|
||||
{
|
||||
this.bootstrapImporterModule = bootstrapImporterModuleComponent;
|
||||
}
|
||||
|
||||
protected FilePlanService getFilePlanService()
|
||||
{
|
||||
if (filePlanService == null)
|
||||
{
|
||||
filePlanService = (FilePlanService) applicationContext.getBean("FilePlanService");
|
||||
}
|
||||
|
||||
return filePlanService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.module.org_alfresco_module_rm.role.FilePlanRoleService#initialiseFilePlan(org.alfresco.service.cmr.repository.NodeRef)
|
||||
@@ -190,11 +206,11 @@ public class FilePlanRoleServiceImpl implements FilePlanRoleService,
|
||||
permissionService.setPermission(filePlan, ExtendedWriterDynamicAuthority.EXTENDED_WRITER, RMPermissionModel.FILING, true);
|
||||
|
||||
// Create the transfer and hold containers
|
||||
systemContainers.add(filePlanService.createHoldContainer(filePlan));
|
||||
systemContainers.add(filePlanService.createTransferContainer(filePlan));
|
||||
systemContainers.add(getFilePlanService().createHoldContainer(filePlan));
|
||||
systemContainers.add(getFilePlanService().createTransferContainer(filePlan));
|
||||
|
||||
// Create the unfiled record container
|
||||
systemContainers.add(filePlanService.createUnfiledContainer(filePlan));
|
||||
systemContainers.add(getFilePlanService().createUnfiledContainer(filePlan));
|
||||
|
||||
return systemContainers;
|
||||
}
|
||||
@@ -877,4 +893,10 @@ public class FilePlanRoleServiceImpl implements FilePlanRoleService,
|
||||
{
|
||||
return authorityService.getName(AuthorityType.GROUP, getAllRolesGroupShortName(filePlan));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException
|
||||
{
|
||||
this.applicationContext = applicationContext;
|
||||
}
|
||||
}
|
||||
|
@@ -46,6 +46,16 @@ public class ExtendedActionServiceImpl extends ActionServiceImpl implements Appl
|
||||
/** Application context */
|
||||
private ApplicationContext extendedApplicationContext;
|
||||
|
||||
protected FilePlanService getFilePlanService()
|
||||
{
|
||||
if (filePlanService == null)
|
||||
{
|
||||
filePlanService = (FilePlanService) extendedApplicationContext.getBean("FilePlanService");
|
||||
}
|
||||
|
||||
return filePlanService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.repo.action.ActionServiceImpl#setApplicationContext(org.springframework.context.ApplicationContext)
|
||||
*/
|
||||
@@ -98,7 +108,7 @@ public class ExtendedActionServiceImpl extends ActionServiceImpl implements Appl
|
||||
else
|
||||
{
|
||||
// get the file component kind of the node reference
|
||||
FilePlanComponentKind kind = filePlanService.getFilePlanComponentKind(nodeRef);
|
||||
FilePlanComponentKind kind = getFilePlanService().getFilePlanComponentKind(nodeRef);
|
||||
result = new ArrayList<ActionDefinition>(actionDefinitions.size());
|
||||
|
||||
// check each action definition
|
||||
|
Reference in New Issue
Block a user