diff --git a/pom.xml b/pom.xml
index b98b2ad3af..dac2e7c47b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -531,8 +531,8 @@
alfrescoorg.alfrescoshare
- 7.8
- 6.1.0
+ 7.9
+ 6.2.00.0
@@ -559,7 +559,7 @@
80802.9.9
- 2.9.9.3
+ 2.9.100.31.01.10.1942.2.6
diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/model/fileplancomponents/FilePlanComponentAspects.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/model/fileplancomponents/FilePlanComponentAspects.java
index c78f23711c..99e6b36043 100644
--- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/model/fileplancomponents/FilePlanComponentAspects.java
+++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/model/fileplancomponents/FilePlanComponentAspects.java
@@ -34,6 +34,11 @@ package org.alfresco.rest.rm.community.model.fileplancomponents;
*/
public class FilePlanComponentAspects
{
+ /** Private constructor to prevent instantiation. */
+ private FilePlanComponentAspects()
+ {
+ }
+
// aspect present on completed records
public static final String ASPECTS_COMPLETED_RECORD = "rma:declaredRecord";
@@ -42,4 +47,10 @@ public class FilePlanComponentAspects
// aspect present on vital records
public static final String ASPECTS_VITAL_RECORD = "rma:vitalRecord";
+
+ // Frozen aspect
+ public static final String FROZEN_ASPECT = "rma:frozen";
+
+ // recordSearch aspect
+ public static final String RECORD_SEARCH_ASPECT = "rma:recordSearch";
}
diff --git a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/audit/AuditAddToHoldTests.java b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/audit/AuditAddToHoldTests.java
index 9a5e03def8..d911e81585 100644
--- a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/audit/AuditAddToHoldTests.java
+++ b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/audit/AuditAddToHoldTests.java
@@ -32,6 +32,7 @@ import static org.alfresco.rest.rm.community.base.TestData.HOLD_DESCRIPTION;
import static org.alfresco.rest.rm.community.base.TestData.HOLD_REASON;
import static org.alfresco.rest.rm.community.model.audit.AuditEvents.ADD_TO_HOLD;
import static org.alfresco.rest.rm.community.util.CommonTestUtils.generateTestPrefix;
+import static org.alfresco.rest.rm.community.utils.RMSiteUtil.FILE_PLAN_PATH;
import static org.alfresco.utility.Utility.buildPath;
import static org.alfresco.utility.Utility.removeLastSlash;
import static org.alfresco.utility.data.RandomData.getRandomName;
@@ -129,14 +130,13 @@ public class AuditAddToHoldTests extends BaseRMRestTest
@DataProvider (name = "validNodesForAddToHold")
public Object[][] getValidNodesForAddToHold() throws Exception
{
- String documentLibrary = "/documentLibrary";
FileModel contentToBeAdded = dataContent.usingAdmin().usingSite(privateSite)
.createContent(CMISUtil.DocumentType.TEXT_PLAIN);
RecordCategoryChild recordFolderToBeAdded = createRecordFolder(recordCategory.getId(), PREFIX + "recFolderToBeAdded");
Record recordToBeAdded = createElectronicRecord(recordFolder.getId(), PREFIX + "record");
- String recordFolderPath = removeLastSlash(buildPath(documentLibrary, recordCategory.getName(),
+ String recordFolderPath = removeLastSlash(buildPath(FILE_PLAN_PATH, recordCategory.getName(),
recordFolderToBeAdded.getName()));
- String recordPath = removeLastSlash(buildPath(documentLibrary, recordCategory.getName(),
+ String recordPath = removeLastSlash(buildPath(FILE_PLAN_PATH, recordCategory.getName(),
recordFolder.getName(), recordToBeAdded.getName()));
String contentPath = "/Company Home" + contentToBeAdded.getCmisLocation();
diff --git a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/audit/AuditRemoveFromHoldTests.java b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/audit/AuditRemoveFromHoldTests.java
index 13905a6208..1f5b6c2d69 100644
--- a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/audit/AuditRemoveFromHoldTests.java
+++ b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/audit/AuditRemoveFromHoldTests.java
@@ -32,6 +32,7 @@ import static org.alfresco.rest.rm.community.base.TestData.HOLD_DESCRIPTION;
import static org.alfresco.rest.rm.community.base.TestData.HOLD_REASON;
import static org.alfresco.rest.rm.community.model.audit.AuditEvents.REMOVE_FROM_HOLD;
import static org.alfresco.rest.rm.community.util.CommonTestUtils.generateTestPrefix;
+import static org.alfresco.rest.rm.community.utils.RMSiteUtil.FILE_PLAN_PATH;
import static org.alfresco.utility.Utility.buildPath;
import static org.alfresco.utility.Utility.removeLastSlash;
import static org.alfresco.utility.data.RandomData.getRandomName;
@@ -144,10 +145,9 @@ public class AuditRemoveFromHoldTests extends BaseRMRestTest
@DataProvider (name = "validNodesForRemoveFromHold")
public Object[][] getValidNodesForRemoveFromHold()
{
- String documentLibrary = "/documentLibrary";
- String recordFolderPath = removeLastSlash(buildPath(documentLibrary, recordCategory.getName(),
+ String recordFolderPath = removeLastSlash(buildPath(FILE_PLAN_PATH, recordCategory.getName(),
heldRecordFolder.getName()));
- String recordPath = removeLastSlash(buildPath(documentLibrary, recordCategory.getName(),
+ String recordPath = removeLastSlash(buildPath(FILE_PLAN_PATH, recordCategory.getName(),
recordFolder.getName(), heldRecord.getName()));
String contentPath = "/Company Home" + heldContent.getCmisLocation();
diff --git a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/base/BaseRMRestTest.java b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/base/BaseRMRestTest.java
index 037c6ce73d..a0224139a6 100644
--- a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/base/BaseRMRestTest.java
+++ b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/base/BaseRMRestTest.java
@@ -818,7 +818,7 @@ public class BaseRMRestTest extends RestTest
*/
protected boolean hasAspect(String nodeId, String aspectName) throws Exception
{
- return hasAspect(toFileModel(nodeId),aspectName);
+ return hasAspect(toFileModel(nodeId), aspectName);
}
/**
diff --git a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/base/TestData.java b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/base/TestData.java
index 38e27a327d..3b9b15add2 100644
--- a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/base/TestData.java
+++ b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/base/TestData.java
@@ -107,9 +107,4 @@ public interface TestData
* The default hold reason
*/
String HOLD_REASON = "Active content to be reviewed for the CASE McDermott, FINRA ";
-
- /**
- * Frozen aspect
- */
- String FROZEN_ASPECT = "rma:frozen";
}
diff --git a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/hold/AddToHoldsTests.java b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/hold/AddToHoldsTests.java
index 3803749525..80ee836651 100644
--- a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/hold/AddToHoldsTests.java
+++ b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/hold/AddToHoldsTests.java
@@ -26,12 +26,13 @@
*/
package org.alfresco.rest.rm.community.hold;
-import static org.alfresco.rest.rm.community.base.TestData.FROZEN_ASPECT;
+
import static org.alfresco.rest.rm.community.base.TestData.HOLD_DESCRIPTION;
import static org.alfresco.rest.rm.community.base.TestData.HOLD_REASON;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentAlias.FILE_PLAN_ALIAS;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentAlias.TRANSFERS_ALIAS;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentAlias.UNFILED_RECORDS_CONTAINER_ALIAS;
+import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentAspects.FROZEN_ASPECT;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentType.UNFILED_RECORD_FOLDER_TYPE;
import static org.alfresco.rest.rm.community.model.user.UserPermissions.PERMISSION_FILING;
import static org.alfresco.rest.rm.community.model.user.UserPermissions.PERMISSION_READ_RECORDS;
diff --git a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/hold/RemoveFromHoldsTests.java b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/hold/RemoveFromHoldsTests.java
index 78146056c3..38ac5c0163 100644
--- a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/hold/RemoveFromHoldsTests.java
+++ b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/hold/RemoveFromHoldsTests.java
@@ -28,9 +28,9 @@ package org.alfresco.rest.rm.community.hold;
import static java.util.Arrays.asList;
-import static org.alfresco.rest.rm.community.base.TestData.FROZEN_ASPECT;
import static org.alfresco.rest.rm.community.base.TestData.HOLD_DESCRIPTION;
import static org.alfresco.rest.rm.community.base.TestData.HOLD_REASON;
+import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentAspects.FROZEN_ASPECT;
import static org.alfresco.rest.rm.community.model.user.UserPermissions.PERMISSION_FILING;
import static org.alfresco.rest.rm.community.model.user.UserPermissions.PERMISSION_READ_RECORDS;
import static org.alfresco.rest.rm.community.model.user.UserRoles.ROLE_RM_MANAGER;
diff --git a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/records/FileRecordsTests.java b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/records/FileRecordsTests.java
index 98a7963406..08a6f7f829 100644
--- a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/records/FileRecordsTests.java
+++ b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/records/FileRecordsTests.java
@@ -31,6 +31,7 @@ import static org.alfresco.rest.rm.community.base.TestData.NONELECTRONIC_RECORD_
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentAlias.FILE_PLAN_ALIAS;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentAlias.TRANSFERS_ALIAS;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentAlias.UNFILED_RECORDS_CONTAINER_ALIAS;
+import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentAspects.RECORD_SEARCH_ASPECT;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentType.CONTENT_TYPE;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentType.NON_ELECTRONIC_RECORD_TYPE;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentType.UNFILED_RECORD_FOLDER_TYPE;
@@ -41,7 +42,7 @@ import static org.springframework.http.HttpStatus.CREATED;
import static org.springframework.http.HttpStatus.FORBIDDEN;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertFalse;
-import static org.testng.AssertJUnit.assertTrue;
+import static org.testng.Assert.assertTrue;
import org.alfresco.rest.rm.community.base.BaseRMRestTest;
import org.alfresco.rest.rm.community.model.record.Record;
@@ -50,10 +51,11 @@ import org.alfresco.rest.rm.community.model.record.RecordContent;
import org.alfresco.rest.rm.community.model.unfiledcontainer.UnfiledContainerChild;
import org.alfresco.rest.rm.community.model.unfiledcontainer.UnfiledContainerChildProperties;
import org.alfresco.rest.rm.community.requests.gscore.api.RecordFolderAPI;
-import org.alfresco.rest.rm.community.requests.gscore.api.RecordsAPI;
import org.alfresco.rest.rm.community.requests.gscore.api.UnfiledContainerAPI;
import org.alfresco.rest.rm.community.requests.gscore.api.UnfiledRecordFolderAPI;
+import org.alfresco.test.AlfrescoTest;
import org.alfresco.utility.report.Bug;
+import org.testng.annotations.BeforeClass;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
@@ -67,19 +69,35 @@ import org.testng.annotations.Test;
public class FileRecordsTests extends BaseRMRestTest
{
private UnfiledContainerChild electronicRecord = UnfiledContainerChild.builder()
- .name(ELECTRONIC_RECORD_NAME)
- .nodeType(CONTENT_TYPE)
- .content(RecordContent.builder().mimeType("text/plain").build())
- .build();
+ .name(ELECTRONIC_RECORD_NAME)
+ .nodeType(CONTENT_TYPE)
+ .content(RecordContent.builder().mimeType("text/plain").build())
+ .build();
private UnfiledContainerChild nonelectronicRecord = UnfiledContainerChild.builder()
- .properties(UnfiledContainerChildProperties.builder()
- .description(NONELECTRONIC_RECORD_NAME)
- .title("Title")
- .build())
- .name(NONELECTRONIC_RECORD_NAME)
- .nodeType(NON_ELECTRONIC_RECORD_TYPE)
- .build();
+ .properties(UnfiledContainerChildProperties.builder()
+ .description(NONELECTRONIC_RECORD_NAME)
+ .title("Title")
+ .build())
+ .name(NONELECTRONIC_RECORD_NAME)
+ .nodeType(NON_ELECTRONIC_RECORD_TYPE)
+ .build();
+
+ private String targetFolderId, folderToLink, closedFolderId, unfiledRecordFolderId;
+
+ @BeforeClass (alwaysRun = true)
+ public void setupFileRecordsTests() throws Exception
+ {
+ // create 3 record folders and close one of them
+ targetFolderId = createCategoryFolderInFilePlan().getId();
+ folderToLink = createCategoryFolderInFilePlan().getId();
+ closedFolderId = createCategoryFolderInFilePlan().getId();
+ closeFolder(closedFolderId);
+
+ // create one unfiled record folder
+ unfiledRecordFolderId = createUnfiledContainerChild(UNFILED_RECORDS_CONTAINER_ALIAS,
+ "Unfiled Folder " + getRandomAlphanumeric(), UNFILED_RECORD_FOLDER_TYPE).getId();
+ }
/**
* Invalid containers where electronic and non-electronic records can be filed
@@ -98,66 +116,63 @@ public class FileRecordsTests extends BaseRMRestTest
};
}
+ /**
+ * Returns the ids of unfiled electronic and non-electronic records from Unfiled Records container
+ */
+ @DataProvider (name = "unfiledRecordsFromUnfiledRecordsContainer")
+ public Object[][] getRecordsFromUnfiledRecordsContainer()
+ {
+ UnfiledContainerAPI unfiledContainersAPI = getRestAPIFactory().getUnfiledContainersAPI();
+ UnfiledContainerChild recordElectronic = unfiledContainersAPI.uploadRecord(electronicRecord,
+ UNFILED_RECORDS_CONTAINER_ALIAS, createTempFile(ELECTRONIC_RECORD_NAME, ELECTRONIC_RECORD_NAME));
+ UnfiledContainerChild recordNonElect = unfiledContainersAPI.createUnfiledContainerChild(nonelectronicRecord, UNFILED_RECORDS_CONTAINER_ALIAS);
+
+ return new String[][] {
+ { recordElectronic.getId()},
+ { recordNonElect.getId()}
+ };
+ }
+
+ /**
+ * Returns the ids of unfiled electronic and non-electronic records from an Unfiled Record Folder
+ */
+ @DataProvider (name = "unfiledRecordsFromUnfiledRecordFolder")
+ public Object[][] getRecordsFromUnfiledRecordFolder()
+ {
+ UnfiledRecordFolderAPI unfiledRecordFoldersAPI = getRestAPIFactory().getUnfiledRecordFoldersAPI();
+ UnfiledContainerChild recordElectronic = unfiledRecordFoldersAPI.uploadRecord(electronicRecord, unfiledRecordFolderId,
+ createTempFile(ELECTRONIC_RECORD_NAME, ELECTRONIC_RECORD_NAME));
+ UnfiledContainerChild recordNonElect = unfiledRecordFoldersAPI.createUnfiledRecordFolderChild(nonelectronicRecord, unfiledRecordFolderId);
+
+ return new String[][] {
+ { recordElectronic.getId()},
+ { recordNonElect.getId()}
+ };
+ }
+
/**
* Given an unfiled record in the root unfiled record container
* And an open record folder
* When I file the unfiled record into the record folder
* Then the record is filed
*/
- @Test
- public void fileRecordIntoExistingFolderFromUnfiledContainer() throws Exception
+ @Test (dataProvider = "unfiledRecordsFromUnfiledRecordsContainer")
+ @AlfrescoTest (jira = "RM-7060")
+ public void fileRecordFromUnfiledContainerToOpenFolder(String unfiledRecordId) throws Exception
{
- // get API instances
- RecordsAPI recordsAPI = getRestAPIFactory().getRecordsAPI();
-
- // create a record folder
- String folderId = createCategoryFolderInFilePlan().getId();
-
- // create records
- UnfiledContainerAPI unfiledContainersAPI = getRestAPIFactory().getUnfiledContainersAPI();
- UnfiledContainerChild recordElectronic = unfiledContainersAPI.uploadRecord(electronicRecord, UNFILED_RECORDS_CONTAINER_ALIAS,
- createTempFile(ELECTRONIC_RECORD_NAME, ELECTRONIC_RECORD_NAME));
- UnfiledContainerChild recordNonElect = unfiledContainersAPI.createUnfiledContainerChild(nonelectronicRecord, UNFILED_RECORDS_CONTAINER_ALIAS);
-
- // file the record into the folder created
- RecordBodyFile recordBodyFile = RecordBodyFile.builder().targetParentId(folderId).build();
- Record recordFiled = recordsAPI.fileRecord(recordBodyFile, recordElectronic.getId());
+ // file the record to the folder created
+ Record recordFiled = fileRecordToFolder(unfiledRecordId, targetFolderId);
// check the response status
assertStatusCode(CREATED);
// check the parent id for the record returned
- assertEquals(recordFiled.getParentId(),folderId);
+ assertEquals(recordFiled.getParentId(), targetFolderId);
- // check the record is filed into the record folder
- RecordFolderAPI recordFolderAPI = getRestAPIFactory().getRecordFolderAPI();
- assertTrue(recordFolderAPI.getRecordFolderChildren(folderId)
- .getEntries()
- .stream()
- .anyMatch(c -> c.getEntry().getId().equals(recordElectronic.getId())));
+ // check the record is filed to the record folder
+ assertTrue(isRecordChildOfRecordFolder(unfiledRecordId, targetFolderId), unfiledRecordId + " is not filed to " + targetFolderId);
// check the record doesn't exist into unfiled record container
- assertFalse(unfiledContainersAPI.getUnfiledContainerChildren(UNFILED_RECORDS_CONTAINER_ALIAS)
- .getEntries()
- .stream()
- .anyMatch(c -> c.getEntry().getId().equals(recordElectronic.getId())));
-
- // file the non-electronic record into the folder created
- Record nonElectRecordFiled = recordsAPI.fileRecord(recordBodyFile, recordNonElect.getId());
- // check the response status code
- assertStatusCode(CREATED);
- // check the parent id for the record returned
- assertEquals(nonElectRecordFiled.getParentId(), folderId);
-
- // check the record is added into the record folder
- assertTrue(recordFolderAPI.getRecordFolderChildren(folderId)
- .getEntries()
- .stream()
- .anyMatch(c -> c.getEntry().getId().equals(recordNonElect.getId())));
-
- // check the record doesn't exist into unfiled record container
- assertFalse(unfiledContainersAPI.getUnfiledContainerChildren(UNFILED_RECORDS_CONTAINER_ALIAS)
- .getEntries()
- .stream()
- .anyMatch(c -> c.getEntry().getId().equals(recordNonElect.getId())));
+ assertFalse(isRecordChildOfUnfiledContainer(unfiledRecordId), unfiledRecordId + " exists in Unfiled Records");
+ assertTrue(hasAspect(unfiledRecordId, RECORD_SEARCH_ASPECT), "recordSearch aspect is lost after filing!");
}
/**
@@ -166,62 +181,24 @@ public class FileRecordsTests extends BaseRMRestTest
* When I file the unfiled record into the record folder
* Then the record is filed
*/
- @Test
- public void fileRecordIntoExistingFolderFromUnfiledRecordFolder() throws Exception
+ @Test (dataProvider = "unfiledRecordsFromUnfiledRecordFolder")
+ @AlfrescoTest (jira = "RM-7060")
+ public void fileRecordFromUnfiledRecordFolderToOpenFolder(String unfiledRecordId) throws Exception
{
- // get API instances
- RecordsAPI recordsAPI = getRestAPIFactory().getRecordsAPI();
-
- // create a record folder
- String folderId = createCategoryFolderInFilePlan().getId();
-
- // create records
- UnfiledRecordFolderAPI unfiledRecordFoldersAPI = getRestAPIFactory().getUnfiledRecordFoldersAPI();
-
- String unfiledRecordFolderId = createUnfiledContainerChild(UNFILED_RECORDS_CONTAINER_ALIAS, "Unfiled Folder " + getRandomAlphanumeric(), UNFILED_RECORD_FOLDER_TYPE).getId();
-
- UnfiledContainerChild recordElectronic = unfiledRecordFoldersAPI.uploadRecord(electronicRecord, unfiledRecordFolderId, createTempFile(ELECTRONIC_RECORD_NAME, ELECTRONIC_RECORD_NAME));
- UnfiledContainerChild recordNonElect = unfiledRecordFoldersAPI.createUnfiledRecordFolderChild(nonelectronicRecord, unfiledRecordFolderId);
-
- // file the record into the folder created
- RecordBodyFile recordBodyFile = RecordBodyFile.builder().targetParentId(folderId).build();
- Record recordFiled = recordsAPI.fileRecord(recordBodyFile, recordElectronic.getId());
+ // file the record to the folder created
+ Record recordFiled = fileRecordToFolder(unfiledRecordId, targetFolderId);
// check the response status
assertStatusCode(CREATED);
// check the parent id for the record returned
- assertEquals(recordFiled.getParentId(),folderId);
+ assertEquals(recordFiled.getParentId(), targetFolderId);
- // check the record is filed into the record folder
- RecordFolderAPI recordFolderAPI = getRestAPIFactory().getRecordFolderAPI();
- assertTrue(recordFolderAPI.getRecordFolderChildren(folderId)
- .getEntries()
- .stream()
- .anyMatch(c -> c.getEntry().getId().equals(recordElectronic.getId())));
+ // check the record is filed to the record folder
+ assertTrue(isRecordChildOfRecordFolder(unfiledRecordId, targetFolderId), unfiledRecordId + " is not filed to " + targetFolderId);
// check the record doesn't exist into unfiled record folder
- assertFalse(unfiledRecordFoldersAPI.getUnfiledRecordFolderChildren(unfiledRecordFolderId)
- .getEntries()
- .stream()
- .anyMatch(c -> c.getEntry().getId().equals(recordElectronic.getId())));
-
- // file the non-electronic record into the folder created
- Record nonElectRecordFiled = recordsAPI.fileRecord(recordBodyFile, recordNonElect.getId());
- // check the response status code
- assertStatusCode(CREATED);
- // check the parent id for the record returned
- assertEquals(nonElectRecordFiled.getParentId(), folderId);
-
- // check the record is added into the record folder
- assertTrue(recordFolderAPI.getRecordFolderChildren(folderId)
- .getEntries()
- .stream()
- .anyMatch(c -> c.getEntry().getId().equals(recordNonElect.getId())));
-
- // check the record doesn't exist into unfiled record folder
- assertFalse(unfiledRecordFoldersAPI.getUnfiledRecordFolderChildren(unfiledRecordFolderId)
- .getEntries()
- .stream()
- .anyMatch(c -> c.getEntry().getId().equals(recordNonElect.getId())));
+ assertFalse(isRecordChildOfUnfiledRecordFolder(unfiledRecordId),
+ unfiledRecordId + " exists in " + unfiledRecordFolderId);
+ assertTrue(hasAspect(unfiledRecordId, RECORD_SEARCH_ASPECT), "recordSearch aspect is lost after filing!");
}
/**
@@ -231,55 +208,19 @@ public class FileRecordsTests extends BaseRMRestTest
* Then I get an unsupported operation exception
*
*/
- @Test
- public void fileRecordIntoCloseFolderFromUnfiledContainer() throws Exception
+ @Test (dataProvider = "unfiledRecordsFromUnfiledRecordsContainer")
+ public void fileRecordFromUnfiledContainerToClosedFolder(String unfiledRecordId)
{
- // get API instances
- RecordsAPI recordsAPI = getRestAPIFactory().getRecordsAPI();
-
- // create a record folder
- String folderId = createCategoryFolderInFilePlan().getId();
- closeFolder(folderId);
- // create records
- UnfiledContainerAPI unfiledContainersAPI = getRestAPIFactory().getUnfiledContainersAPI();
-
- UnfiledContainerChild recordElectronic = unfiledContainersAPI.uploadRecord(electronicRecord, UNFILED_RECORDS_CONTAINER_ALIAS, createTempFile(ELECTRONIC_RECORD_NAME, ELECTRONIC_RECORD_NAME));
- UnfiledContainerChild recordNonElect = unfiledContainersAPI.createUnfiledContainerChild(nonelectronicRecord, UNFILED_RECORDS_CONTAINER_ALIAS);
-
- // file the record into the folder created
- RecordBodyFile recordBodyFile = RecordBodyFile.builder().targetParentId(folderId).build();
- recordsAPI.fileRecord(recordBodyFile, recordElectronic.getId());
+ // file the record to the closed record folder
+ fileRecordToFolder(unfiledRecordId, closedFolderId);
// check the response status
assertStatusCode(FORBIDDEN);
- // check the record is not filed into the record folder
- RecordFolderAPI recordFolderAPI = getRestAPIFactory().getRecordFolderAPI();
- assertFalse(recordFolderAPI.getRecordFolderChildren(folderId)
- .getEntries()
- .stream()
- .anyMatch(c -> c.getEntry().getId().equals(recordElectronic.getId())));
+ // check the record is not filed to the record folder
+ assertFalse(isRecordChildOfRecordFolder(unfiledRecordId, closedFolderId), unfiledRecordId + " is filed to " + closedFolderId);
// check the record exist into unfiled record container
- assertTrue(unfiledContainersAPI.getUnfiledContainerChildren(UNFILED_RECORDS_CONTAINER_ALIAS)
- .getEntries()
- .stream()
- .anyMatch(c -> c.getEntry().getId().equals(recordElectronic.getId())));
-
- // file the non-electronic record into the folder created
- recordsAPI.fileRecord(recordBodyFile, recordNonElect.getId());
- // check the response status code
- assertStatusCode(FORBIDDEN);
-
- // check the record is not added into the record folder
- assertFalse(recordFolderAPI.getRecordFolderChildren(folderId)
- .getEntries()
- .stream()
- .anyMatch(c -> c.getEntry().getId().equals(recordNonElect.getId())));
-
- // check the record exist into unfiled record container
- assertTrue(unfiledContainersAPI.getUnfiledContainerChildren(UNFILED_RECORDS_CONTAINER_ALIAS)
- .getEntries().stream()
- .anyMatch(c -> c.getEntry().getId().equals(recordNonElect.getId())));
+ assertTrue(isRecordChildOfUnfiledContainer(unfiledRecordId), unfiledRecordId + " doesn't exist in Unfiled Records");
}
/**
@@ -289,56 +230,20 @@ public class FileRecordsTests extends BaseRMRestTest
* Then I get an unsupported operation exception
*
*/
- @Test
- public void fileRecordIntoCloseFolderFromUnfiledRecordFolder() throws Exception
+ @Test(dataProvider = "unfiledRecordsFromUnfiledRecordFolder")
+ public void fileRecordFromUnfiledRecordFolderToClosedFolder(String unfiledRecordId)
{
- // get API instances
- RecordsAPI recordsAPI = getRestAPIFactory().getRecordsAPI();
-
- // create a record folder
- String folderId = createCategoryFolderInFilePlan().getId();
- closeFolder(folderId);
- // create records
- UnfiledRecordFolderAPI unfiledRecordFoldersAPI = getRestAPIFactory().getUnfiledRecordFoldersAPI();
-
- String unfiledRecordFolderId = createUnfiledContainerChild(UNFILED_RECORDS_CONTAINER_ALIAS, "Unfiled Folder " + getRandomAlphanumeric(), UNFILED_RECORD_FOLDER_TYPE).getId();
- UnfiledContainerChild recordElectronic = unfiledRecordFoldersAPI.uploadRecord(electronicRecord, unfiledRecordFolderId, createTempFile(ELECTRONIC_RECORD_NAME, ELECTRONIC_RECORD_NAME));
- UnfiledContainerChild recordNonElect = unfiledRecordFoldersAPI.createUnfiledRecordFolderChild(nonelectronicRecord, unfiledRecordFolderId);
-
- // file the record into the folder created
- RecordBodyFile recordBodyFile = RecordBodyFile.builder().targetParentId(folderId).build();
- recordsAPI.fileRecord(recordBodyFile, recordElectronic.getId());
+ // file the record into the closed folder created
+ fileRecordToFolder(unfiledRecordId, closedFolderId);
// check the response status
assertStatusCode(FORBIDDEN);
// check the record is not filed into the record folder
- RecordFolderAPI recordFolderAPI = getRestAPIFactory().getRecordFolderAPI();
- assertFalse(recordFolderAPI.getRecordFolderChildren(folderId)
- .getEntries()
- .stream()
- .anyMatch(c -> c.getEntry().getId().equals(recordElectronic.getId())));
+ assertFalse(isRecordChildOfRecordFolder(unfiledRecordId, closedFolderId), unfiledRecordId + " is filed to " + closedFolderId);
// check the record exist into unfiled record folder
- assertTrue(unfiledRecordFoldersAPI.getUnfiledRecordFolderChildren(unfiledRecordFolderId)
- .getEntries()
- .stream()
- .anyMatch(c -> c.getEntry().getId().equals(recordElectronic.getId())));
-
- // file the non-electronic record into the folder created
- recordsAPI.fileRecord(recordBodyFile, recordNonElect.getId());
- // check the response status code
- assertStatusCode(FORBIDDEN);
-
- // check the record is not added into the record folder
- assertFalse(recordFolderAPI.getRecordFolderChildren(folderId)
- .getEntries()
- .stream()
- .anyMatch(c -> c.getEntry().getId().equals(recordNonElect.getId())));
-
- // check the record exist into unfiled record folder
- assertTrue(unfiledRecordFoldersAPI.getUnfiledRecordFolderChildren(unfiledRecordFolderId)
- .getEntries().stream()
- .anyMatch(c -> c.getEntry().getId().equals(recordNonElect.getId())));
+ assertTrue(isRecordChildOfUnfiledRecordFolder(unfiledRecordId),
+ unfiledRecordId + " doesn't exist in " + unfiledRecordFolderId);
}
/**
@@ -347,71 +252,34 @@ public class FileRecordsTests extends BaseRMRestTest
* When I file the filed record into the record folder
* Then the record is filed in both locations
*/
- @Test
- @Bug(id="RM-4578")
- public void linkRecordInto() throws Exception
+ @Test (dataProvider = "unfiledRecordsFromUnfiledRecordsContainer")
+ @Bug (id = "RM-4578")
+ public void linkRecordInto(String unfiledRecordId)
{
- // get API instances
- RecordsAPI recordsAPI = getRestAPIFactory().getRecordsAPI();
-
- // create a record folder
- String parentFolderId = createCategoryFolderInFilePlan().getId();
-
- // create records
- UnfiledContainerAPI unfiledContainersAPI = getRestAPIFactory().getUnfiledContainersAPI();
- UnfiledContainerChild recordElectronic = unfiledContainersAPI.uploadRecord(electronicRecord, UNFILED_RECORDS_CONTAINER_ALIAS, createTempFile(ELECTRONIC_RECORD_NAME, ELECTRONIC_RECORD_NAME));
- UnfiledContainerChild recordNonElect = unfiledContainersAPI.createUnfiledContainerChild(nonelectronicRecord, UNFILED_RECORDS_CONTAINER_ALIAS);
-
- // file the record into the folder created
- RecordBodyFile recordBodyFile = RecordBodyFile.builder().targetParentId(parentFolderId).build();
- Record recordFiled = recordsAPI.fileRecord(recordBodyFile, recordElectronic.getId());
- Record nonElectronicFiled = recordsAPI.fileRecord(recordBodyFile, recordNonElect.getId());
+ // file the record to the open folder created
+ Record recordFiled = fileRecordToFolder(unfiledRecordId, targetFolderId);
// check the response status
assertStatusCode(CREATED);
- // create the second folder
- String folderToLink = createCategoryFolderInFilePlan().getId();
- recordBodyFile = RecordBodyFile.builder().targetParentId(folderToLink).build();
-
- // check the response status
+ // link the record to the second folder
+ Record recordLink = fileRecordToFolder(unfiledRecordId, folderToLink);
assertStatusCode(CREATED);
- // link the electronic record
- Record recordLink = recordsAPI.fileRecord(recordBodyFile, recordElectronic.getId());
- assertTrue(recordLink.getParentId().equals(parentFolderId));
- // check the response status code
- assertStatusCode(CREATED);
- // link the nonelectronic record
- Record nonElectronicLink = recordsAPI.fileRecord(recordBodyFile, nonElectronicFiled.getId());
- assertStatusCode(CREATED);
- assertTrue(nonElectronicLink.getParentId().equals(parentFolderId));
+ assertTrue(recordLink.getParentId().equals(targetFolderId));
// check the record is added into the record folder
RecordFolderAPI recordFolderAPI = getRestAPIFactory().getRecordFolderAPI();
- assertTrue(recordFolderAPI.getRecordFolderChildren(parentFolderId)
- .getEntries()
- .stream()
- .anyMatch(c -> c.getEntry().getId().equals(recordFiled.getId()) &&
- c.getEntry().getParentId().equals(parentFolderId)));
+ assertTrue(recordFolderAPI.getRecordFolderChildren(targetFolderId)
+ .getEntries()
+ .stream()
+ .anyMatch(c -> c.getEntry().getId().equals(recordFiled.getId()) &&
+ c.getEntry().getParentId().equals(targetFolderId)));
- // check the record doesn't exist into unfiled record container
+ // check the record has a link in the second folder
assertTrue(recordFolderAPI.getRecordFolderChildren(folderToLink)
- .getEntries().stream()
- .anyMatch(c -> c.getEntry().getId().equals(recordFiled.getId()) &&
- c.getEntry().getParentId().equals(parentFolderId) &&
- !c.getEntry().getParentId().equals(folderToLink)));
- // check the record is added into the record folder
- assertTrue(recordFolderAPI.getRecordFolderChildren(parentFolderId)
- .getEntries()
- .stream()
- .anyMatch(c -> c.getEntry().getId().equals(nonElectronicFiled.getId()) &&
- c.getEntry().getParentId().equals(parentFolderId)));
-
- // check the record doesn't exist into unfiled record container
- assertTrue(recordFolderAPI.getRecordFolderChildren(folderToLink)
- .getEntries().stream()
- .anyMatch(c -> c.getEntry().getId().equals(nonElectronicFiled.getId()) &&
- c.getEntry().getParentId().equals(parentFolderId) &&
- !c.getEntry().getParentId().equals(folderToLink)));
+ .getEntries().stream()
+ .anyMatch(c -> c.getEntry().getId().equals(recordFiled.getId()) &&
+ c.getEntry().getParentId().equals(targetFolderId) &&
+ !c.getEntry().getParentId().equals(folderToLink)));
}
/**
@@ -425,24 +293,77 @@ public class FileRecordsTests extends BaseRMRestTest
dataProvider = "invalidContainersToFile",
description = "File the unfiled record to the container that is not a record folder"
)
- public void invalidContainerToFile(String containerId) throws Exception
+ public void invalidContainerToFile(String containerId)
{
- // get API instances
- RecordsAPI recordsAPI = getRestAPIFactory().getRecordsAPI();
-
// create records
UnfiledContainerAPI unfiledContainersAPI = getRestAPIFactory().getUnfiledContainersAPI();
UnfiledContainerChild recordElectronic = unfiledContainersAPI.uploadRecord(electronicRecord, UNFILED_RECORDS_CONTAINER_ALIAS, createTempFile(ELECTRONIC_RECORD_NAME, ELECTRONIC_RECORD_NAME));
UnfiledContainerChild recordNonElect = unfiledContainersAPI.createUnfiledContainerChild(nonelectronicRecord, UNFILED_RECORDS_CONTAINER_ALIAS);
- // file the record into the folder created
- RecordBodyFile recordBodyFile = RecordBodyFile.builder().targetParentId(containerId).build();
- recordsAPI.fileRecord(recordBodyFile, recordElectronic.getId());
+ // file the records to a container that is not a record folder
+ fileRecordToFolder(recordElectronic.getId(), containerId);
assertStatusCode(BAD_REQUEST);
- recordsAPI.fileRecord(recordBodyFile, recordNonElect.getId());
- // check the response status
+ fileRecordToFolder(recordNonElect.getId(), containerId);
assertStatusCode(BAD_REQUEST);
}
+
+ /**
+ * Files the given record in the target record folder.
+ *
+ * @param recordId the id of the record to be filed
+ * @param targetFolderId the id of the target record folder
+ */
+ private Record fileRecordToFolder(String recordId, String targetFolderId)
+ {
+ RecordBodyFile recordBodyFile = RecordBodyFile.builder().targetParentId(targetFolderId).build();
+ return getRestAPIFactory().getRecordsAPI().fileRecord(recordBodyFile, recordId);
+ }
+
+ /**
+ * Returns whether any child of the record folder match the provided record
+ *
+ * @param recordId the record id
+ * @param recordFolderId the record folder id
+ * @return true if any child of the record folder match the provided record, false otherwise
+ */
+ private boolean isRecordChildOfRecordFolder(String recordId, String recordFolderId)
+ {
+ return getRestAPIFactory().getRecordFolderAPI()
+ .getRecordFolderChildren(recordFolderId)
+ .getEntries()
+ .stream()
+ .anyMatch(c -> c.getEntry().getId().equals(recordId));
+ }
+
+ /**
+ * Returns whether any child of the unfiled record folder match the provided record
+ *
+ * @param recordId the record id
+ * @return true if any child of the unfiled record folder match the provided record, false otherwise
+ */
+ private boolean isRecordChildOfUnfiledRecordFolder(String recordId)
+ {
+ return getRestAPIFactory().getUnfiledRecordFoldersAPI()
+ .getUnfiledRecordFolderChildren(unfiledRecordFolderId)
+ .getEntries()
+ .stream()
+ .anyMatch(c -> c.getEntry().getId().equals(recordId));
+ }
+
+ /**
+ * Returns whether any child of the unfiled container match the provided record
+ *
+ * @param recordId the record id
+ * @return true if any child of the unfiled container match the provided record, false otherwise
+ */
+ private boolean isRecordChildOfUnfiledContainer(String recordId)
+ {
+ return getRestAPIFactory().getUnfiledContainersAPI()
+ .getUnfiledContainerChildren(UNFILED_RECORDS_CONTAINER_ALIAS)
+ .getEntries()
+ .stream()
+ .anyMatch(c -> c.getEntry().getId().equals(recordId));
+ }
}
diff --git a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/records/MoveRecordsTests.java b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/records/MoveRecordsTests.java
new file mode 100644
index 0000000000..fbc5017632
--- /dev/null
+++ b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/records/MoveRecordsTests.java
@@ -0,0 +1,63 @@
+/*
+ * #%L
+ * Alfresco Records Management Module
+ * %%
+ * Copyright (C) 2005 - 2019 Alfresco Software Limited
+ * %%
+ * This file is part of the Alfresco software.
+ * -
+ * If the software was purchased under a paid Alfresco license, the terms of
+ * the paid license agreement will prevail. Otherwise, the software is
+ * provided under the following open source license terms:
+ * -
+ * Alfresco is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * -
+ * Alfresco is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ * -
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Alfresco. If not, see .
+ * #L%
+ */
+package org.alfresco.rest.rm.community.records;
+
+import static org.alfresco.rest.rm.community.base.TestData.ELECTRONIC_RECORD_NAME;
+import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentAspects.RECORD_SEARCH_ASPECT;
+import static org.alfresco.rest.rm.community.utils.CoreUtil.createBodyForMoveCopy;
+import static org.alfresco.rest.rm.community.utils.CoreUtil.toContentModel;
+import static org.alfresco.utility.report.log.Step.STEP;
+import static org.springframework.http.HttpStatus.OK;
+import static org.testng.Assert.assertTrue;
+
+import org.alfresco.rest.rm.community.base.BaseRMRestTest;
+import org.alfresco.test.AlfrescoTest;
+import org.testng.annotations.Test;
+
+/**
+ * Move records tests
+ *
+ * @author Claudia Agache
+ * @since 3.3
+ */
+public class MoveRecordsTests extends BaseRMRestTest
+{
+ @Test (description = "rma:recordSearch aspect is reapplied after record move")
+ @AlfrescoTest (jira = "RM-7060")
+ public void moveRecord() throws Exception
+ {
+ String parentFolderId = createCategoryFolderInFilePlan().getId();
+ String targetFolderId = createCategoryFolderInFilePlan().getId();
+ String electronicRecordId = createElectronicRecord(parentFolderId, ELECTRONIC_RECORD_NAME).getId();
+ STEP("Move record from one folder to the other");
+ getRestAPIFactory().getNodeAPI(toContentModel(electronicRecordId)).move(createBodyForMoveCopy(targetFolderId));
+ assertStatusCode(OK);
+
+ STEP("Check the record still has rma:recordSearch aspect.");
+ assertTrue(hasAspect(electronicRecordId, RECORD_SEARCH_ASPECT), "recordSearch aspect is lost after move!");
+ }
+}
diff --git a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/utils/RMSiteUtil.java b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/utils/RMSiteUtil.java
index 80062165ca..52e9eeadd7 100644
--- a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/utils/RMSiteUtil.java
+++ b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/utils/RMSiteUtil.java
@@ -49,6 +49,7 @@ public class RMSiteUtil
public static final String RM_ID = "rm";
public static final String RM_TITLE = "Records Management";
public static final String RM_DESCRIPTION = "Records Management Site";
+ public static final String FILE_PLAN_PATH = "/rm/documentLibrary";
/**
* Creates an RM Site model for the given compliance, title and description
diff --git a/rm-community/pom.xml b/rm-community/pom.xml
index 305784b1cf..05f7fbd645 100644
--- a/rm-community/pom.xml
+++ b/rm-community/pom.xml
@@ -75,8 +75,8 @@
5.1.8.RELEASE
- 6.1.2-ga
- 6.1.0
+ 6.2.0-ga
+ 6.2.0true
diff --git a/rm-community/rm-community-repo/.env b/rm-community/rm-community-repo/.env
index 909bd225ba..06ce42f8df 100644
--- a/rm-community/rm-community-repo/.env
+++ b/rm-community/rm-community-repo/.env
@@ -1,3 +1,6 @@
-SOLR6_TAG=1.1.1
-POSTGRES_TAG=10.1
-ACTIVEMQ_TAG=5.15.6
\ No newline at end of file
+TRANSFORMERS_TAG=2.1.0
+SOLR6_TAG=1.4.0
+POSTGRES_TAG=11.4
+ACTIVEMQ_TAG=5.15.8
+LEGACY_TRANSFORM_SERVICE_ENABLED=true
+LOCAL_TRANSFORM_SERVICE_ENABLED=true
\ No newline at end of file
diff --git a/rm-community/rm-community-repo/Dockerfile b/rm-community/rm-community-repo/Dockerfile
index 37cb97c1bc..3baa1cdb53 100644
--- a/rm-community/rm-community-repo/Dockerfile
+++ b/rm-community/rm-community-repo/Dockerfile
@@ -1,4 +1,9 @@
-FROM alfresco/alfresco-content-repository-community:6.1.2-ga
+### Apply AGS community repo AMP to ACS image
+FROM alfresco/alfresco-content-repository-community:6.2.0-ga
+
+# Alfresco user does not have permissions to modify webapps or configuration. Switch to root.
+# The access will be fixed after all operations are done.
+USER root
COPY target/alfresco-governance-services-community-repo-*.amp /usr/local/tomcat/amps/
@@ -10,4 +15,13 @@ COPY target/gs-api-explorer-*.war /usr/local/tomcat/webapps/
### Unpack gs-api-explorer.war
RUN mkdir /usr/local/tomcat/webapps/gs-api-explorer && cd /usr/local/tomcat/webapps/gs-api-explorer && \
- jar -xvf /usr/local/tomcat/webapps/gs-api-explorer-*.war && rm -f /usr/local/tomcat/webapps/gs-api-explorer-*.war
\ No newline at end of file
+ jar -xvf /usr/local/tomcat/webapps/gs-api-explorer-*.war && rm -f /usr/local/tomcat/webapps/gs-api-explorer-*.war
+
+# All files in the tomcat folder must be owned by root user and Alfresco group as mentioned in the parent Dockerfile
+RUN chgrp -R Alfresco /usr/local/tomcat && \
+ find /usr/local/tomcat/webapps -type d -exec chmod 0750 {} \; && \
+ find /usr/local/tomcat/webapps -type f -exec chmod 0640 {} \; && \
+ chmod -R g+r /usr/local/tomcat/webapps
+
+# Switching back to alfresco user after having added amps files to run the container as non-root
+USER alfresco
\ No newline at end of file
diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/model/recordsModel.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/model/recordsModel.xml
index ba86812519..a667c393da 100644
--- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/model/recordsModel.xml
+++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/model/recordsModel.xml
@@ -732,6 +732,10 @@
Saved search
+
+ Disposition processed
+
+
Vital Record Definition
diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/patch/rm-patch-v24-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/patch/rm-patch-v24-context.xml
index d1e70ff98f..e263b4aa28 100644
--- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/patch/rm-patch-v24-context.xml
+++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/patch/rm-patch-v24-context.xml
@@ -16,5 +16,5 @@
-
+
\ No newline at end of file
diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/query/rm-common-SqlMap.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/query/rm-common-SqlMap.xml
index 457b70432e..766842f0a8 100644
--- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/query/rm-common-SqlMap.xml
+++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/query/rm-common-SqlMap.xml
@@ -3,16 +3,30 @@
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
+
+
select
p.node_id
from
@@ -55,5 +69,19 @@
+
+ select alfn.id , alfs.protocol, alfs.identifier, alfn.uuid
+ from alf_node alfn, alf_store alfs
+ where alfn.id not in (
+ select node_id
+ from alf_node_aspects
+ where qname_id = ? )
+ and type_qname_id = ?
+ and alfn.store_id = alfs.id
+ and alfn.id between ? and ?
+
-
\ No newline at end of file
+
+
diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-webscript-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-webscript-context.xml
index a009fc60bc..aa823d1f99 100644
--- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-webscript-context.xml
+++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-webscript-context.xml
@@ -680,4 +680,21 @@
parent="rmBaseWebscript">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/security/rm-method-security.properties b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/security/rm-method-security.properties
index 1cc4f3e5c2..8c9bd9a7e8 100644
--- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/security/rm-method-security.properties
+++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/security/rm-method-security.properties
@@ -38,7 +38,7 @@ rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.getChildByName
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.getChildrenByName=RM.Read.0,AFTER_RM.FilterNode
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.getPrimaryParent=RM.Read.0
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.createAssociation=RM.Assoc.0.1
-rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.removeAssociation=Assoc.0.1
+rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.removeAssociation=RM.Assoc.0.1
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.getTargetAssocs=RM.Read.0
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.getSourceAssocs=RM.Read.0
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.getAssoc=RM.Read.0
diff --git a/rm-community/rm-community-repo/config/alfresco/templates/webscripts/org/alfresco/repository/schedules/rm-updaterecordschedule.get.desc.xml b/rm-community/rm-community-repo/config/alfresco/templates/webscripts/org/alfresco/repository/schedules/rm-updaterecordschedule.get.desc.xml
new file mode 100644
index 0000000000..8ff54084a0
--- /dev/null
+++ b/rm-community/rm-community-repo/config/alfresco/templates/webscripts/org/alfresco/repository/schedules/rm-updaterecordschedule.get.desc.xml
@@ -0,0 +1,13 @@
+
+ Updates Record Schedules based on Hierarchical Retention Instructions
+
+ URL parameter maxRecordFolders is optional, and represents the maximum number of record folders that should be processed. If not specified maxRecordFolders will be set to the max value for an integer.
+ URL parameter recordFolder is optional, and represents the nodeRef of a record folder whose records should be processed. If specified then maxRecordFolders will be ignored.
+ ]]>
+
+ /api/rm/rm-updateRecordSchedule?maxRecordFolders={maxRecordFolders?}&recordFolder={recordFolder?}
+ argument
+ admin
+ required
+
\ No newline at end of file
diff --git a/rm-community/rm-community-repo/config/alfresco/templates/webscripts/org/alfresco/repository/schedules/rm-updaterecordschedule.get.json.ftl b/rm-community/rm-community-repo/config/alfresco/templates/webscripts/org/alfresco/repository/schedules/rm-updaterecordschedule.get.json.ftl
new file mode 100644
index 0000000000..2b395291a4
--- /dev/null
+++ b/rm-community/rm-community-repo/config/alfresco/templates/webscripts/org/alfresco/repository/schedules/rm-updaterecordschedule.get.json.ftl
@@ -0,0 +1,30 @@
+<#--
+ #%L
+ Alfresco Records Management Module
+ %%
+ Copyright (C) 2005 - 2019 Alfresco Software Limited
+ %%
+ This file is part of the Alfresco software.
+ -
+ If the software was purchased under a paid Alfresco license, the terms of
+ the paid license agreement will prevail. Otherwise, the software is
+ provided under the following open source license terms:
+ -
+ Alfresco is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+ -
+ Alfresco is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+ -
+ You should have received a copy of the GNU Lesser General Public License
+ along with Alfresco. If not, see .
+ #L%
+-->
+{
+ "responsestatus" : "${responsestatus?json_string}",
+ "message" : "${message?json_string}"
+}
diff --git a/rm-community/rm-community-repo/docker-compose.yml b/rm-community/rm-community-repo/docker-compose.yml
index 44fffaf8a5..b238557bbc 100644
--- a/rm-community/rm-community-repo/docker-compose.yml
+++ b/rm-community/rm-community-repo/docker-compose.yml
@@ -22,21 +22,71 @@ services:
-Dindex.subsystem.name=solr6
-Dalfresco.restApi.basicAuthScheme=true
-Dimap.server.enabled=true
+ -Dimap.server.port=1143
-Dftp.enabled=true
+ -Dftp.port=1221
-Dftp.dataPortFrom=30000
-Dftp.dataPortTo=30099
-Dshare.host=localhost
-Daos.baseUrlOverwrite=http://localhost:8080/alfresco/aos
-Dmessaging.broker.url=\"failover:(tcp://activemq:61616)?timeout=3000&jms.useCompression=true\"
+
+ -Dlocal.transform.service.enabled=${LOCAL_TRANSFORM_SERVICE_ENABLED}
+ -DlocalTransform.pdfrenderer.url=http://alfresco-pdf-renderer:8090/
+ -DlocalTransform.imagemagick.url=http://imagemagick:8090/
+ -DlocalTransform.libreoffice.url=http://libreoffice:8090/
+ -DlocalTransform.tika.url=http://tika:8090/
+ -DlocalTransform.misc.url=http://transform-misc:8090/
+
+ -Dlegacy.transform.service.enabled=${LEGACY_TRANSFORM_SERVICE_ENABLED}
+ -Dalfresco-pdf-renderer.url=http://alfresco-pdf-renderer:8090/
+ -Djodconverter.url=http://libreoffice:8090/
+ -Dimg.url=http://imagemagick:8090/
+ -Dtika.url=http://tika:8090/
+ -Dtransform.misc.url=http://transform-misc:8090/
"
ports:
- 8080:8080
- 8000:8000
- - 445:445
- - 143:143
- - "21:21"
+ - 1143:1143
+ - "21:1221"
- "30000-30099:30000-30099"
+ alfresco-pdf-renderer:
+ image: alfresco/alfresco-pdf-renderer:${TRANSFORMERS_TAG}
+ environment:
+ JAVA_OPTS: " -Xms256m -Xmx256m"
+ ports:
+ - 8090:8090
+
+ imagemagick:
+ image: alfresco/alfresco-imagemagick:${TRANSFORMERS_TAG}
+ environment:
+ JAVA_OPTS: " -Xms256m -Xmx256m"
+ ports:
+ - 8091:8090
+
+ libreoffice:
+ image: alfresco/alfresco-libreoffice:${TRANSFORMERS_TAG}
+ environment:
+ JAVA_OPTS: " -Xms256m -Xmx256m"
+ ports:
+ - 8092:8090
+
+ tika:
+ image: alfresco/alfresco-tika:${TRANSFORMERS_TAG}
+ environment:
+ JAVA_OPTS: " -Xms256m -Xmx256m"
+ ports:
+ - 8093:8090
+
+ transform-misc:
+ image: alfresco/alfresco-transform-misc:${TRANSFORMERS_TAG}
+ environment:
+ JAVA_OPTS: " -Xms256m -Xmx256m"
+ ports:
+ - 8094:8090
+
postgres:
image: library/postgres:${POSTGRES_TAG}
environment:
@@ -57,6 +107,8 @@ services:
- SOLR_SOLR_PORT=8983
#Create the default alfresco and archive cores
- SOLR_CREATE_ALFRESCO_DEFAULTS=alfresco,archive
+ #HTTP by default
+ - ALFRESCO_SECURE_COMMS=none
ports:
- 8083:8983 #Browser port
diff --git a/rm-community/rm-community-repo/pom.xml b/rm-community/rm-community-repo/pom.xml
index 5968476b59..518d1b549e 100644
--- a/rm-community/rm-community-repo/pom.xml
+++ b/rm-community/rm-community-repo/pom.xml
@@ -24,11 +24,11 @@
alfresco-platform9.1-901.jdbc4alfresco-governance-services-community-repo
-
- 7.5.1
- 7.33.12
- 7.34.1
- 6.1.0
+
+ 7.22
+ 7.134.1
+ 7.107.1
+ 6.2.0alfresco/alfresco-governance-repository-communityfalse
diff --git a/rm-community/rm-community-repo/source/compatibility/org/alfresco/module/org_alfresco_module_rm/caveat/RMCaveatConfigComponentImpl.java b/rm-community/rm-community-repo/source/compatibility/org/alfresco/module/org_alfresco_module_rm/caveat/RMCaveatConfigComponentImpl.java
index 079e5944a9..77f07fbbb3 100644
--- a/rm-community/rm-community-repo/source/compatibility/org/alfresco/module/org_alfresco_module_rm/caveat/RMCaveatConfigComponentImpl.java
+++ b/rm-community/rm-community-repo/source/compatibility/org/alfresco/module/org_alfresco_module_rm/caveat/RMCaveatConfigComponentImpl.java
@@ -27,7 +27,7 @@
package org.alfresco.module.org_alfresco_module_rm.caveat;
-import static org.apache.commons.lang.exception.ExceptionUtils.getFullStackTrace;
+import static org.apache.commons.lang3.exception.ExceptionUtils.getStackTrace;
import java.io.File;
import java.io.InputStream;
@@ -44,6 +44,7 @@ import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReadWriteLock;
import java.util.concurrent.locks.ReentrantReadWriteLock;
+import net.sf.acegisecurity.AccessDeniedException;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.model.ContentModel;
import org.alfresco.module.org_alfresco_module_rm.caveat.RMListOfValuesConstraint.MatchLogic;
@@ -81,8 +82,6 @@ import org.apache.commons.logging.LogFactory;
import org.json.JSONException;
import org.json.JSONObject;
-import net.sf.acegisecurity.AccessDeniedException;
-
/**
* RM Caveat Config component impl
*
@@ -1042,7 +1041,7 @@ public class RMCaveatConfigComponentImpl implements ContentServicePolicies.OnCon
sb.append("' to the JSONObject 'listMembers' '");
sb.append(listMembers);
sb.append("': ");
- sb.append(getFullStackTrace(error));
+ sb.append(getStackTrace(error));
throw new AlfrescoRuntimeException(sb.toString());
}
}
@@ -1061,7 +1060,7 @@ public class RMCaveatConfigComponentImpl implements ContentServicePolicies.OnCon
sb.append("' to the JSONObject 'configJSONObject' '");
sb.append(configJSONObject);
sb.append("': ");
- sb.append(getFullStackTrace(error));
+ sb.append(getStackTrace(error));
throw new AlfrescoRuntimeException(sb.toString());
}
}
diff --git a/rm-community/rm-community-repo/source/compatibility/org/alfresco/module/org_alfresco_module_rm/caveat/RMListOfValuesConstraint.java b/rm-community/rm-community-repo/source/compatibility/org/alfresco/module/org_alfresco_module_rm/caveat/RMListOfValuesConstraint.java
index a3e03633d8..6b6392e4cf 100644
--- a/rm-community/rm-community-repo/source/compatibility/org/alfresco/module/org_alfresco_module_rm/caveat/RMListOfValuesConstraint.java
+++ b/rm-community/rm-community-repo/source/compatibility/org/alfresco/module/org_alfresco_module_rm/caveat/RMListOfValuesConstraint.java
@@ -39,7 +39,7 @@ import org.alfresco.service.cmr.dictionary.ConstraintException;
import org.alfresco.service.cmr.i18n.MessageLookup;
import org.alfresco.service.cmr.repository.datatype.DefaultTypeConverter;
import org.alfresco.service.cmr.repository.datatype.TypeConversionException;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
import org.springframework.extensions.surf.util.I18NUtil;
/**
diff --git a/rm-community/rm-community-repo/source/compatibility/org/alfresco/module/org_alfresco_module_rm/caveat/ScriptConstraint.java b/rm-community/rm-community-repo/source/compatibility/org/alfresco/module/org_alfresco_module_rm/caveat/ScriptConstraint.java
index 3e815afe1e..f982d64938 100644
--- a/rm-community/rm-community-repo/source/compatibility/org/alfresco/module/org_alfresco_module_rm/caveat/ScriptConstraint.java
+++ b/rm-community/rm-community-repo/source/compatibility/org/alfresco/module/org_alfresco_module_rm/caveat/ScriptConstraint.java
@@ -36,7 +36,7 @@ import java.util.Map;
import java.util.Set;
import org.alfresco.service.cmr.security.AuthorityService;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
import org.json.JSONArray;
import org.json.JSONObject;
diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/action/RMActionExecuterAbstractBase.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/action/RMActionExecuterAbstractBase.java
index 95d5a24161..b95992db39 100644
--- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/action/RMActionExecuterAbstractBase.java
+++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/action/RMActionExecuterAbstractBase.java
@@ -27,7 +27,7 @@
package org.alfresco.module.org_alfresco_module_rm.action;
-import static org.apache.commons.lang.StringUtils.leftPad;
+import static org.apache.commons.lang3.StringUtils.leftPad;
import java.io.Serializable;
import java.util.HashSet;
@@ -683,7 +683,7 @@ public abstract class RMActionExecuterAbstractBase extends PropertySubActionExe
*
* @return padded string or the original if already at >= len characters
*
- * @deprecated As of 2.1, replaced by {@link org.apache.commons.lang.StringUtils#leftPad(String, int)}
+ * @deprecated As of 2.1, replaced by {@link org.apache.commons.lang3.StringUtils#leftPad(String, int)}
*/
@Deprecated
protected String padString(String s, int len)
diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/action/dm/MoveDmRecordAction.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/action/dm/MoveDmRecordAction.java
index fb65327c18..24a4326005 100644
--- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/action/dm/MoveDmRecordAction.java
+++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/action/dm/MoveDmRecordAction.java
@@ -37,7 +37,7 @@ import org.alfresco.service.cmr.action.Action;
import org.alfresco.service.cmr.action.ParameterDefinition;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/action/impl/DestroyAction.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/action/impl/DestroyAction.java
index c7aee5f05b..1cf101301c 100644
--- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/action/impl/DestroyAction.java
+++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/action/impl/DestroyAction.java
@@ -43,7 +43,7 @@ import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.security.AccessStatus;
import org.alfresco.service.cmr.version.Version;
import org.alfresco.service.namespace.QName;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
/**
* Destroy action.
diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/action/impl/EditHoldReasonAction.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/action/impl/EditHoldReasonAction.java
index 7eb3c05e9d..02661a5865 100644
--- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/action/impl/EditHoldReasonAction.java
+++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/action/impl/EditHoldReasonAction.java
@@ -31,7 +31,7 @@ import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.module.org_alfresco_module_rm.action.RMActionExecuterAbstractBase;
import org.alfresco.service.cmr.action.Action;
import org.alfresco.service.cmr.repository.NodeRef;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
import org.springframework.extensions.surf.util.I18NUtil;
/**
diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/action/impl/FileReportAction.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/action/impl/FileReportAction.java
index 5b1b0e7539..46ed9fec50 100644
--- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/action/impl/FileReportAction.java
+++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/action/impl/FileReportAction.java
@@ -42,7 +42,7 @@ import org.alfresco.service.cmr.action.Action;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.security.AccessStatus;
import org.alfresco.service.namespace.QName;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
import org.springframework.extensions.surf.util.I18NUtil;
/**
diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/action/impl/RequestInfoAction.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/action/impl/RequestInfoAction.java
index d78f65f985..35022d36d6 100644
--- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/action/impl/RequestInfoAction.java
+++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/action/impl/RequestInfoAction.java
@@ -45,7 +45,7 @@ import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.workflow.WorkflowService;
import org.alfresco.service.namespace.QName;
import org.alfresco.workflow.RMWorkflowModel;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/action/impl/SplitEmailAction.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/action/impl/SplitEmailAction.java
index 5606f27424..a5abd3d9ab 100644
--- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/action/impl/SplitEmailAction.java
+++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/action/impl/SplitEmailAction.java
@@ -27,7 +27,7 @@
package org.alfresco.module.org_alfresco_module_rm.action.impl;
-import static org.apache.commons.lang.StringUtils.isBlank;
+import static org.apache.commons.lang3.StringUtils.isBlank;
import java.io.IOException;
import java.io.InputStream;
diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/audit/RecordsManagementAuditServiceImpl.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/audit/RecordsManagementAuditServiceImpl.java
index f309c0a8ce..f78f5f2f8b 100644
--- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/audit/RecordsManagementAuditServiceImpl.java
+++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/audit/RecordsManagementAuditServiceImpl.java
@@ -33,6 +33,7 @@ import static org.alfresco.model.ContentModel.PROP_USERNAME;
import static org.alfresco.module.org_alfresco_module_rm.audit.event.UserGroupMembershipUtils.PARENT_GROUP;
import static org.alfresco.module.org_alfresco_module_rm.dod5015.DOD5015Model.TYPE_DOD_5015_SITE;
import static org.alfresco.module.org_alfresco_module_rm.model.rma.type.RmSiteType.DEFAULT_SITE_NAME;
+import static org.apache.commons.lang3.StringEscapeUtils.escapeHtml4;
import static org.apache.commons.lang3.StringUtils.isBlank;
import java.io.BufferedWriter;
@@ -95,8 +96,7 @@ import org.alfresco.util.PropertyCheck;
import org.alfresco.util.PropertyMap;
import org.alfresco.util.TempFileProvider;
import org.alfresco.util.transaction.TransactionListenerAdapter;
-import org.apache.commons.lang.StringEscapeUtils;
-import org.apache.commons.lang.time.DateUtils;
+import org.apache.commons.lang3.time.DateUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.json.JSONArray;
@@ -140,6 +140,7 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
protected static final String RM_AUDIT_SNIPPET_CHANGES = "/changes";
protected static final String RM_AUDIT_SNIPPET_BEFORE = "/before";
protected static final String RM_AUDIT_SNIPPET_AFTER = "/after";
+ protected static final String RM_AUDIT_SITES_PATH = "/Sites";
protected static final String RM_AUDIT_DATA_PERSON_FULLNAME = "/RM/event/person/fullName";
protected static final String RM_AUDIT_DATA_PERSON_ROLES = "/RM/event/person/roles";
@@ -1159,29 +1160,29 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
writer.write("From:");
writer.write("");
Date from = params.getDateFrom();
- writer.write(from == null ? "<Not Set>" : StringEscapeUtils.escapeHtml(from.toString()));
+ writer.write(from == null ? "<Not Set>" : escapeHtml4(from.toString()));
writer.write("");
writer.write("To:");
writer.write("");
Date to = params.getDateTo();
- writer.write(to == null ? "<Not Set>" : StringEscapeUtils.escapeHtml(to.toString()));
+ writer.write(to == null ? "<Not Set>" : escapeHtml4(to.toString()));
writer.write("");
writer.write("Property:");
writer.write("");
QName prop = params.getProperty();
- writer.write(prop == null ? "All" : StringEscapeUtils.escapeHtml(getPropertyLabel(prop)));
+ writer.write(prop == null ? "All" : escapeHtml4(getPropertyLabel(prop)));
writer.write("");
writer.write("User:");
writer.write("");
- writer.write(params.getUser() == null ? "All" : StringEscapeUtils.escapeHtml(params.getUser()));
+ writer.write(params.getUser() == null ? "All" : escapeHtml4(params.getUser()));
writer.write("");
writer.write("Event:");
writer.write("");
- writer.write(params.getEvent() == null ? "All" : StringEscapeUtils.escapeHtml(getAuditEventLabel(params.getEvent())));
+ writer.write(params.getEvent() == null ? "All" : escapeHtml4(getAuditEventLabel(params.getEvent())));
writer.write("\n");
writer.write("\n");
@@ -1223,26 +1224,26 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
writer.write("