diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/model/fileplancomponents/FilePlanComponentFields.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/model/fileplancomponents/FilePlanComponentFields.java index b961c06d16..364790369c 100644 --- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/model/fileplancomponents/FilePlanComponentFields.java +++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/model/fileplancomponents/FilePlanComponentFields.java @@ -50,6 +50,14 @@ public class FilePlanComponentFields /** Common properties for record folders and records */ public static final String PROPERTIES_RECORD_SEARCH_HAS_DISPOSITION_SCHEDULE = "rma:recordSearchHasDispositionSchedule"; + public static final String PROPERTIES_RECORD_SEARCH_DISPOSITION_PERIOD_EXPRESSION = "rma:recordSearchDispositionPeriodExpression"; + public static final String PROPERTIES_RECORD_SEARCH_DISPOSITION_AUTHORITY = "rma:recordSearchDispositionAuthority"; + public static final String PROPERTIES_RECORD_SEARCH_DISPOSITION_ACTION_AS_OF = "rma:recordSearchDispositionActionAsOf"; + public static final String PROPERTIES_RECORD_SEARCH_DISPOSITION_PERIOD = "rma:recordSearchDispositionPeriod"; + public static final String PROPERTIES_RECORD_SEARCH_DISPOSITION_ACTION_NAME = "rma:recordSearchDispositionActionName"; + public static final String PROPERTIES_RECORD_SEARCH_DISPOSITION_EVENTS_ELIGIBLE = "rma:recordSearchDispositionEventsEligible"; + public static final String PROPERTIES_RECORD_SEARCH_DISPOSITION_INSTRUCTIONS = "rma:recordSearchDispositionInstructions"; + /** File plan properties */ public static final String PROPERTIES_COMPONENT_ID = "st:componentId"; diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/model/recordcategory/RecordCategoryChildProperties.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/model/recordcategory/RecordCategoryChildProperties.java index f02b88b7a8..7da874715a 100644 --- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/model/recordcategory/RecordCategoryChildProperties.java +++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/model/recordcategory/RecordCategoryChildProperties.java @@ -33,11 +33,20 @@ import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanCo import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_LOCATION; import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_OWNER; import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_HAS_DISPOSITION_SCHEDULE; +import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_DISPOSITION_PERIOD_EXPRESSION; +import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_DISPOSITION_AUTHORITY; +import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_DISPOSITION_ACTION_AS_OF; +import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_DISPOSITION_PERIOD; +import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_DISPOSITION_ACTION_NAME; +import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_DISPOSITION_EVENTS_ELIGIBLE; +import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_DISPOSITION_INSTRUCTIONS; import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_REVIEW_PERIOD; import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_ROOT_NODE_REF; import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_TITLE; import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_VITAL_RECORD_INDICATOR; +import java.util.Date; + import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.annotation.JsonSerialize; @@ -101,6 +110,27 @@ public class RecordCategoryChildProperties extends TestModel @JsonProperty (PROPERTIES_RECORD_SEARCH_HAS_DISPOSITION_SCHEDULE) private Boolean recordSearchHasDispositionSchedule; + + @JsonProperty (PROPERTIES_RECORD_SEARCH_DISPOSITION_PERIOD_EXPRESSION) + private String recordSearchDispositionPeriodExpression; + + @JsonProperty (PROPERTIES_RECORD_SEARCH_DISPOSITION_AUTHORITY) + private String recordSearchDispositionAuthority; + + @JsonProperty (PROPERTIES_RECORD_SEARCH_DISPOSITION_ACTION_AS_OF) + private Date recordSearchDispositionActionAsOf; + + @JsonProperty (PROPERTIES_RECORD_SEARCH_DISPOSITION_PERIOD) + private String recordSearchDispositionPeriod; + + @JsonProperty (PROPERTIES_RECORD_SEARCH_DISPOSITION_ACTION_NAME) + private String recordSearchDispositionActionName; + + @JsonProperty (PROPERTIES_RECORD_SEARCH_DISPOSITION_EVENTS_ELIGIBLE) + private Boolean recordSearchDispositionEventsEligible; + + @JsonProperty (PROPERTIES_RECORD_SEARCH_DISPOSITION_INSTRUCTIONS) + private String recordSearchDispositionInstructions; @JsonProperty (PROPERTIES_OWNER) private Owner owner; diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/RecordFolderAPI.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/RecordFolderAPI.java index d88d2b3a3f..f993bd8998 100644 --- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/RecordFolderAPI.java +++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/RecordFolderAPI.java @@ -223,7 +223,7 @@ public class RecordFolderAPI extends RMModelRequest /** * Create a record from file resource * - * @param electronicRecordModel {@link Record} for electronic record to be created + * @param recordModel {@link Record} for electronic record to be created * @param recordContent {@link File} pointing to the content of the electronic record to be created * @param recordFolderId The identifier of a record folder * @return newly created {@link Record} diff --git a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/recordcategories/RecordCategoryTests.java b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/recordcategories/RecordCategoryTests.java index 9d1dfa9a90..92d1073588 100644 --- a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/recordcategories/RecordCategoryTests.java +++ b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/recordcategories/RecordCategoryTests.java @@ -488,7 +488,7 @@ public class RecordCategoryTests extends BaseRMRestTest { // The record category to be created RecordCategory recordCategoryModel = RecordCategory.builder() - .name(RECORD_CATEGORY_NAME) + .name(RECORD_CATEGORY_NAME + getRandomAlphanumeric()) .nodeType(RECORD_CATEGORY_TYPE) .build(); FilePlanAPI filePlansAPI = getRestAPIFactory().getFilePlansAPI(); @@ -593,7 +593,7 @@ public class RecordCategoryTests extends BaseRMRestTest { // The record category to be created RecordCategory recordCategoryModel = RecordCategory.builder() - .name(RECORD_CATEGORY_NAME+getRandomAlphanumeric()) + .name(RECORD_CATEGORY_NAME + getRandomAlphanumeric()) .nodeType(RECORD_CATEGORY_TYPE) .build(); FilePlanAPI filePlansAPI = getRestAPIFactory().getFilePlansAPI(); diff --git a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/recordfolders/RecordFolderTests.java b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/recordfolders/RecordFolderTests.java index 2843995a80..6381fe88f9 100644 --- a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/recordfolders/RecordFolderTests.java +++ b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/recordfolders/RecordFolderTests.java @@ -131,7 +131,7 @@ public class RecordFolderTests extends BaseRMRestTest /** *
      * Given that RM site is created
-     * When I use the API to create a children inside a record folder with wron  types
+     * When I use the API to create a children of wrong type inside a record folder 
      * Then the operation fails
      * 
*/ @@ -141,7 +141,7 @@ public class RecordFolderTests extends BaseRMRestTest dataProvider = "childrenNotAllowedForFolder" ) - public void createRecordFolderIntoSpecialContainers(String nodeType) throws Exception + public void createInvalidChildrenForFolder(String nodeType) throws Exception { //create a record folder RecordCategoryChild folder = createCategoryFolderInFilePlan(); diff --git a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/unfiledrecordfolders/UnfiledRecordsFolderTests.java b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/unfiledrecordfolders/UnfiledRecordsFolderTests.java index cfca221474..7e6c18b500 100644 --- a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/unfiledrecordfolders/UnfiledRecordsFolderTests.java +++ b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/unfiledrecordfolders/UnfiledRecordsFolderTests.java @@ -106,7 +106,7 @@ public class UnfiledRecordsFolderTests extends BaseRMRestTest { getRestAPIFactory().getUnfiledContainersAPI().getUnfiledContainer(UNFILED_RECORDS_CONTAINER_ALIAS).getId() }, { getRestAPIFactory().getTransferContainerAPI().getTransferContainer(TRANSFERS_ALIAS).getId() }, // an arbitrary record category - { createRootCategory(RECORD_CATEGORY_NAME).getId() }, + { createRootCategory(RECORD_CATEGORY_NAME + getRandomAlphanumeric()).getId() }, // an arbitrary unfiled records folder {createCategoryFolderInFilePlan().getId()}, {createUnfiledContainerChild(UNFILED_RECORDS_CONTAINER_ALIAS, "Unfiled Record " + getRandomAlphanumeric(), CONTENT_TYPE).getId() } diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/record/RecordServiceImpl.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/record/RecordServiceImpl.java index 6acd408d6e..364238d0c9 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/record/RecordServiceImpl.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/record/RecordServiceImpl.java @@ -1794,7 +1794,7 @@ public class RecordServiceImpl extends BaseBehaviourBean ) public void onContentUpdate(NodeRef nodeRef, boolean newContent) { - if (!nodeService.hasAspect(nodeRef, ContentModel.ASPECT_HIDDEN) && !nodeService.hasAspect(nodeRef, ContentModel.ASPECT_LOCKABLE)) + if (nodeService.exists(nodeRef) && !nodeService.hasAspect(nodeRef, ContentModel.ASPECT_HIDDEN) && !nodeService.hasAspect(nodeRef, ContentModel.ASPECT_LOCKABLE)) { appendIdentifierToName(nodeService, nodeRef); }