mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM: Remove deprecated warnings
* from recent file plan service refactor * also added helper unit test used to generate a capability report git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@46462 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -23,6 +23,7 @@ import java.util.List;
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.module.org_alfresco_module_rm.RecordsManagementService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel;
|
||||
import org.alfresco.module.org_alfresco_module_rm.record.RecordService;
|
||||
import org.alfresco.repo.action.ParameterDefinitionImpl;
|
||||
@@ -64,6 +65,9 @@ public class CreateRecordAction extends ActionExecuterAbstractBase
|
||||
/** Node service */
|
||||
private NodeService nodeService;
|
||||
|
||||
/** File plan service */
|
||||
private FilePlanService filePlanService;
|
||||
|
||||
/**
|
||||
* @param recordsManagementService records management service
|
||||
*/
|
||||
@@ -88,6 +92,14 @@ public class CreateRecordAction extends ActionExecuterAbstractBase
|
||||
this.nodeService = nodeService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param filePlanService file plan service
|
||||
*/
|
||||
public void setFilePlanService(FilePlanService filePlanService)
|
||||
{
|
||||
this.filePlanService = filePlanService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action, org.alfresco.service.cmr.repository.NodeRef)
|
||||
*/
|
||||
@@ -133,7 +145,7 @@ public class CreateRecordAction extends ActionExecuterAbstractBase
|
||||
else
|
||||
{
|
||||
// verify that the provided file plan is actually a file plan
|
||||
if (recordsManagementService.isFilePlan(filePlan) == false)
|
||||
if (filePlanService.isFilePlan(filePlan) == false)
|
||||
{
|
||||
if (logger.isDebugEnabled() == true)
|
||||
{
|
||||
|
@@ -45,7 +45,8 @@ public class DeleteLinksCapability extends DeclarativeCapability
|
||||
*/
|
||||
public int evaluate(NodeRef source, NodeRef target)
|
||||
{
|
||||
if (rmService.isFilePlan(source) == true && rmService.isFilePlan(target) == true)
|
||||
if (rmService.isFilePlanComponent(source) == true &&
|
||||
rmService.isFilePlanComponent(target) == true)
|
||||
{
|
||||
if (checkConditions(source) == true && checkConditions(target) == true)
|
||||
{
|
||||
|
@@ -24,6 +24,7 @@ import java.util.Set;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.module.org_alfresco_module_rm.RecordsManagementService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.capability.RMPermissionModel;
|
||||
import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel;
|
||||
import org.alfresco.repo.node.NodeServicePolicies;
|
||||
import org.alfresco.repo.policy.JavaBehaviour;
|
||||
@@ -59,6 +60,9 @@ public class FilePlanPermissionServiceImpl implements FilePlanPermissionService,
|
||||
|
||||
/** Node service */
|
||||
private NodeService nodeService;
|
||||
|
||||
/** File plan service */
|
||||
private FilePlanService filePlanService;
|
||||
|
||||
/** Logger */
|
||||
private static Log logger = LogFactory.getLog(FilePlanPermissionServiceImpl.class);
|
||||
@@ -109,6 +113,14 @@ public class FilePlanPermissionServiceImpl implements FilePlanPermissionService,
|
||||
{
|
||||
this.recordsManagementService = recordsManagementService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param filePlanService file plan service
|
||||
*/
|
||||
public void setFilePlanService(FilePlanService filePlanService)
|
||||
{
|
||||
this.filePlanService = filePlanService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param childAssocRef
|
||||
@@ -127,7 +139,7 @@ public class FilePlanPermissionServiceImpl implements FilePlanPermissionService,
|
||||
public Object doWork()
|
||||
{
|
||||
boolean fillingOnly = false;
|
||||
if (recordsManagementService.isFilePlan(parentNodeRef) == true)
|
||||
if (filePlanService.isFilePlan(parentNodeRef) == true)
|
||||
{
|
||||
fillingOnly = true;
|
||||
}
|
||||
@@ -239,7 +251,7 @@ public class FilePlanPermissionServiceImpl implements FilePlanPermissionService,
|
||||
{
|
||||
public Boolean doWork() throws Exception
|
||||
{
|
||||
if (recordsManagementService.isFilePlan(nodeRef) == true)
|
||||
if (filePlanService.isFilePlan(nodeRef) == true)
|
||||
{
|
||||
setPermissionDown(nodeRef, authority, permission);
|
||||
}
|
||||
@@ -276,7 +288,7 @@ public class FilePlanPermissionServiceImpl implements FilePlanPermissionService,
|
||||
{
|
||||
NodeRef parent = nodeService.getPrimaryParent(nodeRef).getParentRef();
|
||||
if (parent != null &&
|
||||
recordsManagementService.isFilePlan(parent) == false)
|
||||
filePlanService.isFilePlan(parent) == false)
|
||||
{
|
||||
setPermissionImpl(parent, authority, RMPermissionModel.READ_RECORDS);
|
||||
setReadPermissionUp(parent, authority);
|
||||
|
Reference in New Issue
Block a user