diff --git a/rm-automation/rm-automation-community-rest-api/pom.xml b/rm-automation/rm-automation-community-rest-api/pom.xml
index da97092f1a..4b176d02ee 100644
--- a/rm-automation/rm-automation-community-rest-api/pom.xml
+++ b/rm-automation/rm-automation-community-rest-api/pom.xml
@@ -14,6 +14,8 @@
alfresco-rm-community-share
alfresco-rm-community-repo
+ 5.2.0-0
+ 2.0.0
@@ -34,18 +36,18 @@
org.alfresco.tas
restapi-test
- 2.0.0
+ ${tas.restapi.version}
org.alfresco.tas
restapi-test
- 2.0.0
+ ${tas.restapi.version}
test-jar
org.jglue.fluent-json
fluent-json
- 2.0.0
+ ${fluent.json.version}
org.projectlombok
diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/model/fileplancomponents/FilePlanComponent.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/model/fileplancomponents/FilePlanComponent.java
index f7f47bf22c..ff010b222e 100644
--- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/model/fileplancomponents/FilePlanComponent.java
+++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/model/fileplancomponents/FilePlanComponent.java
@@ -93,6 +93,7 @@ public class FilePlanComponent
@JsonProperty (value = ALLOWABLE_OPERATIONS)
private List allowableOperations;
+
private FilePlanComponentPath path;
@JsonProperty (required = true)
diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/util/PojoUtility.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/util/PojoUtility.java
index ede5960c17..7ecb945d9c 100644
--- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/util/PojoUtility.java
+++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/util/PojoUtility.java
@@ -58,13 +58,16 @@ public class PojoUtility
//return the json object
return mapper.writerWithDefaultPrettyPrinter().writeValueAsString(model);
- } catch (JsonGenerationException e)
+ }
+ catch (JsonGenerationException e)
{
return e.toString();
- } catch (JsonMappingException e)
+ }
+ catch (JsonMappingException e)
{
return e.toString();
- } catch (IOException e)
+ }
+ catch (IOException e)
{
return e.toString();
}
diff --git a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/base/BaseRestTest.java b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/base/BaseRestTest.java
index 0df7427158..71b590dbb6 100644
--- a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/base/BaseRestTest.java
+++ b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/base/BaseRestTest.java
@@ -61,7 +61,8 @@ import org.testng.annotations.BeforeClass;
* @since 2.6
*/
@Configuration
-@PropertySource("classpath:default.properties")
+@PropertySource(value = {"classpath:default.properties", "classpath:config.properties"})
+@PropertySource(value = "classpath:module.properties", ignoreResourceNotFound = true)
@PropertySource(value = "classpath:local.properties", ignoreResourceNotFound = true)
public class BaseRestTest extends RestTest
{
@@ -121,7 +122,7 @@ public class BaseRestTest extends RestTest
rmSiteAPI.usingRestWrapper().authenticateUser(dataUser.getAdminUser());
// Create the RM site
- RMSite rmSite= new RMSite(RM_TITLE, RM_DESCRIPTION, STANDARD);
+ RMSite rmSite = new RMSite(RM_TITLE, RM_DESCRIPTION, STANDARD);
rmSiteAPI.createRMSite(rmSite);
// Verify the status code
diff --git a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/fileplancomponents/FilePlanTests.java b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/fileplancomponents/FilePlanTests.java
index ae7bf8729d..9280b306db 100644
--- a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/fileplancomponents/FilePlanTests.java
+++ b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/fileplancomponents/FilePlanTests.java
@@ -290,7 +290,7 @@ public class FilePlanTests extends BaseRestTest
dataProviderClass = TestData.class,
dataProvider = "getContainersAndTypes"
)
- @Bug(id="RM-4296")
+ @Bug(id = "RM-4296")
public void createFilePlanSpecialContainerWhenExists(FilePlanComponentAlias filePlanAlias, FilePlanComponentType rmType) throws Exception
{
// Create RM Site if doesn't exist
diff --git a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/fileplancomponents/RecordCategoryTest.java b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/fileplancomponents/RecordCategoryTest.java
index 139efa5b60..12e8c9ed28 100644
--- a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/fileplancomponents/RecordCategoryTest.java
+++ b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/fileplancomponents/RecordCategoryTest.java
@@ -359,7 +359,7 @@ public class RecordCategoryTest extends BaseRestTest
@Bug (id="RM-4367")
public void createTypesNotAllowedInCategory(String nodeType) throws Exception
{
- String COMPONENT_NAME="Component"+getRandomAlphanumeric();
+ String COMPONENT_NAME = "Component"+getRandomAlphanumeric();
// Authenticate with admin user
filePlanComponentAPI.usingRestWrapper().authenticateUser(dataUser.getAdminUser());
diff --git a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/fileplancomponents/RecordFolderTests.java b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/fileplancomponents/RecordFolderTests.java
index 30bcaddb81..4c7d836a43 100644
--- a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/fileplancomponents/RecordFolderTests.java
+++ b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/fileplancomponents/RecordFolderTests.java
@@ -91,7 +91,7 @@ public class RecordFolderTests extends BaseRestTest
String CATEGORY = CATEGORY_NAME + getRandomAlphanumeric();
// Authenticate with admin user
filePlanComponentAPI.usingRestWrapper().authenticateUser(dataUser.getAdminUser());
- FilePlanComponent filePlanComponent=createCategory(FILE_PLAN_ALIAS.toString(), CATEGORY);
+ FilePlanComponent filePlanComponent = createCategory(FILE_PLAN_ALIAS.toString(), CATEGORY);
FilePlanComponent recordFolder = FilePlanComponent.builder()
.name(FOLDER_NAME)
@@ -104,7 +104,7 @@ public class RecordFolderTests extends BaseRestTest
// Create the record folder
FilePlanComponent folder = filePlanComponentAPI.createFilePlanComponent(recordFolder, filePlanComponent.getId());
- //filePlanComponentAPI.createFilePlanComponent(recordFolderProperties, filePlanComponent.getId());
+
filePlanComponentAPI.usingRestWrapper().assertStatusCodeIs(CREATED);
// Check folder has been created within the category created
@@ -169,13 +169,13 @@ public class RecordFolderTests extends BaseRestTest
)
public void checkTheRecordFolderProperties() throws Exception
{
- String CATEGORY=CATEGORY_NAME + getRandomAlphanumeric();
+ String CATEGORY = CATEGORY_NAME + getRandomAlphanumeric();
// Authenticate with admin user
filePlanComponentAPI.usingRestWrapper().authenticateUser(dataUser.getAdminUser());
FilePlanComponent category = createCategory(FILE_PLAN_ALIAS.toString(), CATEGORY);
- FilePlanComponent folder =createFolder(category.getId(),FOLDER_NAME);
+ FilePlanComponent folder = createFolder(category.getId(),FOLDER_NAME);
- FilePlanComponent folderDetails=filePlanComponentAPI.withParams("include="+IS_CLOSED).getFilePlanComponent(folder.getId());
+ FilePlanComponent folderDetails = filePlanComponentAPI.withParams("include="+IS_CLOSED).getFilePlanComponent(folder.getId());
// Verify the returned properties for the file plan component - record folder
assertEquals(RECORD_FOLDER_TYPE.toString(),folderDetails.getNodeType());
@@ -216,9 +216,9 @@ public class RecordFolderTests extends BaseRestTest
// Create record category first
String folderDescription = "The folder description is updated" + getRandomAlphanumeric();
- String folderName= "The folder name is updated" + getRandomAlphanumeric();
+ String folderName = "The folder name is updated" + getRandomAlphanumeric();
String folderTitle = "Update title " + getRandomAlphanumeric();
- String location="Location"+getRandomAlphanumeric();
+ String location = "Location"+getRandomAlphanumeric();
//Create the file plan component properties to update
FilePlanComponent recordFolder = FilePlanComponent.builder()
@@ -247,7 +247,6 @@ public class RecordFolderTests extends BaseRestTest
assertNotNull(folderUpdated.getProperties().getReviewPeriod().getPeriodType());
assertNotNull(folderUpdated.getProperties().getReviewPeriod().getExpression());
-
}
/**
diff --git a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/site/RMSiteTests.java b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/site/RMSiteTests.java
index cec0621cae..417895d64f 100644
--- a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/site/RMSiteTests.java
+++ b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/site/RMSiteTests.java
@@ -96,7 +96,7 @@ public class RMSiteTests extends BaseRestTest
// Create the RM site
RMSite rmSite = new RMSite(RM_TITLE, RM_DESCRIPTION, STANDARD);
- RMSite rmSiteResponse=rmSiteAPI.createRMSite(rmSite);
+ RMSite rmSiteResponse = rmSiteAPI.createRMSite(rmSite);
// Verify the status code
rmSiteAPI.usingRestWrapper().assertStatusCodeIs(CREATED);
@@ -262,7 +262,7 @@ public class RMSiteTests extends BaseRestTest
public void updateRMSiteDetails()throws Exception
{
String NEW_TITLE = RM_TITLE + RandomData.getRandomAlphanumeric();
- String NEW_DESCRIPTION=RM_DESCRIPTION+ RandomData.getRandomAlphanumeric();
+ String NEW_DESCRIPTION = RM_DESCRIPTION+ RandomData.getRandomAlphanumeric();
// Authenticate with admin user
rmSiteAPI.usingRestWrapper().authenticateUser(dataUser.getAdminUser());
@@ -271,7 +271,7 @@ public class RMSiteTests extends BaseRestTest
createRMSiteIfNotExists();
//Create RM site model
- RMSite rmSiteToUpdate=new RMSite();
+ RMSite rmSiteToUpdate = new RMSite();
rmSiteToUpdate.setTitle(NEW_TITLE);
rmSiteToUpdate.setDescription(NEW_DESCRIPTION);
diff --git a/rm-automation/rm-automation-community-rest-api/src/test/resources/config.properties b/rm-automation/rm-automation-community-rest-api/src/test/resources/config.properties
new file mode 100644
index 0000000000..e376e2c0d3
--- /dev/null
+++ b/rm-automation/rm-automation-community-rest-api/src/test/resources/config.properties
@@ -0,0 +1,2 @@
+alfresco.server=localhost
+rest.rmPath=alfresco/api/-default-/public/ig/versions/1
\ No newline at end of file
diff --git a/rm-automation/rm-automation-community-rest-api/src/test/resources/default.properties b/rm-automation/rm-automation-community-rest-api/src/test/resources/default.properties
deleted file mode 100644
index 911f2a44fc..0000000000
--- a/rm-automation/rm-automation-community-rest-api/src/test/resources/default.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-#########################################################################
-# Original property values from default.properties #
-#########################################################################
-
-# Dataprep related
-alfresco.scheme=http
-alfresco.server=localhost
-alfresco.port=8080
-
-# Credentials
-admin.user=admin
-admin.password=admin
-
-# Rest related
-rest.basePath=alfresco/api/-default-/public/alfresco/versions/1
-rest.workflowPath=alfresco/api/-default-/public/workflow/versions/1
-
-# Database Section
-db.url = jdbc:mysql://${alfresco.server}:3306/alfresco
-db.username = alfresco
-db.password = alfresco
-
-#########################################################################
-
-rest.rmPath=alfresco/api/-default-/public/ig/versions/1
\ No newline at end of file