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
-
public class RecordCategoryAPI extends RMModelRequest
Record category REST API Wrapper- Since:
- 2.6
- Author:
- Tuna Aksoy
-
-
Constructor Summary
Constructors Constructor Description RecordCategoryAPI(RMRestWrapper rmRestWrapper)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RecordCategoryChildcreateRecordCategoryChild(RecordCategoryChild recordCategoryChildModel, String recordCategoryId)RecordCategoryChildcreateRecordCategoryChild(RecordCategoryChild recordCategoryChildModel, String recordCategoryId, String parameters)Creates a record category child.voiddeleteRecordCategory(String recordCategoryId)Deletes a record category.RecordCategorygetRecordCategory(String recordCategoryId)RecordCategorygetRecordCategory(String recordCategoryId, String parameters)Gets a record category.RecordCategoryChildCollectiongetRecordCategoryChildren(String recordCategoryId)RecordCategoryChildCollectiongetRecordCategoryChildren(String recordCategoryId, String parameters)Gets the children of a record category.RecordCategoryupdateRecordCategory(RecordCategory recordCategoryModel, String recordCategoryId)RecordCategoryupdateRecordCategory(RecordCategory recordCategoryModel, String recordCategoryId, String parameters)Updates a record category.
-
-
-
Constructor Detail
-
RecordCategoryAPI
public RecordCategoryAPI(RMRestWrapper rmRestWrapper)
Constructor.- Parameters:
rmRestWrapper- RM REST Wrapper
-
-
Method Detail
-
deleteRecordCategory
public void deleteRecordCategory(String recordCategoryId)
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
public RecordCategory getRecordCategory(String recordCategoryId)
-
getRecordCategory
public RecordCategory getRecordCategory(String recordCategoryId, String parameters)
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
public RecordCategoryChildCollection getRecordCategoryChildren(String recordCategoryId)
-
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
-
-