Remove unthrown checked exceptions.

Update the javadoc to refer to RuntimeExceptions instead.  Also conversion from
IOException to RuntimeException in UnfiledContainerAPI and UnfiledRecordFolderAPI
to add consistency with RecordFolderAPI.
This commit is contained in:
Tom Page
2019-07-31 16:30:28 +01:00
parent 122aa3c09c
commit 484722d7ba
11 changed files with 95 additions and 77 deletions

View File

@@ -77,7 +77,7 @@ public class FilePlanAPI extends RMModelRequest
* @param filePlanId The identifier of a file plan * @param filePlanId The identifier of a file plan
* @param parameters The URL parameters to add * @param parameters The URL parameters to add
* @return The {@link FilePlan} for the given {@code filePlanId} * @return The {@link FilePlan} for the given {@code filePlanId}
* @throws Exception for the following cases: * @throws RuntimeException for the following cases:
* <ul> * <ul>
* <li>{@code filePlanId} is not a valid format</li> * <li>{@code filePlanId} is not a valid format</li>
* <li>authentication fails</li> * <li>authentication fails</li>
@@ -113,7 +113,7 @@ public class FilePlanAPI extends RMModelRequest
* @param filePlanId The identifier of a file plan * @param filePlanId The identifier of a file plan
* @param parameters The URL parameters to add * @param parameters The URL parameters to add
* @return The {@link RecordCategoryCollection} for the given {@code filePlanId} * @return The {@link RecordCategoryCollection} for the given {@code filePlanId}
* @throws Exception for the following cases: * @throws RuntimeException for the following cases:
* <ul> * <ul>
* <li>authentication fails</li> * <li>authentication fails</li>
* <li>current user does not have permission to read {@code filePlanId}</li> * <li>current user does not have permission to read {@code filePlanId}</li>
@@ -177,7 +177,7 @@ public class FilePlanAPI extends RMModelRequest
/** /**
* see {@link #updateFilePlan(FilePlan, String, String) * 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); mandatoryObject("filePlanModel", filePlanModel);
mandatoryString("filePlanId", filePlanId); mandatoryString("filePlanId", filePlanId);
@@ -191,7 +191,7 @@ public class FilePlanAPI extends RMModelRequest
* @param filePlanModel The file plan model which holds the information * @param filePlanModel The file plan model which holds the information
* @param filePlanId The identifier of the file plan * @param filePlanId The identifier of the file plan
* @param parameters The URL parameters to add * @param parameters The URL parameters to add
* @throws Exception for the following cases: * @throws RuntimeException for the following cases:
* <ul> * <ul>
* <li>the update request is invalid or {@code filePlanId} is not a valid format or {@code filePlanModel} is invalid</li> * <li>the update request is invalid or {@code filePlanId} is not a valid format or {@code filePlanModel} is invalid</li>
* <li>authentication fails</li> * <li>authentication fails</li>
@@ -200,7 +200,7 @@ public class FilePlanAPI extends RMModelRequest
* <li>model integrity exception, including file name with invalid characters</li> * <li>model integrity exception, including file name with invalid characters</li>
* </ul> * </ul>
*/ */
public FilePlan updateFilePlan(FilePlan filePlanModel, String filePlanId, String parameters) throws Exception public FilePlan updateFilePlan(FilePlan filePlanModel, String filePlanId, String parameters)
{ {
mandatoryObject("filePlanModel", filePlanModel); mandatoryObject("filePlanModel", filePlanModel);
mandatoryString("filePlanId", filePlanId); mandatoryString("filePlanId", filePlanId);

View File

@@ -57,9 +57,9 @@ public class FilesAPI extends RMModelRequest
* @param fileId The Id of a file to declare as record * @param fileId The Id of a file to declare as record
* @param parameters Request parameters, refer to API documentation for more details * @param parameters Request parameters, refer to API documentation for more details
* @return The {@link Record} for created 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, String parameters) throws Exception public Record declareAsRecord(String fileId, String parameters)
{ {
mandatoryString("fileId", fileId); mandatoryString("fileId", fileId);
@@ -76,9 +76,9 @@ public class FilesAPI extends RMModelRequest
* *
* @param fileId The Id of a file to declare as record * @param fileId The Id of a file to declare as record
* @return The {@link Record} for created 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); mandatoryString("fileId", fileId);

View File

@@ -62,7 +62,7 @@ public class RMSiteAPI extends RMModelRequest
* Get the RM site * Get the RM site
* *
* @return The {@link RMSite} for the given file plan component id * @return The {@link RMSite} for the given file plan component id
* @throws Exception for the following cases: * @throws RuntimeException for the following cases:
* <ul> * <ul>
* <li>Api Response code 400 Invalid parameter: GET request is supported only for the RM site</li> * <li>Api Response code 400 Invalid parameter: GET request is supported only for the RM site</li>
* <li>Api Response code 401 If authentication failed</li> * <li>Api Response code 401 If authentication failed</li>
@@ -70,7 +70,7 @@ public class RMSiteAPI extends RMModelRequest
* <li>Api Response code default Unexpected error</li> * <li>Api Response code default Unexpected error</li>
* </ul> * </ul>
*/ */
public RMSite getSite() throws Exception public RMSite getSite()
{ {
return getRmRestWrapper().processModel(RMSite.class, simpleRequest( return getRmRestWrapper().processModel(RMSite.class, simpleRequest(
GET, GET,
@@ -83,7 +83,7 @@ public class RMSiteAPI extends RMModelRequest
* *
* @param rmSite The properties of the rm site to be created * @param rmSite The properties of the rm site to be created
* @return The {@link RMSite} with the given properties * @return The {@link RMSite} with the given properties
* @throws Exception for the following cases: * @throws RuntimeException for the following cases:
* <ul> * <ul>
* <li>Api Response code 400 Invalid parameter: title, or description exceed the maximum length; or siteBodyCreate invalid</li> * <li>Api Response code 400 Invalid parameter: title, or description exceed the maximum length; or siteBodyCreate invalid</li>
* <li>Api Response code 401 If authentication failed</ * <li>Api Response code 401 If authentication failed</
@@ -91,7 +91,7 @@ public class RMSiteAPI extends RMModelRequest
* <li>Api Response code default Unexpected error</li> * <li>Api Response code default Unexpected error</li>
* </ul> * </ul>
*/ */
public RMSite createRMSite(RMSite rmSiteModel) throws Exception public RMSite createRMSite(RMSite rmSiteModel)
{ {
mandatoryObject("rmSiteModel", rmSiteModel); mandatoryObject("rmSiteModel", rmSiteModel);
@@ -104,7 +104,7 @@ public class RMSiteAPI extends RMModelRequest
/** /**
* Delete RM site * Delete RM site
* @throws Exception for the following cases: * @throws RuntimeException for the following cases:
* <ul> * <ul>
* <li>Api Response code 400 Invalid parameter: DELETE request is supported only for the RM site</li> * <li>Api Response code 400 Invalid parameter: DELETE request is supported only for the RM site</li>
* <li>Api Response code 401 If authentication failed</ * <li>Api Response code 401 If authentication failed</
@@ -113,7 +113,7 @@ public class RMSiteAPI extends RMModelRequest
* <li>Api Response code default Unexpected error</li> * <li>Api Response code default Unexpected error</li>
* </ul> * </ul>
*/ */
public void deleteRMSite() throws Exception public void deleteRMSite()
{ {
getRmRestWrapper().processEmptyModel(simpleRequest( getRmRestWrapper().processEmptyModel(simpleRequest(
DELETE, DELETE,
@@ -126,7 +126,7 @@ public class RMSiteAPI extends RMModelRequest
* *
* @param rmSiteProperties The properties to be updated * @param rmSiteProperties The properties to be updated
* @return The updated {@link RMSite} * @return The updated {@link RMSite}
* @throws Exception for the following cases: * @throws RuntimeException for the following cases:
* <ul> * <ul>
* <li>Api Response code 400 the update request is invalid {@code rmSiteModel} is invalid</li> * <li>Api Response code 400 the update request is invalid {@code rmSiteModel} is invalid</li>
* <li>Api Response code 401 If authentication fails</li> * <li>Api Response code 401 If authentication fails</li>
@@ -135,7 +135,7 @@ public class RMSiteAPI extends RMModelRequest
* <li>Api Response code default Unexpected error,model integrity exception</li> * <li>Api Response code default Unexpected error,model integrity exception</li>
* </ul> * </ul>
*/ */
public RMSite updateRMSite(RMSite rmSiteModel) throws Exception public RMSite updateRMSite(RMSite rmSiteModel)
{ {
mandatoryObject("rmSiteProperties", rmSiteModel); mandatoryObject("rmSiteProperties", rmSiteModel);
@@ -150,7 +150,7 @@ public class RMSiteAPI extends RMModelRequest
* Checks if the RM site exists or not * Checks if the RM site exists or not
* *
* @return <code>true</code> if the RM site exists, <code>false</code> otherwise * @return <code>true</code> if the RM site exists, <code>false</code> otherwise
* @throws Exception for the following cases: * @throws RuntimeException for the following cases:
* <ul> * <ul>
* <li>Api Response code 400 Invalid parameter: GET request is supported only for the RM site</li> * <li>Api Response code 400 Invalid parameter: GET request is supported only for the RM site</li>
* <li>Api Response code 401 If authentication failed</li> * <li>Api Response code 401 If authentication failed</li>
@@ -158,7 +158,7 @@ public class RMSiteAPI extends RMModelRequest
* <li>Api Response code default Unexpected error</li> * <li>Api Response code default Unexpected error</li>
* </ul> * </ul>
*/ */
public boolean existsRMSite() throws Exception public boolean existsRMSite()
{ {
getSite(); getSite();
return getRmRestWrapper().getStatusCode().equals(OK.toString()); return getRmRestWrapper().getStatusCode().equals(OK.toString());

View File

@@ -86,9 +86,9 @@ public class RMUserAPI extends RMModelRequest
* Assign RM role to user * Assign RM role to user
* @param userName User's username * @param userName User's username
* @param userRole User's RM role, one of {@link UserRoles} roles * @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(); UserModel adminUser = getRmRestWrapper().getTestUser();

View File

@@ -65,7 +65,7 @@ public class RecordCategoryAPI extends RMModelRequest
* Deletes a record category. * Deletes a record category.
* *
* @param recordCategoryId The identifier of a record category * @param recordCategoryId The identifier of a record category
* @throws Exception for the following cases: * @throws RuntimeException for the following cases:
* <ul> * <ul>
* <li>{@code recordCategoryId} is not a valid format</li> * <li>{@code recordCategoryId} is not a valid format</li>
* <li>authentication fails</li> * <li>authentication fails</li>
@@ -101,7 +101,7 @@ public class RecordCategoryAPI extends RMModelRequest
* @param recordCategoryId The identifier of a record category * @param recordCategoryId The identifier of a record category
* @param parameters The URL parameters to add * @param parameters The URL parameters to add
* @return The {@link RecordCategory} for the given {@code recordCategoryId} * @return The {@link RecordCategory} for the given {@code recordCategoryId}
* @throws Exception for the following cases: * @throws RuntimeException for the following cases:
* <ul> * <ul>
* <li>{@code recordCategoryId} is not a valid format</li> * <li>{@code recordCategoryId} is not a valid format</li>
* <li>authentication fails</li> * <li>authentication fails</li>
@@ -124,7 +124,7 @@ public class RecordCategoryAPI extends RMModelRequest
/** /**
* see {@link #updateRecordCategory(RecordCategory, String, String) * 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); mandatoryObject("recordCategoryModel", recordCategoryModel);
mandatoryString("recordCategoryId", recordCategoryId); mandatoryString("recordCategoryId", recordCategoryId);
@@ -139,7 +139,7 @@ public class RecordCategoryAPI extends RMModelRequest
* @param recordCategoryId The identifier of a record category * @param recordCategoryId The identifier of a record category
* @param parameters The URL parameters to add * @param parameters The URL parameters to add
* @param returns The updated {@link RecordCategory} * @param returns The updated {@link RecordCategory}
* @throws Exception for the following cases: * @throws RuntimeException for the following cases:
* <ul> * <ul>
* <li>the update request is invalid or {@code recordCategoryId} is not a valid format or {@code recordCategoryModel} is invalid</li> * <li>the update request is invalid or {@code recordCategoryId} is not a valid format or {@code recordCategoryModel} is invalid</li>
* <li>authentication fails</li> * <li>authentication fails</li>
@@ -149,7 +149,7 @@ public class RecordCategoryAPI extends RMModelRequest
* <li>model integrity exception, including file name with invalid characters</li> * <li>model integrity exception, including file name with invalid characters</li>
* </ul> * </ul>
*/ */
public RecordCategory updateRecordCategory(RecordCategory recordCategoryModel, String recordCategoryId, String parameters) throws Exception public RecordCategory updateRecordCategory(RecordCategory recordCategoryModel, String recordCategoryId, String parameters)
{ {
mandatoryObject("recordCategoryModel", recordCategoryModel); mandatoryObject("recordCategoryModel", recordCategoryModel);
mandatoryString("recordCategoryId", recordCategoryId); mandatoryString("recordCategoryId", recordCategoryId);
@@ -179,7 +179,7 @@ public class RecordCategoryAPI extends RMModelRequest
* @param recordCategoryId The identifier of a record category * @param recordCategoryId The identifier of a record category
* @param parameters The URL parameters to add * @param parameters The URL parameters to add
* @return The {@link RecordCategoryChildCollection} for the given {@code recordCategoryId} * @return The {@link RecordCategoryChildCollection} for the given {@code recordCategoryId}
* @throws Exception for the following cases: * @throws RuntimeException for the following cases:
* <ul> * <ul>
* <li>authentication fails</li> * <li>authentication fails</li>
* <li>current user does not have permission to read {@code recordCategoryId}</li> * <li>current user does not have permission to read {@code recordCategoryId}</li>

View File

@@ -77,7 +77,7 @@ public class RecordFolderAPI extends RMModelRequest
* Deletes a record folder. * Deletes a record folder.
* *
* @param recordFolderId The identifier of a record folder * @param recordFolderId The identifier of a record folder
* @throws Exception for the following cases: * @throws RuntimeException for the following cases:
* <ul> * <ul>
* <li>{@code recordFolderId} is not a valid format</li> * <li>{@code recordFolderId} is not a valid format</li>
* <li>authentication fails</li> * <li>authentication fails</li>
@@ -113,7 +113,7 @@ public class RecordFolderAPI extends RMModelRequest
* @param recordFolderId The identifier of a record folder * @param recordFolderId The identifier of a record folder
* @param parameters The URL parameters to add * @param parameters The URL parameters to add
* @return The {@link RecordFolder} for the given {@code recordFolderId} * @return The {@link RecordFolder} for the given {@code recordFolderId}
* @throws Exception for the following cases: * @throws RuntimeException for the following cases:
* <ul> * <ul>
* <li>{@code recordFolderId} is not a valid format</li> * <li>{@code recordFolderId} is not a valid format</li>
* <li>authentication fails</li> * <li>authentication fails</li>
@@ -136,7 +136,7 @@ public class RecordFolderAPI extends RMModelRequest
/** /**
* see {@link #updateRecordFolder(RecordFolder, String, String) * 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); mandatoryObject("recordFolderModel", recordFolderModel);
mandatoryString("recordFolderId", recordFolderId); mandatoryString("recordFolderId", recordFolderId);
@@ -151,7 +151,7 @@ public class RecordFolderAPI extends RMModelRequest
* @param recordFolderId The identifier of a record folder * @param recordFolderId The identifier of a record folder
* @param parameters The URL parameters to add * @param parameters The URL parameters to add
* @param returns The updated {@link RecordFolder} * @param returns The updated {@link RecordFolder}
* @throws Exception for the following cases: * @throws RuntimeException for the following cases:
* <ul> * <ul>
* <li>the update request is invalid or {@code recordFolderId} is not a valid format or {@code recordFolderModel} is invalid</li> * <li>the update request is invalid or {@code recordFolderId} is not a valid format or {@code recordFolderModel} is invalid</li>
* <li>authentication fails</li> * <li>authentication fails</li>
@@ -161,7 +161,7 @@ public class RecordFolderAPI extends RMModelRequest
* <li>model integrity exception, including file name with invalid characters</li> * <li>model integrity exception, including file name with invalid characters</li>
* </ul> * </ul>
*/ */
public RecordFolder updateRecordFolder(RecordFolder recordFolderModel, String recordFolderId, String parameters) throws Exception public RecordFolder updateRecordFolder(RecordFolder recordFolderModel, String recordFolderId, String parameters)
{ {
mandatoryObject("recordFolderModel", recordFolderModel); mandatoryObject("recordFolderModel", recordFolderModel);
mandatoryString("recordFolderId", recordFolderId); mandatoryString("recordFolderId", recordFolderId);
@@ -191,7 +191,7 @@ public class RecordFolderAPI extends RMModelRequest
* @param recordFolderId The identifier of a record folder * @param recordFolderId The identifier of a record folder
* @param parameters The URL parameters to add * @param parameters The URL parameters to add
* @return The {@link RecordFolderCollection} for the given {@code recordFolderId} * @return The {@link RecordFolderCollection} for the given {@code recordFolderId}
* @throws Exception for the following cases: * @throws RuntimeException for the following cases:
* <ul> * <ul>
* <li>authentication fails</li> * <li>authentication fails</li>
* <li>current user does not have permission to read {@code recordFolderId}</li> * <li>current user does not have permission to read {@code recordFolderId}</li>

View File

@@ -65,7 +65,7 @@ public class RecordsAPI extends RMModelRequest
* *
* @param recordId The id of the electronic record * @param recordId The id of the electronic record
* @return {@link ResponseBody} representing content for the given record id * @return {@link ResponseBody} representing content for the given record id
* @throws Exception for the following cases: * @throws RuntimeException for the following cases:
* <ul> * <ul>
* <li>{@code recordId} has no content</li> * <li>{@code recordId} has no content</li>
* <li> {@code recordId} is not a valid format, or is not a record</li> * <li> {@code recordId} is not a valid format, or is not a record</li>
@@ -73,7 +73,7 @@ public class RecordsAPI extends RMModelRequest
* <li>{@code recordId} does not exist</li> * <li>{@code recordId} does not exist</li>
* </ul> * </ul>
*/ */
public ResponseBody<?> getRecordContent(String recordId) throws Exception public ResponseBody<?> getRecordContent(String recordId)
{ {
mandatoryString("recordId", recordId); mandatoryString("recordId", recordId);
@@ -89,7 +89,7 @@ public class RecordsAPI extends RMModelRequest
* @param recordBodyFile The properties where to file the record * @param recordBodyFile The properties where to file the record
* @param recordId The id of the record to file * @param recordId The id of the record to file
* @return The {@link Record} with the given properties * @return The {@link Record} with the given properties
* @throws Exception for the following cases: * @throws RuntimeException for the following cases:
* <ul> * <ul>
* <li>Invalid parameter: {@code recordBodyFile} is not a valid format,{@code recordId} is not a record</li> * <li>Invalid parameter: {@code recordBodyFile} is not a valid format,{@code recordId} is not a record</li>
* <li>authentication fails</li> * <li>authentication fails</li>
@@ -100,7 +100,7 @@ public class RecordsAPI extends RMModelRequest
* </ul> * </ul>
* *
*/ */
public Record fileRecord(RecordBodyFile recordBodyFile, String recordId) throws Exception public Record fileRecord(RecordBodyFile recordBodyFile, String recordId)
{ {
mandatoryObject("recordBodyFile", recordBodyFile); mandatoryObject("recordBodyFile", recordBodyFile);
mandatoryString("recordId", recordId); mandatoryString("recordId", recordId);
@@ -114,7 +114,7 @@ public class RecordsAPI extends RMModelRequest
* @param recordBodyFile The properties where to file the record * @param recordBodyFile The properties where to file the record
* @param recordId The id of the record to file * @param recordId The id of the record to file
* @return The {@link Record} with the given properties * @return The {@link Record} with the given properties
* @throws Exception for the following cases: * @throws RuntimeException for the following cases:
* <ul> * <ul>
* <li>Invalid parameter: {@code recordBodyFile} is not a valid format,{@code recordId} is not a record</li> * <li>Invalid parameter: {@code recordBodyFile} is not a valid format,{@code recordId} is not a record</li>
* <li>authentication fails</li> * <li>authentication fails</li>
@@ -125,7 +125,7 @@ public class RecordsAPI extends RMModelRequest
* </ul> * </ul>
* *
*/ */
public Record fileRecord(RecordBodyFile recordBodyFile, String recordId, String parameters) throws Exception public Record fileRecord(RecordBodyFile recordBodyFile, String recordId, String parameters)
{ {
mandatoryObject("requestBodyFile", recordBodyFile); mandatoryObject("requestBodyFile", recordBodyFile);
mandatoryString("recordId", recordId); mandatoryString("recordId", recordId);
@@ -142,7 +142,7 @@ public class RecordsAPI extends RMModelRequest
/** /**
* see {@link #completeRecord(String, String) * see {@link #completeRecord(String, String)
*/ */
public Record completeRecord(String recordId) throws Exception public Record completeRecord(String recordId)
{ {
mandatoryString("recordId", recordId); mandatoryString("recordId", recordId);
@@ -154,7 +154,7 @@ public class RecordsAPI extends RMModelRequest
* *
* @param recordId The id of the record to complete * @param recordId The id of the record to complete
* @return The completed {@link Record} with the given properties * @return The completed {@link Record} with the given properties
* @throws Exception for the following cases: * @throws RuntimeException for the following cases:
* <ul> * <ul>
* <li>Invalid parameter: {@code recordId} is not a record</li> * <li>Invalid parameter: {@code recordId} is not a record</li>
* <li>authentication fails</li> * <li>authentication fails</li>
@@ -164,7 +164,7 @@ public class RecordsAPI extends RMModelRequest
* <li>model integrity exception: the record has missing meta-data</li> * <li>model integrity exception: the record has missing meta-data</li>
* </ul> * </ul>
*/ */
public Record completeRecord(String recordId, String parameters) throws Exception public Record completeRecord(String recordId, String parameters)
{ {
mandatoryString("recordId", recordId); mandatoryString("recordId", recordId);
@@ -179,7 +179,7 @@ public class RecordsAPI extends RMModelRequest
* Deletes a record. * Deletes a record.
* *
* @param recordId The identifier of a record * @param recordId The identifier of a record
* @throws Exception for the following cases: * @throws RuntimeException for the following cases:
* <ul> * <ul>
* <li>{@code recordId} is not a valid format</li> * <li>{@code recordId} is not a valid format</li>
* <li>authentication fails</li> * <li>authentication fails</li>
@@ -215,7 +215,7 @@ public class RecordsAPI extends RMModelRequest
* @param recordId The identifier of a record * @param recordId The identifier of a record
* @param parameters The URL parameters to add * @param parameters The URL parameters to add
* @return The {@link Record} for the given {@code recordId} * @return The {@link Record} for the given {@code recordId}
* @throws Exception for the following cases: * @throws RuntimeException for the following cases:
* <ul> * <ul>
* <li>{@code recordId} is not a valid format</li> * <li>{@code recordId} is not a valid format</li>
* <li>authentication fails</li> * <li>authentication fails</li>
@@ -238,7 +238,7 @@ public class RecordsAPI extends RMModelRequest
/** /**
* see {@link #updateRecord(Record, String, String) * 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); mandatoryObject("recordModel", recordModel);
mandatoryString("recordId", recordId); mandatoryString("recordId", recordId);
@@ -253,7 +253,7 @@ public class RecordsAPI extends RMModelRequest
* @param recordId The identifier of a record * @param recordId The identifier of a record
* @param parameters The URL parameters to add * @param parameters The URL parameters to add
* @return The updated {@link Record} * @return The updated {@link Record}
* @throws Exception for the following cases: * @throws RuntimeException for the following cases:
* <ul> * <ul>
* <li>the update request is invalid or {@code recordId} is not a valid format or {@code recordModel} is invalid</li> * <li>the update request is invalid or {@code recordId} is not a valid format or {@code recordModel} is invalid</li>
* <li>authentication fails</li> * <li>authentication fails</li>
@@ -263,7 +263,7 @@ public class RecordsAPI extends RMModelRequest
* <li>model integrity exception, including file name with invalid characters</li> * <li>model integrity exception, including file name with invalid characters</li>
* </ul> * </ul>
*/ */
public Record updateRecord(Record recordModel, String recordId, String parameters) throws Exception public Record updateRecord(Record recordModel, String recordId, String parameters)
{ {
mandatoryObject("recordModel", recordModel); mandatoryObject("recordModel", recordModel);
mandatoryString("recordId", recordId); mandatoryString("recordId", recordId);

View File

@@ -69,7 +69,7 @@ public class TransferAPI extends RMModelRequest
* @param transferId The identifier of a transfer * @param transferId The identifier of a transfer
* @param parameters The URL parameters to add * @param parameters The URL parameters to add
* @return The {@link Transfer} for the given {@code transferId} * @return The {@link Transfer} for the given {@code transferId}
* @throws Exception for the following cases: * @throws RuntimeException for the following cases:
* <ul> * <ul>
* <li>{@code transferId} is not a valid format</li> * <li>{@code transferId} is not a valid format</li>
* <li>authentication fails</li> * <li>authentication fails</li>
@@ -104,7 +104,7 @@ public class TransferAPI extends RMModelRequest
* @param transferId The identifier of a transfer * @param transferId The identifier of a transfer
* @param parameters The URL parameters to add * @param parameters The URL parameters to add
* @return The {@link TransferChildCollection} for the given {@code transferId} * @return The {@link TransferChildCollection} for the given {@code transferId}
* @throws Exception for the following cases: * @throws RuntimeException for the following cases:
* <ul> * <ul>
* <li>authentication fails</li> * <li>authentication fails</li>
* <li>current user does not have permission to read {@code transferId}</li> * <li>current user does not have permission to read {@code transferId}</li>

View File

@@ -73,7 +73,7 @@ public class TransferContainerAPI extends RMModelRequest
* @param transferContainerId The identifier of a transfer container * @param transferContainerId The identifier of a transfer container
* @param parameters The URL parameters to add * @param parameters The URL parameters to add
* @return The {@link TransferContainer} for the given {@code transferContainerId} * @return The {@link TransferContainer} for the given {@code transferContainerId}
* @throws Exception for the following cases: * @throws RuntimeException for the following cases:
* <ul> * <ul>
* <li>{@code transferContainerId} is not a valid format</li> * <li>{@code transferContainerId} is not a valid format</li>
* <li>authentication fails</li> * <li>authentication fails</li>
@@ -96,7 +96,7 @@ public class TransferContainerAPI extends RMModelRequest
/** /**
* see {@link #updateTransferContainer(TransferContainer, String, String) * 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); mandatoryObject("transferContainerModel", transferContainerModel);
mandatoryString("transferContainerId", transferContainerId); mandatoryString("transferContainerId", transferContainerId);
@@ -111,7 +111,7 @@ public class TransferContainerAPI extends RMModelRequest
* @param transferContainerId The identifier of a transfer container * @param transferContainerId The identifier of a transfer container
* @param parameters The URL parameters to add * @param parameters The URL parameters to add
* @param returns The updated {@link TransferContainer} * @param returns The updated {@link TransferContainer}
* @throws Exception for the following cases: * @throws RuntimeException for the following cases:
* <ul> * <ul>
* <li>the update request is invalid or {@code transferContainerId} is not a valid format or {@code transferContainerModel} is invalid</li> * <li>the update request is invalid or {@code transferContainerId} is not a valid format or {@code transferContainerModel} is invalid</li>
* <li>authentication fails</li> * <li>authentication fails</li>
@@ -121,7 +121,7 @@ public class TransferContainerAPI extends RMModelRequest
* <li>model integrity exception, including transfer container name with invalid characters</li> * <li>model integrity exception, including transfer container name with invalid characters</li>
* </ul> * </ul>
*/ */
public TransferContainer updateTransferContainer(TransferContainer transferContainerModel, String transferContainerId, String parameters) throws Exception public TransferContainer updateTransferContainer(TransferContainer transferContainerModel, String transferContainerId, String parameters)
{ {
mandatoryObject("transferContainerModel", transferContainerModel); mandatoryObject("transferContainerModel", transferContainerModel);
mandatoryString("transferContainerId", transferContainerId); mandatoryString("transferContainerId", transferContainerId);
@@ -151,7 +151,7 @@ public class TransferContainerAPI extends RMModelRequest
* @param transferContainerId The identifier of a transfer container * @param transferContainerId The identifier of a transfer container
* @param parameters The URL parameters to add * @param parameters The URL parameters to add
* @return The {@link TransferCollection} for the given {@code transferContainerId} * @return The {@link TransferCollection} for the given {@code transferContainerId}
* @throws Exception for the following cases: * @throws RuntimeException for the following cases:
* <ul> * <ul>
* <li>authentication fails</li> * <li>authentication fails</li>
* <li>current user does not have permission to read {@code transferContainerId}</li> * <li>current user does not have permission to read {@code transferContainerId}</li>

View File

@@ -39,6 +39,7 @@ import static org.springframework.http.HttpMethod.PUT;
import static org.testng.Assert.fail; import static org.testng.Assert.fail;
import java.io.File; import java.io.File;
import java.io.IOException;
import java.util.Iterator; import java.util.Iterator;
import com.fasterxml.jackson.databind.JsonNode; 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 unfiledContainerId The identifier of a unfiled record container
* @param parameters The URL parameters to add * @param parameters The URL parameters to add
* @return The {@link UnfiledContainer} for the given {@code unfiledContainerId} * @return The {@link UnfiledContainer} for the given {@code unfiledContainerId}
* @throws Exception for the following cases: * @throws RuntimeException for the following cases:
* <ul> * <ul>
* <li>{@code unfiledContainerId} is not a valid format</li> * <li>{@code unfiledContainerId} is not a valid format</li>
* <li>authentication fails</li> * <li>authentication fails</li>
@@ -122,7 +123,7 @@ public class UnfiledContainerAPI extends RMModelRequest
* @param unfiledContainerId The identifier of an unfiled records container * @param unfiledContainerId The identifier of an unfiled records container
* @param parameters The URL parameters to add * @param parameters The URL parameters to add
* @return The {@link UnfiledContainerChildCollection} for the given {@code unfiledContainerId} * @return The {@link UnfiledContainerChildCollection} for the given {@code unfiledContainerId}
* @throws Exception for the following cases: * @throws RuntimeException for the following cases:
* <ul> * <ul>
* <li>authentication fails</li> * <li>authentication fails</li>
* <li>current user does not have permission to read {@code unfiledContainerId}</li> * <li>current user does not have permission to read {@code unfiledContainerId}</li>
@@ -144,7 +145,7 @@ public class UnfiledContainerAPI extends RMModelRequest
/** /**
* see {@link #createUnfiledContainerChild(UnfiledContainerChild, String, String)} * 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); mandatoryObject("unfiledContainerChildModel", unfiledContainerChildModel);
mandatoryString("unfiledContainerId", unfiledContainerId); mandatoryString("unfiledContainerId", unfiledContainerId);
@@ -159,7 +160,7 @@ public class UnfiledContainerAPI extends RMModelRequest
* @param unfiledContainerId The identifier of an unfiled container * @param unfiledContainerId The identifier of an unfiled container
* @param parameters The URL parameters to add * @param parameters The URL parameters to add
* @return The created {@link UnfiledContainerChild} * @return The created {@link UnfiledContainerChild}
* @throws Exception for the following cases: * @throws RuntimeException for the following cases:
* <ul> * <ul>
* <li>{@code unfiledContainerId} is not a valid format or {@code unfiledContainerChildModel} is invalid</li> * <li>{@code unfiledContainerId} is not a valid format or {@code unfiledContainerChildModel} is invalid</li>
* <li>authentication fails</li> * <li>authentication fails</li>
@@ -169,7 +170,7 @@ public class UnfiledContainerAPI extends RMModelRequest
* <li>model integrity exception, including node name with invalid characters</li> * <li>model integrity exception, including node name with invalid characters</li>
* </ul> * </ul>
*/ */
public UnfiledContainerChild createUnfiledContainerChild(UnfiledContainerChild unfiledContainerChildModel, String unfiledContainerId, String parameters) throws Exception public UnfiledContainerChild createUnfiledContainerChild(UnfiledContainerChild unfiledContainerChildModel, String unfiledContainerId, String parameters)
{ {
mandatoryObject("unfiledContainerChildModel", unfiledContainerChildModel); mandatoryObject("unfiledContainerChildModel", unfiledContainerChildModel);
mandatoryString("unfiledContainerId", unfiledContainerId); 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 unfiledContainerChildContent {@link File} pointing to the content of the electronic record to be created
* @param unfiledContainerId The identifier of a unfiled container * @param unfiledContainerId The identifier of a unfiled container
* @return newly created {@link UnfiledContainerChild} * @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("unfiledContainerChildModel", unfiledContainerChildModel);
mandatoryObject("unfiledContainerChildContent", unfiledContainerChildContent); mandatoryObject("unfiledContainerChildContent", unfiledContainerChildContent);
@@ -208,7 +209,15 @@ public class UnfiledContainerAPI extends RMModelRequest
* to the request. * to the request.
*/ */
RequestSpecBuilder builder = getRmRestWrapper().configureRequestSpec(); 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 // add request fields
Iterator<String> fieldNames = root.fieldNames(); Iterator<String> fieldNames = root.fieldNames();
while (fieldNames.hasNext()) while (fieldNames.hasNext())
@@ -225,7 +234,7 @@ public class UnfiledContainerAPI extends RMModelRequest
/** /**
* see {@link #updateUnfiledContainer(UnfiledContainer, String, String) * 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); mandatoryObject("unfiledContainerModel", unfiledContainerModel);
mandatoryString("unfiledContainerId", unfiledContainerId); mandatoryString("unfiledContainerId", unfiledContainerId);
@@ -240,7 +249,7 @@ public class UnfiledContainerAPI extends RMModelRequest
* @param unfiledContainerId The identifier of an unfiled record container * @param unfiledContainerId The identifier of an unfiled record container
* @param parameters The URL parameters to add * @param parameters The URL parameters to add
* @param returns The updated {@link UnfiledContainer} * @param returns The updated {@link UnfiledContainer}
* @throws Exception for the following cases: * @throws RuntimeException for the following cases:
* <ul> * <ul>
* <li>the update request is invalid or {@code unfiledContainerId} is not a valid format or {@code unfiledContainerModel} is invalid</li> * <li>the update request is invalid or {@code unfiledContainerId} is not a valid format or {@code unfiledContainerModel} is invalid</li>
* <li>authentication fails</li> * <li>authentication fails</li>
@@ -250,7 +259,7 @@ public class UnfiledContainerAPI extends RMModelRequest
* <li>model integrity exception, including file name with invalid characters</li> * <li>model integrity exception, including file name with invalid characters</li>
* </ul> * </ul>
*/ */
public UnfiledContainer updateUnfiledContainer(UnfiledContainer unfiledContainerModel, String unfiledContainerId, String parameters) throws Exception public UnfiledContainer updateUnfiledContainer(UnfiledContainer unfiledContainerModel, String unfiledContainerId, String parameters)
{ {
mandatoryObject("unfiledContainerModel", unfiledContainerModel); mandatoryObject("unfiledContainerModel", unfiledContainerModel);
mandatoryString("unfiledContainerId", unfiledContainerId); mandatoryString("unfiledContainerId", unfiledContainerId);

View File

@@ -40,6 +40,7 @@ import static org.springframework.http.HttpMethod.PUT;
import static org.testng.Assert.fail; import static org.testng.Assert.fail;
import java.io.File; import java.io.File;
import java.io.IOException;
import java.util.Iterator; import java.util.Iterator;
import com.fasterxml.jackson.databind.JsonNode; 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 unfiledRecordFolderId The identifier of a unfiled record folder
* @param parameters The URL parameters to add * @param parameters The URL parameters to add
* @return The {@link UnfiledRecordFolder} for the given {@code unfiledRecordFolderId} * @return The {@link UnfiledRecordFolder} for the given {@code unfiledRecordFolderId}
* @throws Exception for the following cases: * @throws RuntimeException for the following cases:
* <ul> * <ul>
* <li>{@code unfiledRecordFolderId} is not a valid format</li> * <li>{@code unfiledRecordFolderId} is not a valid format</li>
* <li>authentication fails</li> * <li>authentication fails</li>
@@ -122,7 +123,7 @@ public class UnfiledRecordFolderAPI extends RMModelRequest
* @param unfiledRecordFolderId The identifier of an unfiled records folder * @param unfiledRecordFolderId The identifier of an unfiled records folder
* @param parameters The URL parameters to add * @param parameters The URL parameters to add
* @return The {@link UnfiledRecordFolderChildCollection} for the given {@code unfiledRecordFolderId} * @return The {@link UnfiledRecordFolderChildCollection} for the given {@code unfiledRecordFolderId}
* @throws Exception for the following cases: * @throws RuntimeException for the following cases:
* <ul> * <ul>
* <li>authentication fails</li> * <li>authentication fails</li>
* <li>current user does not have permission to read {@code unfiledRecordFolderId}</li> * <li>current user does not have permission to read {@code unfiledRecordFolderId}</li>
@@ -144,7 +145,7 @@ public class UnfiledRecordFolderAPI extends RMModelRequest
/** /**
* see {@link #createUnfiledRecordFolderChild(UnfiledContainerChild, String, String)} * 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); mandatoryObject("unfiledRecordFolderChildModel", unfiledRecordFolderChildModel);
mandatoryString("unfiledRecordFolderId", unfiledRecordFolderId); mandatoryString("unfiledRecordFolderId", unfiledRecordFolderId);
@@ -159,7 +160,7 @@ public class UnfiledRecordFolderAPI extends RMModelRequest
* @param unfiledRecordFolderId The identifier of an unfiled folder * @param unfiledRecordFolderId The identifier of an unfiled folder
* @param parameters The URL parameters to add * @param parameters The URL parameters to add
* @return The created {@link UnfiledRecordFolderChild} * @return The created {@link UnfiledRecordFolderChild}
* @throws Exception for the following cases: * @throws RuntimeException for the following cases:
* <ul> * <ul>
* <li>{@code unfiledRecordFolderId} is not a valid format or {@code unfiledRecordFolderChildModel} is invalid</li> * <li>{@code unfiledRecordFolderId} is not a valid format or {@code unfiledRecordFolderChildModel} is invalid</li>
* <li>authentication fails</li> * <li>authentication fails</li>
@@ -169,7 +170,7 @@ public class UnfiledRecordFolderAPI extends RMModelRequest
* <li>model integrity exception, including node name with invalid characters</li> * <li>model integrity exception, including node name with invalid characters</li>
* </ul> * </ul>
*/ */
public UnfiledContainerChild createUnfiledRecordFolderChild(UnfiledContainerChild unfiledRecordFolderChildModel, String unfiledRecordFolderId, String parameters) throws Exception public UnfiledContainerChild createUnfiledRecordFolderChild(UnfiledContainerChild unfiledRecordFolderChildModel, String unfiledRecordFolderId, String parameters)
{ {
mandatoryObject("unfiledRecordFolderChildModel", unfiledRecordFolderChildModel); mandatoryObject("unfiledRecordFolderChildModel", unfiledRecordFolderChildModel);
mandatoryString("unfiledRecordFolderId", unfiledRecordFolderId); 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 unfiledRecordFolderChildContent {@link File} pointing to the content of the electronic record to be created
* @param unfiledRecordFolderId The identifier of a unfiled record folder * @param unfiledRecordFolderId The identifier of a unfiled record folder
* @return newly created {@link UnfiledContainerChild} * @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("unfiledRecordFolderChildModel", unfiledRecordFolderChildModel);
mandatoryObject("unfiledRecordFolderChildContent", unfiledRecordFolderChildContent); mandatoryObject("unfiledRecordFolderChildContent", unfiledRecordFolderChildContent);
@@ -208,7 +209,15 @@ public class UnfiledRecordFolderAPI extends RMModelRequest
* to the request. * to the request.
*/ */
RequestSpecBuilder builder = getRmRestWrapper().configureRequestSpec(); 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 // add request fields
Iterator<String> fieldNames = root.fieldNames(); Iterator<String> fieldNames = root.fieldNames();
while (fieldNames.hasNext()) while (fieldNames.hasNext())
@@ -225,7 +234,7 @@ public class UnfiledRecordFolderAPI extends RMModelRequest
/** /**
* see {@link #updateUnfiledRecordFolder(UnfiledRecordFolder, String, String) * 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); mandatoryObject("unfiledRecordFolderModel", unfiledRecordFolderModel);
mandatoryString("unfiledRecordFolderId", unfiledRecordFolderId); mandatoryString("unfiledRecordFolderId", unfiledRecordFolderId);
@@ -240,7 +249,7 @@ public class UnfiledRecordFolderAPI extends RMModelRequest
* @param unfiledRecordFolderId The identifier of an unfiled record folder * @param unfiledRecordFolderId The identifier of an unfiled record folder
* @param parameters The URL parameters to add * @param parameters The URL parameters to add
* @param returns The updated {@link UnfiledRecordFolder} * @param returns The updated {@link UnfiledRecordFolder}
* @throws Exception for the following cases: * @throws RuntimeException for the following cases:
* <ul> * <ul>
* <li>the update request is invalid or {@code unfiledRecordFolderId} is not a valid format or {@code unfiledRecordFolderModel} is invalid</li> * <li>the update request is invalid or {@code unfiledRecordFolderId} is not a valid format or {@code unfiledRecordFolderModel} is invalid</li>
* <li>authentication fails</li> * <li>authentication fails</li>
@@ -250,7 +259,7 @@ public class UnfiledRecordFolderAPI extends RMModelRequest
* <li>model integrity exception, including file name with invalid characters</li> * <li>model integrity exception, including file name with invalid characters</li>
* </ul> * </ul>
*/ */
public UnfiledRecordFolder updateUnfiledRecordFolder(UnfiledRecordFolder unfiledRecordFolderModel, String unfiledRecordFolderId, String parameters) throws Exception public UnfiledRecordFolder updateUnfiledRecordFolder(UnfiledRecordFolder unfiledRecordFolderModel, String unfiledRecordFolderId, String parameters)
{ {
mandatoryObject("unfiledRecordFolderModel", unfiledRecordFolderModel); mandatoryObject("unfiledRecordFolderModel", unfiledRecordFolderModel);
mandatoryString("unfiledRecordFolderId", unfiledRecordFolderId); mandatoryString("unfiledRecordFolderId", unfiledRecordFolderId);
@@ -268,7 +277,7 @@ public class UnfiledRecordFolderAPI extends RMModelRequest
* Deletes an unfiled record folder. * Deletes an unfiled record folder.
* *
* @param unfiledRecordFolderId The identifier of a unfiled record folder * @param unfiledRecordFolderId The identifier of a unfiled record folder
* @throws Exception for the following cases: * @throws RuntimeException for the following cases:
* <ul> * <ul>
* <li>{@code unfiledRecordFolderId} is not a valid format</li> * <li>{@code unfiledRecordFolderId} is not a valid format</li>
* <li>authentication fails</li> * <li>authentication fails</li>