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 Details

    • RecordCategoryAPI

      public RecordCategoryAPI(RMRestWrapper rmRestWrapper)
      Constructor.
      Parameters:
      rmRestWrapper - RM REST Wrapper
  • Method Details

    • deleteRecordCategory

      public void deleteRecordCategory(String recordCategoryId)
      Deletes a record category.
      Parameters:
      recordCategoryId - The identifier of a record category
      Throws:
      RuntimeException - for the following cases:
      • recordCategoryId is not a valid format
      • authentication fails
      • current user does not have permission to delete recordCategoryId
      • recordCategoryId does not exist
      • recordCategoryId is 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 category
      parameters - The URL parameters to add
      Returns:
      The RecordCategory for the given recordCategoryId
      Throws:
      RuntimeException - for the following cases:
      • recordCategoryId is not a valid format
      • authentication fails
      • current user does not have permission to read recordCategoryId
      • recordCategoryId does 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 information
      recordCategoryId - The identifier of a record category
      parameters - The URL parameters to add
      returns - The updated RecordCategory
      Throws:
      RuntimeException - for the following cases:
      • the update request is invalid or recordCategoryId is not a valid format or recordCategoryModel is invalid
      • authentication fails
      • current user does not have permission to update recordCategoryId
      • recordCategoryId does 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
    • 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 category
      parameters - The URL parameters to add
      Returns:
      The RecordCategoryChildCollection for the given recordCategoryId
      Throws:
      RuntimeException - for the following cases:
      • authentication fails
      • current user does not have permission to read recordCategoryId
      • recordCategoryId does 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 information
      recordCategoryId - The identifier of a record category
      parameters - The URL parameters to add
      Returns:
      The created RecordCategoryChild
      Throws:
      RuntimeException - for the following cases:
      • recordCategoryId is not a valid format or recordCategoryChildModel is invalid
      • authentication fails
      • current user does not have permission to add children to recordCategoryId
      • recordCategoryId does not exist
      • new name clashes with an existing node in the current parent container
      • model integrity exception, including node name with invalid characters