Class RecordCategoryAPI
java.lang.Object
org.alfresco.rest.requests.ModelRequest<Request>
org.alfresco.rest.rm.community.requests.RMModelRequest
org.alfresco.rest.rm.community.requests.gscore.api.RecordCategoryAPI
Record category REST API Wrapper
- Since:
- 2.6
- Author:
- Tuna Aksoy
-
Field Summary
Fields inherited from class org.alfresco.rest.requests.ModelRequest
restWrapper -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateRecordCategoryChild(RecordCategoryChild recordCategoryChildModel, String recordCategoryId) createRecordCategoryChild(RecordCategoryChild recordCategoryChildModel, String recordCategoryId, String parameters) Creates a record category child.voiddeleteRecordCategory(String recordCategoryId) Deletes a record category.getRecordCategory(String recordCategoryId) getRecordCategory(String recordCategoryId, String parameters) Gets a record category.getRecordCategoryChildren(String recordCategoryId) getRecordCategoryChildren(String recordCategoryId, String parameters) Gets the children of a record category.updateRecordCategory(RecordCategory recordCategoryModel, String recordCategoryId) updateRecordCategory(RecordCategory recordCategoryModel, String recordCategoryId, String parameters) Updates a record category.Methods inherited from class org.alfresco.rest.requests.ModelRequest
include, includePath, usingParams
-
Constructor Details
-
RecordCategoryAPI
Constructor.- Parameters:
rmRestWrapper- RM REST Wrapper
-
-
Method Details
-
deleteRecordCategory
Deletes a record category.- Parameters:
recordCategoryId- The identifier of a record category- Throws:
RuntimeException- for the following cases:recordCategoryIdis not a valid format- authentication fails
- current user does not have permission to delete
recordCategoryId recordCategoryIddoes not existrecordCategoryIdis locked and cannot be deleted
-
getRecordCategory
-
getRecordCategory
Gets a record category.- Parameters:
recordCategoryId- The identifier of a record categoryparameters- The URL parameters to add- Returns:
- The
RecordCategoryfor the givenrecordCategoryId - Throws:
RuntimeException- for the following cases:recordCategoryIdis not a valid format- authentication fails
- current user does not have permission to read
recordCategoryId recordCategoryIddoes not exist
-
updateRecordCategory
public RecordCategory updateRecordCategory(RecordCategory recordCategoryModel, String recordCategoryId) -
updateRecordCategory
public RecordCategory updateRecordCategory(RecordCategory recordCategoryModel, String recordCategoryId, String parameters) Updates a record category.- Parameters:
recordCategoryModel- The record category model which holds the informationrecordCategoryId- The identifier of a record categoryparameters- The URL parameters to addreturns- The updatedRecordCategory- Throws:
RuntimeException- for the following cases:- the update request is invalid or
recordCategoryIdis not a valid format orrecordCategoryModelis invalid - authentication fails
- current user does not have permission to update
recordCategoryId recordCategoryIddoes not exist- the updated name clashes with an existing record category in the current parent category
- model integrity exception, including file name with invalid characters
- the update request is invalid or
-
getRecordCategoryChildren
-
getRecordCategoryChildren
public RecordCategoryChildCollection getRecordCategoryChildren(String recordCategoryId, String parameters) Gets the children of a record category.- Parameters:
recordCategoryId- The identifier of a record categoryparameters- The URL parameters to add- Returns:
- The
RecordCategoryChildCollectionfor the givenrecordCategoryId - Throws:
RuntimeException- for the following cases:- authentication fails
- current user does not have permission to read
recordCategoryId recordCategoryIddoes not exist
-
createRecordCategoryChild
public RecordCategoryChild createRecordCategoryChild(RecordCategoryChild recordCategoryChildModel, String recordCategoryId) -
createRecordCategoryChild
public RecordCategoryChild createRecordCategoryChild(RecordCategoryChild recordCategoryChildModel, String recordCategoryId, String parameters) Creates a record category child. Can be a record category or a record folder.- Parameters:
recordCategoryChildModel- The record category child model which holds the informationrecordCategoryId- The identifier of a record categoryparameters- The URL parameters to add- Returns:
- The created
RecordCategoryChild - Throws:
RuntimeException- for the following cases:recordCategoryIdis not a valid format orrecordCategoryChildModelis invalid- authentication fails
- current user does not have permission to add children to
recordCategoryId recordCategoryIddoes not exist- new name clashes with an existing node in the current parent container
- model integrity exception, including node name with invalid characters
-