Reverse merged V2.2.1.x

<<< Need to use a different approach. >>>
         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@114605 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alexandru Balmus
2015-10-16 14:14:03 +00:00
parent 670ca476a4
commit dbbe428c37
4 changed files with 7 additions and 41 deletions

View File

@@ -145,8 +145,7 @@
<!-- Action Service --> <!-- Action Service -->
<bean id="actionService" class="org.alfresco.repo.action.ExtendedActionServiceImpl" init-method="init"> <bean id="actionService" class="org.alfresco.repo.action.ExtendedActionServiceImpl" init-method="init">
<!-- The following reference injection has been commented out to address MNT-14900; dependency is resolved internally. --> <property name="filePlanService" ref="FilePlanService" />
<!-- <property name="filePlanService" ref="FilePlanService" /> -->
<property name="policyComponent"> <property name="policyComponent">
<ref bean="policyComponent" /> <ref bean="policyComponent" />

View File

@@ -501,8 +501,7 @@
<property name="authorityService" ref="AuthorityService"/> <property name="authorityService" ref="AuthorityService"/>
<property name="permissionService" ref="PermissionService"/> <property name="permissionService" ref="PermissionService"/>
<property name="nodeService" ref="NodeService"/> <property name="nodeService" ref="NodeService"/>
<!-- The following reference injection has been commented out to address MNT-14900; dependency is resolved internally. --> <property name="filePlanService" ref="FilePlanService" />
<!-- <property name="filePlanService" ref="FilePlanService" /> -->
<!-- init repo for when a tenant is created --> <!-- init repo for when a tenant is created -->
<property name="bootstrapImporterModuleComponent" ref="org_alfresco_module_rm_bootstrapData"/> <property name="bootstrapImporterModuleComponent" ref="org_alfresco_module_rm_bootstrapData"/>

View File

@@ -53,9 +53,6 @@ import org.apache.commons.lang.StringUtils;
import org.json.JSONArray; import org.json.JSONArray;
import org.json.JSONException; import org.json.JSONException;
import org.json.JSONObject; 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; import org.springframework.extensions.surf.util.I18NUtil;
/** /**
@@ -65,8 +62,7 @@ import org.springframework.extensions.surf.util.I18NUtil;
* @since 2.1 * @since 2.1
*/ */
public class FilePlanRoleServiceImpl implements FilePlanRoleService, public class FilePlanRoleServiceImpl implements FilePlanRoleService,
RecordsManagementModel, RecordsManagementModel
ApplicationContextAware
{ {
/** I18N */ /** I18N */
private static final String MSG_ALL_ROLES = "rm.role.all"; private static final String MSG_ALL_ROLES = "rm.role.all";
@@ -97,8 +93,6 @@ public class FilePlanRoleServiceImpl implements FilePlanRoleService,
private BootstrapImporterModuleComponent bootstrapImporterModule; private BootstrapImporterModuleComponent bootstrapImporterModule;
private ApplicationContext applicationContext;
/** Records management role zone */ /** Records management role zone */
public static final String RM_ROLE_ZONE_PREFIX = "rmRoleZone"; public static final String RM_ROLE_ZONE_PREFIX = "rmRoleZone";
@@ -153,16 +147,6 @@ public class FilePlanRoleServiceImpl implements FilePlanRoleService,
{ {
this.bootstrapImporterModule = bootstrapImporterModuleComponent; 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) * @see org.alfresco.module.org_alfresco_module_rm.role.FilePlanRoleService#initialiseFilePlan(org.alfresco.service.cmr.repository.NodeRef)
@@ -206,11 +190,11 @@ public class FilePlanRoleServiceImpl implements FilePlanRoleService,
permissionService.setPermission(filePlan, ExtendedWriterDynamicAuthority.EXTENDED_WRITER, RMPermissionModel.FILING, true); permissionService.setPermission(filePlan, ExtendedWriterDynamicAuthority.EXTENDED_WRITER, RMPermissionModel.FILING, true);
// Create the transfer and hold containers // Create the transfer and hold containers
systemContainers.add(getFilePlanService().createHoldContainer(filePlan)); systemContainers.add(filePlanService.createHoldContainer(filePlan));
systemContainers.add(getFilePlanService().createTransferContainer(filePlan)); systemContainers.add(filePlanService.createTransferContainer(filePlan));
// Create the unfiled record container // Create the unfiled record container
systemContainers.add(getFilePlanService().createUnfiledContainer(filePlan)); systemContainers.add(filePlanService.createUnfiledContainer(filePlan));
return systemContainers; return systemContainers;
} }
@@ -893,10 +877,4 @@ public class FilePlanRoleServiceImpl implements FilePlanRoleService,
{ {
return authorityService.getName(AuthorityType.GROUP, getAllRolesGroupShortName(filePlan)); return authorityService.getName(AuthorityType.GROUP, getAllRolesGroupShortName(filePlan));
} }
@Override
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException
{
this.applicationContext = applicationContext;
}
} }

View File

@@ -46,16 +46,6 @@ public class ExtendedActionServiceImpl extends ActionServiceImpl implements Appl
/** Application context */ /** Application context */
private ApplicationContext extendedApplicationContext; 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) * @see org.alfresco.repo.action.ActionServiceImpl#setApplicationContext(org.springframework.context.ApplicationContext)
*/ */
@@ -108,7 +98,7 @@ public class ExtendedActionServiceImpl extends ActionServiceImpl implements Appl
else else
{ {
// get the file component kind of the node reference // get the file component kind of the node reference
FilePlanComponentKind kind = getFilePlanService().getFilePlanComponentKind(nodeRef); FilePlanComponentKind kind = filePlanService.getFilePlanComponentKind(nodeRef);
result = new ArrayList<ActionDefinition>(actionDefinitions.size()); result = new ArrayList<ActionDefinition>(actionDefinitions.size());
// check each action definition // check each action definition