mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM: Remove some more deprecation warnings
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@48442 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -574,6 +574,7 @@
|
||||
</bean>
|
||||
|
||||
<bean id="transfer" class="org.alfresco.module.org_alfresco_module_rm.action.impl.TransferAction" parent="rmAction">
|
||||
<property name="filePlanService" ref="FilePlanService" />
|
||||
<property name="isAccession" value="false"/>
|
||||
</bean>
|
||||
|
||||
@@ -617,6 +618,7 @@
|
||||
</bean>
|
||||
|
||||
<bean id="accession" class="org.alfresco.module.org_alfresco_module_rm.action.impl.TransferAction" parent="rmAction">
|
||||
<property name="filePlanService" ref="FilePlanService" />
|
||||
<property name="isAccession" value="true"/>
|
||||
</bean>
|
||||
|
||||
@@ -698,6 +700,7 @@
|
||||
|
||||
<bean id="fileTo" class="org.alfresco.module.org_alfresco_module_rm.action.impl.FileToAction" parent="rmAction">
|
||||
<property name="fileFolderService" ref="FileFolderService"/>
|
||||
<property name="filePlanService" ref="FilePlanService" />
|
||||
<property name="publicAction" value="true"/>
|
||||
<property name="allowParameterSubstitutions" value="true"/>
|
||||
</bean>
|
||||
|
@@ -666,7 +666,7 @@
|
||||
<property name="policyComponent" ref="policyComponent" />
|
||||
<property name="nodeService" ref="NodeService" />
|
||||
<property name="namespaceService" ref="namespaceService" />
|
||||
<property name="recordsManagementService" ref="RecordsManagementService" />
|
||||
<property name="filePlanService" ref="FilePlanService" />
|
||||
</bean>
|
||||
|
||||
<bean id="ModelSecurityService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
||||
@@ -947,6 +947,7 @@
|
||||
<property name="nodeService" ref="nodeService" />
|
||||
<property name="dictionaryService" ref="dictionaryService" />
|
||||
<property name="recordService" ref="RecordService" />
|
||||
<property name="filePlanService" ref="FilePlanService" />
|
||||
</bean>
|
||||
|
||||
<bean id="FreezeService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
||||
@@ -1271,7 +1272,7 @@
|
||||
<bean id="recordsManagementNotificationHelper" class="org.alfresco.module.org_alfresco_module_rm.notification.RecordsManagementNotificationHelper" >
|
||||
<property name="filePlanRoleService" ref="FilePlanRoleService"/>
|
||||
<property name="notificationService" ref="NotificationService"/>
|
||||
<property name="recordsManagementService" ref="RecordsManagementService"/>
|
||||
<property name="filePlanService" ref="FilePlanService"/>
|
||||
<property name="nodeService" ref="nodeService"/>
|
||||
<property name="tenantAdminService" ref="tenantAdminService"/>
|
||||
<property name="namespaceService" ref="namespaceService"/>
|
||||
|
@@ -227,6 +227,7 @@
|
||||
<property name="importerService" ref="ImporterService" />
|
||||
<property name="recordsManagementService" ref="RecordsManagementService" />
|
||||
<property name="filePlanRoleService" ref="FilePlanRoleService" />
|
||||
<property name="filePlanService" ref="FilePlanService" />
|
||||
</bean>
|
||||
|
||||
<!-- Base bean for transfer web scripts -->
|
||||
|
@@ -6,6 +6,7 @@ import java.util.List;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.module.org_alfresco_module_rm.action.RMActionExecuterAbstractBase;
|
||||
import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService;
|
||||
import org.alfresco.repo.action.ParameterDefinitionImpl;
|
||||
import org.alfresco.service.cmr.action.Action;
|
||||
import org.alfresco.service.cmr.action.ParameterDefinition;
|
||||
@@ -36,6 +37,9 @@ public class FileToAction extends RMActionExecuterAbstractBase
|
||||
/** file folder service */
|
||||
private FileFolderService fileFolderService;
|
||||
|
||||
/** file plan service */
|
||||
private FilePlanService filePlanService;
|
||||
|
||||
/**
|
||||
* @param fileFolderService file folder service
|
||||
*/
|
||||
@@ -44,6 +48,14 @@ public class FileToAction extends RMActionExecuterAbstractBase
|
||||
this.fileFolderService = fileFolderService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param filePlanService file plan service
|
||||
*/
|
||||
public void setFilePlanService(FilePlanService filePlanService)
|
||||
{
|
||||
this.filePlanService = filePlanService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.module.org_alfresco_module_rm.action.RMActionExecuterAbstractBase#addParameterDefinitions(java.util.List)
|
||||
*/
|
||||
@@ -113,7 +125,7 @@ public class FileToAction extends RMActionExecuterAbstractBase
|
||||
{
|
||||
// TODO check the action for a context node reference
|
||||
// the file plan node always provides the context
|
||||
NodeRef context = recordsManagementService.getFilePlan(actionedUponNodeRef);
|
||||
NodeRef context = filePlanService.getFilePlan(actionedUponNodeRef);
|
||||
if (context == null)
|
||||
{
|
||||
throw new AlfrescoRuntimeException("Unable to execute fileTo action, because the path resolution context could not be found.");
|
||||
|
@@ -28,6 +28,7 @@ import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.module.org_alfresco_module_rm.action.RMDispositionActionExecuterAbstractBase;
|
||||
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionAction;
|
||||
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionActionDefinition;
|
||||
import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService;
|
||||
import org.alfresco.repo.action.executer.ActionExecuter;
|
||||
import org.alfresco.repo.content.MimetypeMap;
|
||||
import org.alfresco.repo.transaction.AlfrescoTransactionSupport;
|
||||
@@ -56,6 +57,17 @@ public class TransferAction extends RMDispositionActionExecuterAbstractBase
|
||||
/** Indicates whether the transfer is an accession or not */
|
||||
private boolean isAccession = false;
|
||||
|
||||
/** File plan service */
|
||||
private FilePlanService filePlanService;
|
||||
|
||||
/**
|
||||
* @param filePlanService file plan service
|
||||
*/
|
||||
public void setFilePlanService(FilePlanService filePlanService)
|
||||
{
|
||||
this.filePlanService = filePlanService;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether this transfer is an accession or not
|
||||
*
|
||||
@@ -103,7 +115,7 @@ public class TransferAction extends RMDispositionActionExecuterAbstractBase
|
||||
private void doTransfer(Action action, NodeRef dispositionLifeCycleNodeRef)
|
||||
{
|
||||
// Get the root rm node
|
||||
NodeRef root = this.recordsManagementService.getFilePlan(dispositionLifeCycleNodeRef);
|
||||
NodeRef root = filePlanService.getFilePlan(dispositionLifeCycleNodeRef);
|
||||
|
||||
// Get the transfer object
|
||||
NodeRef transferNodeRef = (NodeRef)AlfrescoTransactionSupport.getResource(KEY_TRANSFER_NODEREF);
|
||||
|
@@ -23,7 +23,6 @@ import net.sf.acegisecurity.vote.AccessDecisionVoter;
|
||||
import org.alfresco.module.org_alfresco_module_rm.RecordsManagementService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.caveat.RMCaveatConfigComponent;
|
||||
import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.record.RecordService;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
import org.alfresco.repo.transaction.AlfrescoTransactionSupport;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
|
@@ -29,6 +29,7 @@ import java.util.Set;
|
||||
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.node.NodeServicePolicies;
|
||||
@@ -87,6 +88,9 @@ public class FreezeServiceImpl implements FreezeService,
|
||||
/** Record service */
|
||||
private RecordService recordService;
|
||||
|
||||
/** File Plan Service */
|
||||
private FilePlanService filePlanService;
|
||||
|
||||
/**
|
||||
* @param policyComponent policy component
|
||||
*/
|
||||
@@ -127,6 +131,14 @@ public class FreezeServiceImpl implements FreezeService,
|
||||
this.recordService = recordService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param filePlanService file plan service
|
||||
*/
|
||||
public void setFilePlanService(FilePlanService filePlanService)
|
||||
{
|
||||
this.filePlanService = filePlanService;
|
||||
}
|
||||
|
||||
/**
|
||||
* Init service
|
||||
*/
|
||||
@@ -588,7 +600,7 @@ public class FreezeServiceImpl implements FreezeService,
|
||||
holdProps.put(PROP_HOLD_REASON, reason);
|
||||
|
||||
// Get the root rm node and create the hold object
|
||||
NodeRef root = recordsManagementService.getFilePlan(nodeRef);
|
||||
NodeRef root = filePlanService.getFilePlan(nodeRef);
|
||||
QName transferQName = QName.createQName(RM_URI, transferName);
|
||||
holdNodeRef = nodeService.createNode(root, ASSOC_HOLDS, transferQName, TYPE_HOLD, holdProps).getChildRef();
|
||||
|
||||
|
@@ -154,7 +154,7 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JSONC
|
||||
rmNodeValues.put("kind", kind.toString());
|
||||
|
||||
// File plan node reference
|
||||
NodeRef filePlan = recordsManagementService.getFilePlan(nodeRef);
|
||||
NodeRef filePlan = filePlanService.getFilePlan(nodeRef);
|
||||
rmNodeValues.put("filePlan", filePlan.toString());
|
||||
|
||||
// Unfiled container node reference
|
||||
|
@@ -24,8 +24,8 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.module.org_alfresco_module_rm.RecordsManagementService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.capability.Capability;
|
||||
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;
|
||||
@@ -66,8 +66,8 @@ public class ModelSecurityServiceImpl implements ModelSecurityService,
|
||||
/** Namespace service */
|
||||
private NamespaceService namespaceService;
|
||||
|
||||
/** Records management service */
|
||||
private RecordsManagementService recordsManagementService;
|
||||
/** File plan service */
|
||||
private FilePlanService filePlanService;
|
||||
|
||||
/** Map of protected properties keyed by name */
|
||||
private Map<QName, ProtectedProperty> protectedProperties = new HashMap<QName, ProtectedProperty>(21);
|
||||
@@ -127,11 +127,11 @@ public class ModelSecurityServiceImpl implements ModelSecurityService,
|
||||
}
|
||||
|
||||
/**
|
||||
* @param recordsManagementService records management service
|
||||
* @param filePlanService file plan service
|
||||
*/
|
||||
public void setRecordsManagementService(RecordsManagementService recordsManagementService)
|
||||
public void setFilePlanService(FilePlanService filePlanService)
|
||||
{
|
||||
this.recordsManagementService = recordsManagementService;
|
||||
this.filePlanService = filePlanService;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -232,7 +232,7 @@ public class ModelSecurityServiceImpl implements ModelSecurityService,
|
||||
{
|
||||
boolean result = false;
|
||||
|
||||
NodeRef filePlan = recordsManagementService.getFilePlan(nodeRef);
|
||||
NodeRef filePlan = filePlanService.getFilePlan(nodeRef);
|
||||
if (filePlan != null)
|
||||
{
|
||||
for (Capability capability : artifact.getCapabilities())
|
||||
|
@@ -27,7 +27,7 @@ import java.util.Set;
|
||||
|
||||
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.role.FilePlanRoleService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.role.Role;
|
||||
@@ -74,7 +74,6 @@ public class RecordsManagementNotificationHelper implements RecordsManagementMod
|
||||
|
||||
/** Services */
|
||||
private NotificationService notificationService;
|
||||
private RecordsManagementService recordsManagementService;
|
||||
private FilePlanRoleService filePlanRoleService;
|
||||
private SearchService searchService;
|
||||
private NamespaceService namespaceService;
|
||||
@@ -82,6 +81,7 @@ public class RecordsManagementNotificationHelper implements RecordsManagementMod
|
||||
private AuthorityService authorityService;
|
||||
private TenantAdminService tenantAdminService;
|
||||
private NodeService nodeService;
|
||||
private FilePlanService filePlanService;
|
||||
|
||||
/** Notification role */
|
||||
private String notificationRole;
|
||||
@@ -100,11 +100,11 @@ public class RecordsManagementNotificationHelper implements RecordsManagementMod
|
||||
}
|
||||
|
||||
/**
|
||||
* @param recordsManagementService rm service
|
||||
* @param filePlanService file plan service
|
||||
*/
|
||||
public void setRecordsManagementService(RecordsManagementService recordsManagementService)
|
||||
public void setFilePlanService(FilePlanService filePlanService)
|
||||
{
|
||||
this.recordsManagementService = recordsManagementService;
|
||||
this.filePlanService = filePlanService;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -398,7 +398,7 @@ public class RecordsManagementNotificationHelper implements RecordsManagementMod
|
||||
@Override
|
||||
public NodeRef doWork() throws Exception
|
||||
{
|
||||
return recordsManagementService.getFilePlan(context);
|
||||
return filePlanService.getFilePlan(context);
|
||||
|
||||
}
|
||||
}, AuthenticationUtil.getSystemUserName());
|
||||
|
@@ -29,6 +29,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
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.role.FilePlanRoleService;
|
||||
import org.alfresco.repo.exporter.ACPExportPackageHandler;
|
||||
@@ -73,6 +74,7 @@ public class ImportPost extends DeclarativeWebScript
|
||||
protected ImporterService importerService;
|
||||
protected RecordsManagementService rmService;
|
||||
protected FilePlanRoleService filePlanRoleService;
|
||||
protected FilePlanService filePlanService;
|
||||
|
||||
/**
|
||||
* @param nodeService
|
||||
@@ -120,6 +122,14 @@ public class ImportPost extends DeclarativeWebScript
|
||||
this.rmService = rmService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param filePlanService file plan service
|
||||
*/
|
||||
public void setFilePlanService(FilePlanService filePlanService)
|
||||
{
|
||||
this.filePlanService = filePlanService;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Map<String, Object> executeImpl(WebScriptRequest req, Status status, Cache cache)
|
||||
{
|
||||
@@ -178,7 +188,7 @@ public class ImportPost extends DeclarativeWebScript
|
||||
// the DM admin user (meaning the webscript 'admin' authentication can't be used)
|
||||
// perform a manual check here to ensure the current user has the RM admin role.
|
||||
boolean isAdmin = filePlanRoleService.hasRMAdminRole(
|
||||
this.rmService.getFilePlan(destination),
|
||||
filePlanService.getFilePlan(destination),
|
||||
AuthenticationUtil.getRunAsUser());
|
||||
if (!isAdmin)
|
||||
{
|
||||
|
Reference in New Issue
Block a user