diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/FilePlanAPI.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/FilePlanAPI.java
index 2dc3978e1b..664e9d7d70 100644
--- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/FilePlanAPI.java
+++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/FilePlanAPI.java
@@ -77,7 +77,7 @@ public class FilePlanAPI extends RMModelRequest
* @param filePlanId The identifier of a file plan
* @param parameters The URL parameters to add
* @return The {@link FilePlan} for the given {@code filePlanId}
- * @throws Exception for the following cases:
+ * @throws RuntimeException for the following cases:
*
* - {@code filePlanId} is not a valid format
* - authentication fails
@@ -113,7 +113,7 @@ public class FilePlanAPI extends RMModelRequest
* @param filePlanId The identifier of a file plan
* @param parameters The URL parameters to add
* @return The {@link RecordCategoryCollection} for the given {@code filePlanId}
- * @throws Exception for the following cases:
+ * @throws RuntimeException for the following cases:
*
* - authentication fails
* - current user does not have permission to read {@code filePlanId}
@@ -177,7 +177,7 @@ public class FilePlanAPI extends RMModelRequest
/**
* see {@link #updateFilePlan(FilePlan, String, String)
*/
- public FilePlan updateFilePlan(FilePlan filePlanModel, String filePlanId) throws Exception
+ public FilePlan updateFilePlan(FilePlan filePlanModel, String filePlanId)
{
mandatoryObject("filePlanModel", filePlanModel);
mandatoryString("filePlanId", filePlanId);
@@ -191,7 +191,7 @@ public class FilePlanAPI extends RMModelRequest
* @param filePlanModel The file plan model which holds the information
* @param filePlanId The identifier of the file plan
* @param parameters The URL parameters to add
- * @throws Exception for the following cases:
+ * @throws RuntimeException for the following cases:
*
* - the update request is invalid or {@code filePlanId} is not a valid format or {@code filePlanModel} is invalid
* - authentication fails
@@ -200,7 +200,7 @@ public class FilePlanAPI extends RMModelRequest
* - model integrity exception, including file name with invalid characters
*
*/
- public FilePlan updateFilePlan(FilePlan filePlanModel, String filePlanId, String parameters) throws Exception
+ public FilePlan updateFilePlan(FilePlan filePlanModel, String filePlanId, String parameters)
{
mandatoryObject("filePlanModel", filePlanModel);
mandatoryString("filePlanId", filePlanId);
diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/FilesAPI.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/FilesAPI.java
index 10da1e0570..53d170f37f 100644
--- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/FilesAPI.java
+++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/FilesAPI.java
@@ -57,9 +57,9 @@ public class FilesAPI extends RMModelRequest
* @param fileId The Id of a file to declare as record
* @param parameters Request parameters, refer to API documentation for more details
* @return The {@link Record} for created record
- * @throws Exception for malformed JSON responses
+ * @throws RuntimeException for malformed JSON responses
*/
- public Record declareAsRecord(String fileId, String parameters) throws Exception
+ public Record declareAsRecord(String fileId, String parameters)
{
mandatoryString("fileId", fileId);
@@ -76,9 +76,9 @@ public class FilesAPI extends RMModelRequest
*
* @param fileId The Id of a file to declare as record
* @return The {@link Record} for created record
- * @throws Exception for malformed JSON responses
+ * @throws RuntimeException for malformed JSON responses
*/
- public Record declareAsRecord(String fileId) throws Exception
+ public Record declareAsRecord(String fileId)
{
mandatoryString("fileId", fileId);
diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/RMSiteAPI.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/RMSiteAPI.java
index 33bc4be116..e91b3c6a25 100644
--- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/RMSiteAPI.java
+++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/RMSiteAPI.java
@@ -62,7 +62,7 @@ public class RMSiteAPI extends RMModelRequest
* Get the RM site
*
* @return The {@link RMSite} for the given file plan component id
- * @throws Exception for the following cases:
+ * @throws RuntimeException for the following cases:
*
* - Api Response code 400 Invalid parameter: GET request is supported only for the RM site
* - Api Response code 401 If authentication failed
@@ -70,7 +70,7 @@ public class RMSiteAPI extends RMModelRequest
* - Api Response code default Unexpected error
*
*/
- public RMSite getSite() throws Exception
+ public RMSite getSite()
{
return getRmRestWrapper().processModel(RMSite.class, simpleRequest(
GET,
@@ -83,7 +83,7 @@ public class RMSiteAPI extends RMModelRequest
*
* @param rmSite The properties of the rm site to be created
* @return The {@link RMSite} with the given properties
- * @throws Exception for the following cases:
+ * @throws RuntimeException for the following cases:
*
* - Api Response code 400 Invalid parameter: title, or description exceed the maximum length; or siteBodyCreate invalid
* - Api Response code 401 If authentication failed
@@ -91,7 +91,7 @@ public class RMSiteAPI extends RMModelRequest
*
- Api Response code default Unexpected error
*
*/
- public RMSite createRMSite(RMSite rmSiteModel) throws Exception
+ public RMSite createRMSite(RMSite rmSiteModel)
{
mandatoryObject("rmSiteModel", rmSiteModel);
@@ -104,7 +104,7 @@ public class RMSiteAPI extends RMModelRequest
/**
* Delete RM site
- * @throws Exception for the following cases:
+ * @throws RuntimeException for the following cases:
*
* - Api Response code 400 Invalid parameter: DELETE request is supported only for the RM site
* - Api Response code 401 If authentication failed
@@ -113,7 +113,7 @@ public class RMSiteAPI extends RMModelRequest
*
- Api Response code default Unexpected error
*
*/
- public void deleteRMSite() throws Exception
+ public void deleteRMSite()
{
getRmRestWrapper().processEmptyModel(simpleRequest(
DELETE,
@@ -126,7 +126,7 @@ public class RMSiteAPI extends RMModelRequest
*
* @param rmSiteProperties The properties to be updated
* @return The updated {@link RMSite}
- * @throws Exception for the following cases:
+ * @throws RuntimeException for the following cases:
*
* - Api Response code 400 the update request is invalid {@code rmSiteModel} is invalid
* - Api Response code 401 If authentication fails
@@ -135,7 +135,7 @@ public class RMSiteAPI extends RMModelRequest
* - Api Response code default Unexpected error,model integrity exception
*
*/
- public RMSite updateRMSite(RMSite rmSiteModel) throws Exception
+ public RMSite updateRMSite(RMSite rmSiteModel)
{
mandatoryObject("rmSiteProperties", rmSiteModel);
@@ -150,7 +150,7 @@ public class RMSiteAPI extends RMModelRequest
* Checks if the RM site exists or not
*
* @return true
if the RM site exists, false
otherwise
- * @throws Exception for the following cases:
+ * @throws RuntimeException for the following cases:
*
* - Api Response code 400 Invalid parameter: GET request is supported only for the RM site
* - Api Response code 401 If authentication failed
@@ -158,7 +158,7 @@ public class RMSiteAPI extends RMModelRequest
* - Api Response code default Unexpected error
*
*/
- public boolean existsRMSite() throws Exception
+ public boolean existsRMSite()
{
getSite();
return getRmRestWrapper().getStatusCode().equals(OK.toString());
diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/RMUserAPI.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/RMUserAPI.java
index d24c53c614..6dc812dd54 100644
--- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/RMUserAPI.java
+++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/RMUserAPI.java
@@ -86,9 +86,9 @@ public class RMUserAPI extends RMModelRequest
* Assign RM role to user
* @param userName User's username
* @param userRole User's RM role, one of {@link UserRoles} roles
- * @throws Exception for failed requests
+ * @throws RuntimeException for failed requests
*/
- public void assignRoleToUser(String userName, String userRole) throws Exception
+ public void assignRoleToUser(String userName, String userRole)
{
UserModel adminUser = getRmRestWrapper().getTestUser();
diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/RecordCategoryAPI.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/RecordCategoryAPI.java
index 9158ce00e5..3368723420 100644
--- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/RecordCategoryAPI.java
+++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/RecordCategoryAPI.java
@@ -65,7 +65,7 @@ public class RecordCategoryAPI extends RMModelRequest
* Deletes a record category.
*
* @param recordCategoryId The identifier of a record category
- * @throws Exception for the following cases:
+ * @throws RuntimeException for the following cases:
*
* - {@code recordCategoryId} is not a valid format
* - authentication fails
@@ -101,7 +101,7 @@ public class RecordCategoryAPI extends RMModelRequest
* @param recordCategoryId The identifier of a record category
* @param parameters The URL parameters to add
* @return The {@link RecordCategory} for the given {@code recordCategoryId}
- * @throws Exception for the following cases:
+ * @throws RuntimeException for the following cases:
*
* - {@code recordCategoryId} is not a valid format
* - authentication fails
@@ -124,7 +124,7 @@ public class RecordCategoryAPI extends RMModelRequest
/**
* see {@link #updateRecordCategory(RecordCategory, String, String)
*/
- public RecordCategory updateRecordCategory(RecordCategory recordCategoryModel, String recordCategoryId) throws Exception
+ public RecordCategory updateRecordCategory(RecordCategory recordCategoryModel, String recordCategoryId)
{
mandatoryObject("recordCategoryModel", recordCategoryModel);
mandatoryString("recordCategoryId", recordCategoryId);
@@ -139,7 +139,7 @@ public class RecordCategoryAPI extends RMModelRequest
* @param recordCategoryId The identifier of a record category
* @param parameters The URL parameters to add
* @param returns The updated {@link RecordCategory}
- * @throws Exception for the following cases:
+ * @throws RuntimeException for the following cases:
*
* - the update request is invalid or {@code recordCategoryId} is not a valid format or {@code recordCategoryModel} is invalid
* - authentication fails
@@ -149,7 +149,7 @@ public class RecordCategoryAPI extends RMModelRequest
* - model integrity exception, including file name with invalid characters
*
*/
- public RecordCategory updateRecordCategory(RecordCategory recordCategoryModel, String recordCategoryId, String parameters) throws Exception
+ public RecordCategory updateRecordCategory(RecordCategory recordCategoryModel, String recordCategoryId, String parameters)
{
mandatoryObject("recordCategoryModel", recordCategoryModel);
mandatoryString("recordCategoryId", recordCategoryId);
@@ -179,7 +179,7 @@ public class RecordCategoryAPI extends RMModelRequest
* @param recordCategoryId The identifier of a record category
* @param parameters The URL parameters to add
* @return The {@link RecordCategoryChildCollection} for the given {@code recordCategoryId}
- * @throws Exception for the following cases:
+ * @throws RuntimeException for the following cases:
*
* - authentication fails
* - current user does not have permission to read {@code recordCategoryId}
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 bc79c916e5..640ae1c3ae 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
@@ -77,7 +77,7 @@ public class RecordFolderAPI extends RMModelRequest
* Deletes a record folder.
*
* @param recordFolderId The identifier of a record folder
- * @throws Exception for the following cases:
+ * @throws RuntimeException for the following cases:
*
* - {@code recordFolderId} is not a valid format
* - authentication fails
@@ -113,7 +113,7 @@ public class RecordFolderAPI extends RMModelRequest
* @param recordFolderId The identifier of a record folder
* @param parameters The URL parameters to add
* @return The {@link RecordFolder} for the given {@code recordFolderId}
- * @throws Exception for the following cases:
+ * @throws RuntimeException for the following cases:
*
* - {@code recordFolderId} is not a valid format
* - authentication fails
@@ -136,7 +136,7 @@ public class RecordFolderAPI extends RMModelRequest
/**
* see {@link #updateRecordFolder(RecordFolder, String, String)
*/
- public RecordFolder updateRecordFolder(RecordFolder recordFolderModel, String recordFolderId) throws Exception
+ public RecordFolder updateRecordFolder(RecordFolder recordFolderModel, String recordFolderId)
{
mandatoryObject("recordFolderModel", recordFolderModel);
mandatoryString("recordFolderId", recordFolderId);
@@ -151,7 +151,7 @@ public class RecordFolderAPI extends RMModelRequest
* @param recordFolderId The identifier of a record folder
* @param parameters The URL parameters to add
* @param returns The updated {@link RecordFolder}
- * @throws Exception for the following cases:
+ * @throws RuntimeException for the following cases:
*
* - the update request is invalid or {@code recordFolderId} is not a valid format or {@code recordFolderModel} is invalid
* - authentication fails
@@ -161,7 +161,7 @@ public class RecordFolderAPI extends RMModelRequest
* - model integrity exception, including file name with invalid characters
*
*/
- public RecordFolder updateRecordFolder(RecordFolder recordFolderModel, String recordFolderId, String parameters) throws Exception
+ public RecordFolder updateRecordFolder(RecordFolder recordFolderModel, String recordFolderId, String parameters)
{
mandatoryObject("recordFolderModel", recordFolderModel);
mandatoryString("recordFolderId", recordFolderId);
@@ -191,7 +191,7 @@ public class RecordFolderAPI extends RMModelRequest
* @param recordFolderId The identifier of a record folder
* @param parameters The URL parameters to add
* @return The {@link RecordFolderCollection} for the given {@code recordFolderId}
- * @throws Exception for the following cases:
+ * @throws RuntimeException for the following cases:
*
* - authentication fails
* - current user does not have permission to read {@code recordFolderId}
diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/RecordsAPI.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/RecordsAPI.java
index 6057234ecb..0a7d24bb28 100644
--- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/RecordsAPI.java
+++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/RecordsAPI.java
@@ -65,7 +65,7 @@ public class RecordsAPI extends RMModelRequest
*
* @param recordId The id of the electronic record
* @return {@link ResponseBody} representing content for the given record id
- * @throws Exception for the following cases:
+ * @throws RuntimeException for the following cases:
*
* - {@code recordId} has no content
* - {@code recordId} is not a valid format, or is not a record
@@ -73,7 +73,7 @@ public class RecordsAPI extends RMModelRequest
* - {@code recordId} does not exist
*
*/
- public ResponseBody> getRecordContent(String recordId) throws Exception
+ public ResponseBody> getRecordContent(String recordId)
{
mandatoryString("recordId", recordId);
@@ -89,7 +89,7 @@ public class RecordsAPI extends RMModelRequest
* @param recordBodyFile The properties where to file the record
* @param recordId The id of the record to file
* @return The {@link Record} with the given properties
- * @throws Exception for the following cases:
+ * @throws RuntimeException for the following cases:
*
* - Invalid parameter: {@code recordBodyFile} is not a valid format,{@code recordId} is not a record
* - authentication fails
@@ -100,7 +100,7 @@ public class RecordsAPI extends RMModelRequest
*
*
*/
- public Record fileRecord(RecordBodyFile recordBodyFile, String recordId) throws Exception
+ public Record fileRecord(RecordBodyFile recordBodyFile, String recordId)
{
mandatoryObject("recordBodyFile", recordBodyFile);
mandatoryString("recordId", recordId);
@@ -114,7 +114,7 @@ public class RecordsAPI extends RMModelRequest
* @param recordBodyFile The properties where to file the record
* @param recordId The id of the record to file
* @return The {@link Record} with the given properties
- * @throws Exception for the following cases:
+ * @throws RuntimeException for the following cases:
*
* - Invalid parameter: {@code recordBodyFile} is not a valid format,{@code recordId} is not a record
* - authentication fails
@@ -125,7 +125,7 @@ public class RecordsAPI extends RMModelRequest
*
*
*/
- public Record fileRecord(RecordBodyFile recordBodyFile, String recordId, String parameters) throws Exception
+ public Record fileRecord(RecordBodyFile recordBodyFile, String recordId, String parameters)
{
mandatoryObject("requestBodyFile", recordBodyFile);
mandatoryString("recordId", recordId);
@@ -142,7 +142,7 @@ public class RecordsAPI extends RMModelRequest
/**
* see {@link #completeRecord(String, String)
*/
- public Record completeRecord(String recordId) throws Exception
+ public Record completeRecord(String recordId)
{
mandatoryString("recordId", recordId);
@@ -154,7 +154,7 @@ public class RecordsAPI extends RMModelRequest
*
* @param recordId The id of the record to complete
* @return The completed {@link Record} with the given properties
- * @throws Exception for the following cases:
+ * @throws RuntimeException for the following cases:
*
* - Invalid parameter: {@code recordId} is not a record
* - authentication fails
@@ -164,7 +164,7 @@ public class RecordsAPI extends RMModelRequest
* - model integrity exception: the record has missing meta-data
*
*/
- public Record completeRecord(String recordId, String parameters) throws Exception
+ public Record completeRecord(String recordId, String parameters)
{
mandatoryString("recordId", recordId);
@@ -179,7 +179,7 @@ public class RecordsAPI extends RMModelRequest
* Deletes a record.
*
* @param recordId The identifier of a record
- * @throws Exception for the following cases:
+ * @throws RuntimeException for the following cases:
*
* - {@code recordId} is not a valid format
* - authentication fails
@@ -215,7 +215,7 @@ public class RecordsAPI extends RMModelRequest
* @param recordId The identifier of a record
* @param parameters The URL parameters to add
* @return The {@link Record} for the given {@code recordId}
- * @throws Exception for the following cases:
+ * @throws RuntimeException for the following cases:
*
* - {@code recordId} is not a valid format
* - authentication fails
@@ -238,7 +238,7 @@ public class RecordsAPI extends RMModelRequest
/**
* see {@link #updateRecord(Record, String, String)
*/
- public Record updateRecord(Record recordModel, String recordId) throws Exception
+ public Record updateRecord(Record recordModel, String recordId)
{
mandatoryObject("recordModel", recordModel);
mandatoryString("recordId", recordId);
@@ -253,7 +253,7 @@ public class RecordsAPI extends RMModelRequest
* @param recordId The identifier of a record
* @param parameters The URL parameters to add
* @return The updated {@link Record}
- * @throws Exception for the following cases:
+ * @throws RuntimeException for the following cases:
*
* - the update request is invalid or {@code recordId} is not a valid format or {@code recordModel} is invalid
* - authentication fails
@@ -263,7 +263,7 @@ public class RecordsAPI extends RMModelRequest
* - model integrity exception, including file name with invalid characters
*
*/
- public Record updateRecord(Record recordModel, String recordId, String parameters) throws Exception
+ public Record updateRecord(Record recordModel, String recordId, String parameters)
{
mandatoryObject("recordModel", recordModel);
mandatoryString("recordId", recordId);
diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/TransferAPI.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/TransferAPI.java
index 9ec19094e0..d263482d97 100644
--- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/TransferAPI.java
+++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/TransferAPI.java
@@ -69,7 +69,7 @@ public class TransferAPI extends RMModelRequest
* @param transferId The identifier of a transfer
* @param parameters The URL parameters to add
* @return The {@link Transfer} for the given {@code transferId}
- * @throws Exception for the following cases:
+ * @throws RuntimeException for the following cases:
*
* - {@code transferId} is not a valid format
* - authentication fails
@@ -104,7 +104,7 @@ public class TransferAPI extends RMModelRequest
* @param transferId The identifier of a transfer
* @param parameters The URL parameters to add
* @return The {@link TransferChildCollection} for the given {@code transferId}
- * @throws Exception for the following cases:
+ * @throws RuntimeException for the following cases:
*
* - authentication fails
* - current user does not have permission to read {@code transferId}
diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/TransferContainerAPI.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/TransferContainerAPI.java
index 22ae02b913..b62ec3e495 100644
--- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/TransferContainerAPI.java
+++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/TransferContainerAPI.java
@@ -73,7 +73,7 @@ public class TransferContainerAPI extends RMModelRequest
* @param transferContainerId The identifier of a transfer container
* @param parameters The URL parameters to add
* @return The {@link TransferContainer} for the given {@code transferContainerId}
- * @throws Exception for the following cases:
+ * @throws RuntimeException for the following cases:
*
* - {@code transferContainerId} is not a valid format
* - authentication fails
@@ -96,7 +96,7 @@ public class TransferContainerAPI extends RMModelRequest
/**
* see {@link #updateTransferContainer(TransferContainer, String, String)
*/
- public TransferContainer updateTransferContainer(TransferContainer transferContainerModel, String transferContainerId) throws Exception
+ public TransferContainer updateTransferContainer(TransferContainer transferContainerModel, String transferContainerId)
{
mandatoryObject("transferContainerModel", transferContainerModel);
mandatoryString("transferContainerId", transferContainerId);
@@ -111,7 +111,7 @@ public class TransferContainerAPI extends RMModelRequest
* @param transferContainerId The identifier of a transfer container
* @param parameters The URL parameters to add
* @param returns The updated {@link TransferContainer}
- * @throws Exception for the following cases:
+ * @throws RuntimeException for the following cases:
*
* - the update request is invalid or {@code transferContainerId} is not a valid format or {@code transferContainerModel} is invalid
* - authentication fails
@@ -121,7 +121,7 @@ public class TransferContainerAPI extends RMModelRequest
* - model integrity exception, including transfer container name with invalid characters
*
*/
- public TransferContainer updateTransferContainer(TransferContainer transferContainerModel, String transferContainerId, String parameters) throws Exception
+ public TransferContainer updateTransferContainer(TransferContainer transferContainerModel, String transferContainerId, String parameters)
{
mandatoryObject("transferContainerModel", transferContainerModel);
mandatoryString("transferContainerId", transferContainerId);
@@ -151,7 +151,7 @@ public class TransferContainerAPI extends RMModelRequest
* @param transferContainerId The identifier of a transfer container
* @param parameters The URL parameters to add
* @return The {@link TransferCollection} for the given {@code transferContainerId}
- * @throws Exception for the following cases:
+ * @throws RuntimeException for the following cases:
*
* - authentication fails
* - current user does not have permission to read {@code transferContainerId}
diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/UnfiledContainerAPI.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/UnfiledContainerAPI.java
index 05a1e6b846..9fe958fbbf 100644
--- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/UnfiledContainerAPI.java
+++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/UnfiledContainerAPI.java
@@ -39,6 +39,7 @@ import static org.springframework.http.HttpMethod.PUT;
import static org.testng.Assert.fail;
import java.io.File;
+import java.io.IOException;
import java.util.Iterator;
import com.fasterxml.jackson.databind.JsonNode;
@@ -86,7 +87,7 @@ public class UnfiledContainerAPI extends RMModelRequest
* @param unfiledContainerId The identifier of a unfiled record container
* @param parameters The URL parameters to add
* @return The {@link UnfiledContainer} for the given {@code unfiledContainerId}
- * @throws Exception for the following cases:
+ * @throws RuntimeException for the following cases:
*
* - {@code unfiledContainerId} is not a valid format
* - authentication fails
@@ -122,7 +123,7 @@ public class UnfiledContainerAPI extends RMModelRequest
* @param unfiledContainerId The identifier of an unfiled records container
* @param parameters The URL parameters to add
* @return The {@link UnfiledContainerChildCollection} for the given {@code unfiledContainerId}
- * @throws Exception for the following cases:
+ * @throws RuntimeException for the following cases:
*
* - authentication fails
* - current user does not have permission to read {@code unfiledContainerId}
@@ -144,7 +145,7 @@ public class UnfiledContainerAPI extends RMModelRequest
/**
* see {@link #createUnfiledContainerChild(UnfiledContainerChild, String, String)}
*/
- public UnfiledContainerChild createUnfiledContainerChild(UnfiledContainerChild unfiledContainerChildModel, String unfiledContainerId) throws Exception
+ public UnfiledContainerChild createUnfiledContainerChild(UnfiledContainerChild unfiledContainerChildModel, String unfiledContainerId)
{
mandatoryObject("unfiledContainerChildModel", unfiledContainerChildModel);
mandatoryString("unfiledContainerId", unfiledContainerId);
@@ -159,7 +160,7 @@ public class UnfiledContainerAPI extends RMModelRequest
* @param unfiledContainerId The identifier of an unfiled container
* @param parameters The URL parameters to add
* @return The created {@link UnfiledContainerChild}
- * @throws Exception for the following cases:
+ * @throws RuntimeException for the following cases:
*
* - {@code unfiledContainerId} is not a valid format or {@code unfiledContainerChildModel} is invalid
* - authentication fails
@@ -169,7 +170,7 @@ public class UnfiledContainerAPI extends RMModelRequest
* - model integrity exception, including node name with invalid characters
*
*/
- public UnfiledContainerChild createUnfiledContainerChild(UnfiledContainerChild unfiledContainerChildModel, String unfiledContainerId, String parameters) throws Exception
+ public UnfiledContainerChild createUnfiledContainerChild(UnfiledContainerChild unfiledContainerChildModel, String unfiledContainerId, String parameters)
{
mandatoryObject("unfiledContainerChildModel", unfiledContainerChildModel);
mandatoryString("unfiledContainerId", unfiledContainerId);
@@ -190,9 +191,9 @@ public class UnfiledContainerAPI extends RMModelRequest
* @param unfiledContainerChildContent {@link File} pointing to the content of the electronic record to be created
* @param unfiledContainerId The identifier of a unfiled container
* @return newly created {@link UnfiledContainerChild}
- * @throws Exception for invalid recordModel JSON strings
+ * @throws RuntimeException for invalid recordModel JSON strings
*/
- public UnfiledContainerChild uploadRecord(UnfiledContainerChild unfiledContainerChildModel, String unfiledContainerId, File unfiledContainerChildContent) throws Exception
+ public UnfiledContainerChild uploadRecord(UnfiledContainerChild unfiledContainerChildModel, String unfiledContainerId, File unfiledContainerChildContent)
{
mandatoryObject("unfiledContainerChildModel", unfiledContainerChildModel);
mandatoryObject("unfiledContainerChildContent", unfiledContainerChildContent);
@@ -208,7 +209,15 @@ public class UnfiledContainerAPI extends RMModelRequest
* to the request.
*/
RequestSpecBuilder builder = getRmRestWrapper().configureRequestSpec();
- JsonNode root = new ObjectMapper().readTree(toJson(unfiledContainerChildModel, UnfiledContainerChild.class, UnfiledContainerChildMixin.class));
+ JsonNode root;
+ try
+ {
+ root = new ObjectMapper().readTree(toJson(unfiledContainerChildModel, UnfiledContainerChild.class, UnfiledContainerChildMixin.class));
+ }
+ catch (IOException e)
+ {
+ throw new RuntimeException("Failed to convert model to JSON.", e);
+ }
// add request fields
Iterator fieldNames = root.fieldNames();
while (fieldNames.hasNext())
@@ -225,7 +234,7 @@ public class UnfiledContainerAPI extends RMModelRequest
/**
* see {@link #updateUnfiledContainer(UnfiledContainer, String, String)
*/
- public UnfiledContainer updateUnfiledContainer(UnfiledContainer unfiledContainerModel, String unfiledContainerId) throws Exception
+ public UnfiledContainer updateUnfiledContainer(UnfiledContainer unfiledContainerModel, String unfiledContainerId)
{
mandatoryObject("unfiledContainerModel", unfiledContainerModel);
mandatoryString("unfiledContainerId", unfiledContainerId);
@@ -240,7 +249,7 @@ public class UnfiledContainerAPI extends RMModelRequest
* @param unfiledContainerId The identifier of an unfiled record container
* @param parameters The URL parameters to add
* @param returns The updated {@link UnfiledContainer}
- * @throws Exception for the following cases:
+ * @throws RuntimeException for the following cases:
*
* - the update request is invalid or {@code unfiledContainerId} is not a valid format or {@code unfiledContainerModel} is invalid
* - authentication fails
@@ -250,7 +259,7 @@ public class UnfiledContainerAPI extends RMModelRequest
* - model integrity exception, including file name with invalid characters
*
*/
- public UnfiledContainer updateUnfiledContainer(UnfiledContainer unfiledContainerModel, String unfiledContainerId, String parameters) throws Exception
+ public UnfiledContainer updateUnfiledContainer(UnfiledContainer unfiledContainerModel, String unfiledContainerId, String parameters)
{
mandatoryObject("unfiledContainerModel", unfiledContainerModel);
mandatoryString("unfiledContainerId", unfiledContainerId);
diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/UnfiledRecordFolderAPI.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/UnfiledRecordFolderAPI.java
index aa4328ccfd..bcb91a40d1 100644
--- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/UnfiledRecordFolderAPI.java
+++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/UnfiledRecordFolderAPI.java
@@ -40,6 +40,7 @@ import static org.springframework.http.HttpMethod.PUT;
import static org.testng.Assert.fail;
import java.io.File;
+import java.io.IOException;
import java.util.Iterator;
import com.fasterxml.jackson.databind.JsonNode;
@@ -86,7 +87,7 @@ public class UnfiledRecordFolderAPI extends RMModelRequest
* @param unfiledRecordFolderId The identifier of a unfiled record folder
* @param parameters The URL parameters to add
* @return The {@link UnfiledRecordFolder} for the given {@code unfiledRecordFolderId}
- * @throws Exception for the following cases:
+ * @throws RuntimeException for the following cases:
*
* - {@code unfiledRecordFolderId} is not a valid format
* - authentication fails
@@ -122,7 +123,7 @@ public class UnfiledRecordFolderAPI extends RMModelRequest
* @param unfiledRecordFolderId The identifier of an unfiled records folder
* @param parameters The URL parameters to add
* @return The {@link UnfiledRecordFolderChildCollection} for the given {@code unfiledRecordFolderId}
- * @throws Exception for the following cases:
+ * @throws RuntimeException for the following cases:
*
* - authentication fails
* - current user does not have permission to read {@code unfiledRecordFolderId}
@@ -144,7 +145,7 @@ public class UnfiledRecordFolderAPI extends RMModelRequest
/**
* see {@link #createUnfiledRecordFolderChild(UnfiledContainerChild, String, String)}
*/
- public UnfiledContainerChild createUnfiledRecordFolderChild(UnfiledContainerChild unfiledRecordFolderChildModel, String unfiledRecordFolderId) throws Exception
+ public UnfiledContainerChild createUnfiledRecordFolderChild(UnfiledContainerChild unfiledRecordFolderChildModel, String unfiledRecordFolderId)
{
mandatoryObject("unfiledRecordFolderChildModel", unfiledRecordFolderChildModel);
mandatoryString("unfiledRecordFolderId", unfiledRecordFolderId);
@@ -159,7 +160,7 @@ public class UnfiledRecordFolderAPI extends RMModelRequest
* @param unfiledRecordFolderId The identifier of an unfiled folder
* @param parameters The URL parameters to add
* @return The created {@link UnfiledRecordFolderChild}
- * @throws Exception for the following cases:
+ * @throws RuntimeException for the following cases:
*
* - {@code unfiledRecordFolderId} is not a valid format or {@code unfiledRecordFolderChildModel} is invalid
* - authentication fails
@@ -169,7 +170,7 @@ public class UnfiledRecordFolderAPI extends RMModelRequest
* - model integrity exception, including node name with invalid characters
*
*/
- public UnfiledContainerChild createUnfiledRecordFolderChild(UnfiledContainerChild unfiledRecordFolderChildModel, String unfiledRecordFolderId, String parameters) throws Exception
+ public UnfiledContainerChild createUnfiledRecordFolderChild(UnfiledContainerChild unfiledRecordFolderChildModel, String unfiledRecordFolderId, String parameters)
{
mandatoryObject("unfiledRecordFolderChildModel", unfiledRecordFolderChildModel);
mandatoryString("unfiledRecordFolderId", unfiledRecordFolderId);
@@ -190,9 +191,9 @@ public class UnfiledRecordFolderAPI extends RMModelRequest
* @param unfiledRecordFolderChildContent {@link File} pointing to the content of the electronic record to be created
* @param unfiledRecordFolderId The identifier of a unfiled record folder
* @return newly created {@link UnfiledContainerChild}
- * @throws Exception for invalid recordModel JSON strings
+ * @throws RuntimeException for invalid recordModel JSON strings
*/
- public UnfiledContainerChild uploadRecord(UnfiledContainerChild unfiledRecordFolderChildModel, String unfiledRecordFolderId, File unfiledRecordFolderChildContent) throws Exception
+ public UnfiledContainerChild uploadRecord(UnfiledContainerChild unfiledRecordFolderChildModel, String unfiledRecordFolderId, File unfiledRecordFolderChildContent)
{
mandatoryObject("unfiledRecordFolderChildModel", unfiledRecordFolderChildModel);
mandatoryObject("unfiledRecordFolderChildContent", unfiledRecordFolderChildContent);
@@ -208,7 +209,15 @@ public class UnfiledRecordFolderAPI extends RMModelRequest
* to the request.
*/
RequestSpecBuilder builder = getRmRestWrapper().configureRequestSpec();
- JsonNode root = new ObjectMapper().readTree(toJson(unfiledRecordFolderChildModel, UnfiledContainerChild.class, UnfiledContainerChildMixin.class));
+ JsonNode root;
+ try
+ {
+ root = new ObjectMapper().readTree(toJson(unfiledRecordFolderChildModel, UnfiledContainerChild.class, UnfiledContainerChildMixin.class));
+ }
+ catch (IOException e)
+ {
+ throw new RuntimeException("Failed to convert model to JSON.", e);
+ }
// add request fields
Iterator fieldNames = root.fieldNames();
while (fieldNames.hasNext())
@@ -225,7 +234,7 @@ public class UnfiledRecordFolderAPI extends RMModelRequest
/**
* see {@link #updateUnfiledRecordFolder(UnfiledRecordFolder, String, String)
*/
- public UnfiledRecordFolder updateUnfiledRecordFolder(UnfiledRecordFolder unfiledRecordFolderModel, String unfiledRecordFolderId) throws Exception
+ public UnfiledRecordFolder updateUnfiledRecordFolder(UnfiledRecordFolder unfiledRecordFolderModel, String unfiledRecordFolderId)
{
mandatoryObject("unfiledRecordFolderModel", unfiledRecordFolderModel);
mandatoryString("unfiledRecordFolderId", unfiledRecordFolderId);
@@ -240,7 +249,7 @@ public class UnfiledRecordFolderAPI extends RMModelRequest
* @param unfiledRecordFolderId The identifier of an unfiled record folder
* @param parameters The URL parameters to add
* @param returns The updated {@link UnfiledRecordFolder}
- * @throws Exception for the following cases:
+ * @throws RuntimeException for the following cases:
*
* - the update request is invalid or {@code unfiledRecordFolderId} is not a valid format or {@code unfiledRecordFolderModel} is invalid
* - authentication fails
@@ -250,7 +259,7 @@ public class UnfiledRecordFolderAPI extends RMModelRequest
* - model integrity exception, including file name with invalid characters
*
*/
- public UnfiledRecordFolder updateUnfiledRecordFolder(UnfiledRecordFolder unfiledRecordFolderModel, String unfiledRecordFolderId, String parameters) throws Exception
+ public UnfiledRecordFolder updateUnfiledRecordFolder(UnfiledRecordFolder unfiledRecordFolderModel, String unfiledRecordFolderId, String parameters)
{
mandatoryObject("unfiledRecordFolderModel", unfiledRecordFolderModel);
mandatoryString("unfiledRecordFolderId", unfiledRecordFolderId);
@@ -268,7 +277,7 @@ public class UnfiledRecordFolderAPI extends RMModelRequest
* Deletes an unfiled record folder.
*
* @param unfiledRecordFolderId The identifier of a unfiled record folder
- * @throws Exception for the following cases:
+ * @throws RuntimeException for the following cases:
*
* - {@code unfiledRecordFolderId} is not a valid format
* - authentication fails