Class RecordsAPI
java.lang.Object
org.alfresco.rest.requests.ModelRequest<Request>
org.alfresco.rest.rm.community.requests.RMModelRequest
org.alfresco.rest.rm.community.requests.gscore.api.RecordsAPI
Records REST API Wrapper
- Since:
- 2.6
- Author:
- Rodica Sutu
-
Field Summary
Fields inherited from class org.alfresco.rest.requests.ModelRequest
restWrapper -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncompleteRecord(String recordId) completeRecord(String recordId, String parameters) Complete the record recordIdvoiddeleteRecord(String recordId) Deletes a record.fileRecord(RecordBodyFile recordBodyFile, String recordId) File the record recordId into file plan structure based on the location sent via the request bodyfileRecord(RecordBodyFile recordBodyFile, String recordId, String parameters) File the record recordId into file plan structure based on the location sent via the request bodyGets a record.io.restassured.response.ResponseBody<?>getRecordContent(String recordId) Get the content for the electronic recordupdateRecord(Record recordModel, String recordId) updateRecord(Record recordModel, String recordId, String parameters) Updates a record.Methods inherited from class org.alfresco.rest.requests.ModelRequest
include, includePath, usingParams
-
Constructor Details
-
RecordsAPI
- Parameters:
rmRestWrapper- RM REST Wrapper
-
-
Method Details
-
getRecordContent
Get the content for the electronic record- Parameters:
recordId- The id of the electronic record- Returns:
ResponseBodyrepresenting content for the given record id- Throws:
RuntimeException- for the following cases:recordIdhas no contentrecordIdis not a valid format, or is not a record- authentication fails
recordIddoes not exist
-
fileRecord
File the record recordId into file plan structure based on the location sent via the request body- Parameters:
recordBodyFile- The properties where to file the recordrecordId- The id of the record to file- Returns:
- The
Recordwith the given properties - Throws:
RuntimeException- for the following cases:- Invalid parameter:
recordBodyFileis not a valid format,recordIdis not a record - authentication fails
- current user does not have permission to file to
fileplanComponentId recordIddoes not exist- targetParentId from recordBodyFile does not exist
- model integrity exception: the action breaks system's integrity restrictions
- Invalid parameter:
-
fileRecord
File the record recordId into file plan structure based on the location sent via the request body- Parameters:
recordBodyFile- The properties where to file the recordrecordId- The id of the record to file- Returns:
- The
Recordwith the given properties - Throws:
RuntimeException- for the following cases:- Invalid parameter:
recordBodyFileis not a valid format,recordIdis not a record - authentication fails
- current user does not have permission to file to
fileplanComponentId recordIddoes not exist- targetParentId from recordBodyFile does not exist
- model integrity exception: the action breaks system's integrity restrictions
- Invalid parameter:
-
completeRecord
-
completeRecord
Complete the record recordId- Parameters:
recordId- The id of the record to complete- Returns:
- The completed
Recordwith the given properties - Throws:
RuntimeException- for the following cases:- Invalid parameter:
recordIdis not a record - authentication fails
- current user does not have permission to complete
recordId recordIddoes not exist or is frozen- model integrity exception: the record is already completed
- model integrity exception: the record has missing meta-data
- Invalid parameter:
-
deleteRecord
Deletes a record.- Parameters:
recordId- The identifier of a record- Throws:
RuntimeException- for the following cases:recordIdis not a valid format- authentication fails
- current user does not have permission to delete
recordId recordIddoes not existrecordIdis locked and cannot be deleted
-
getRecord
-
getRecord
Gets a record.- Parameters:
recordId- The identifier of a recordparameters- The URL parameters to add- Returns:
- The
Recordfor the givenrecordId - Throws:
RuntimeException- for the following cases:recordIdis not a valid format- authentication fails
- current user does not have permission to read
recordId recordIddoes not exist
-
updateRecord
-
updateRecord
Updates a record.- Parameters:
recordModel- The record model which holds the informationrecordId- The identifier of a recordparameters- The URL parameters to add- Returns:
- The updated
Record - Throws:
RuntimeException- for the following cases:- the update request is invalid or
recordIdis not a valid format orrecordModelis invalid - authentication fails
- current user does not have permission to update
recordId recordIddoes not exist- the updated name clashes with an existing record in the current parent folder
- model integrity exception, including file name with invalid characters
- the update request is invalid or
-