RM-7028 review updates

This commit is contained in:
Sara Aspery
2019-11-18 15:59:54 +00:00
parent e9be5a4188
commit 30e3ea689f
3 changed files with 82 additions and 77 deletions

View File

@@ -27,6 +27,11 @@
package org.alfresco.module.org_alfresco_module_rm.audit.event; package org.alfresco.module.org_alfresco_module_rm.audit.event;
import static org.alfresco.repo.policy.Behaviour.NotificationFrequency.EVERY_EVENT;
import java.io.Serializable;
import java.util.Map;
import org.alfresco.model.ContentModel; import org.alfresco.model.ContentModel;
import org.alfresco.module.org_alfresco_module_rm.hold.HoldServicePolicies; import org.alfresco.module.org_alfresco_module_rm.hold.HoldServicePolicies;
import org.alfresco.repo.policy.annotation.Behaviour; import org.alfresco.repo.policy.annotation.Behaviour;
@@ -36,11 +41,6 @@ import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService; import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.service.namespace.QName; import org.alfresco.service.namespace.QName;
import java.io.Serializable;
import java.util.Map;
import static org.alfresco.repo.policy.Behaviour.NotificationFrequency.EVERY_EVENT;
/** /**
* Add to hold audit event. * Add to hold audit event.
* *
@@ -50,7 +50,9 @@ import static org.alfresco.repo.policy.Behaviour.NotificationFrequency.EVERY_EVE
@BehaviourBean @BehaviourBean
public class AddToHoldAuditEvent extends AuditEvent implements HoldServicePolicies.OnAddToHoldPolicy public class AddToHoldAuditEvent extends AuditEvent implements HoldServicePolicies.OnAddToHoldPolicy
{ {
/** Node Service */ /**
* Node Service
*/
private NodeService nodeService; private NodeService nodeService;
/** /**

View File

@@ -51,7 +51,8 @@ import org.alfresco.service.cmr.security.PermissionService;
* @see FilePlanService#getNodeRefPath(NodeRef) * @see FilePlanService#getNodeRefPath(NodeRef)
* *
* @author Derek Hulley * @author Derek Hulley
* @since 3.2 * @author Sara Aspery
* @since 3.3
*/ */
public final class NamePathDataExtractor extends AbstractDataExtractor public final class NamePathDataExtractor extends AbstractDataExtractor
{ {

View File

@@ -27,6 +27,8 @@
package org.alfresco.module.org_alfresco_module_rm.test.util; package org.alfresco.module.org_alfresco_module_rm.test.util;
import static org.alfresco.util.GUID.generate;
import java.io.InputStream; import java.io.InputStream;
import java.io.Serializable; import java.io.Serializable;
import java.util.ArrayList; import java.util.ArrayList;
@@ -66,8 +68,6 @@ import org.alfresco.service.namespace.QName;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
import static org.alfresco.util.GUID.generate;
/** /**
* Common RM test utility methods. * Common RM test utility methods.
* *
@@ -75,17 +75,9 @@ import static org.alfresco.util.GUID.generate;
*/ */
public class CommonRMTestUtils implements RecordsManagementModel public class CommonRMTestUtils implements RecordsManagementModel
{ {
private DispositionService dispositionService; /**
private NodeService nodeService; * test values
private ContentService contentService; */
private RecordsManagementActionService actionService;
private ModelSecurityService modelSecurityService;
private FilePlanRoleService filePlanRoleService;
private CapabilityService capabilityService;
private RecordService recordService;
private HoldService holdService;
/** test values */
public static final String DEFAULT_DISPOSITION_AUTHORITY = "disposition authority"; public static final String DEFAULT_DISPOSITION_AUTHORITY = "disposition authority";
public static final String DEFAULT_DISPOSITION_INSTRUCTIONS = "disposition instructions"; public static final String DEFAULT_DISPOSITION_INSTRUCTIONS = "disposition instructions";
public static final String DEFAULT_DISPOSITION_DESCRIPTION = "disposition action description"; public static final String DEFAULT_DISPOSITION_DESCRIPTION = "disposition action description";
@@ -95,6 +87,15 @@ public class CommonRMTestUtils implements RecordsManagementModel
public static final String PERIOD_ONE_WEEK = "week|1"; public static final String PERIOD_ONE_WEEK = "week|1";
public static final String PERIOD_ONE_YEAR = "year|1"; public static final String PERIOD_ONE_YEAR = "year|1";
public static final String PERIOD_THREE_YEARS = "year|3"; public static final String PERIOD_THREE_YEARS = "year|3";
private DispositionService dispositionService;
private NodeService nodeService;
private ContentService contentService;
private RecordsManagementActionService actionService;
private ModelSecurityService modelSecurityService;
private FilePlanRoleService filePlanRoleService;
private CapabilityService capabilityService;
private RecordService recordService;
private HoldService holdService;
/** /**
* Constructor * Constructor
@@ -344,8 +345,7 @@ public class CommonRMTestUtils implements RecordsManagementModel
nodeService.setProperty(record, RecordsManagementModel.PROP_DATE_FILED, new Date()); nodeService.setProperty(record, RecordsManagementModel.PROP_DATE_FILED, new Date());
nodeService.setProperty(record, ContentModel.PROP_TITLE, "titleValue"); nodeService.setProperty(record, ContentModel.PROP_TITLE, "titleValue");
actionService.executeRecordsManagementAction(record, "declareRecord"); actionService.executeRecordsManagementAction(record, "declareRecord");
} } finally
finally
{ {
modelSecurityService.setEnabled(true); modelSecurityService.setEnabled(true);
} }
@@ -368,8 +368,7 @@ public class CommonRMTestUtils implements RecordsManagementModel
try try
{ {
actionService.executeRecordsManagementAction(recordFolder, "closeRecordFolder"); actionService.executeRecordsManagementAction(recordFolder, "closeRecordFolder");
} } finally
finally
{ {
modelSecurityService.setEnabled(true); modelSecurityService.setEnabled(true);
} }
@@ -412,6 +411,7 @@ public class CommonRMTestUtils implements RecordsManagementModel
/** /**
* Helper method to create a hold. * Helper method to create a hold.
*
* @param holdName hold name * @param holdName hold name
* @param holdReason hold reason * @param holdReason hold reason
* @return NodeRef hold node reference * @return NodeRef hold node reference
@@ -423,6 +423,7 @@ public class CommonRMTestUtils implements RecordsManagementModel
/** /**
* Helper method to delete a hold. * Helper method to delete a hold.
*
* @param nodeRef hold node reference * @param nodeRef hold node reference
*/ */
public void deleteHold(NodeRef nodeRef) public void deleteHold(NodeRef nodeRef)
@@ -432,6 +433,7 @@ public class CommonRMTestUtils implements RecordsManagementModel
/** /**
* Util method to add content to a hold. * Util method to add content to a hold.
*
* @param holdNodeRef hold node reference * @param holdNodeRef hold node reference
* @param contentNodeRef content node reference * @param contentNodeRef content node reference
*/ */