java.lang.Object
org.alfresco.rest.requests.ModelRequest<Request>
org.alfresco.rest.rm.community.requests.RMModelRequest
org.alfresco.rest.rm.community.requests.gscore.api.FilePlanAPI

public class FilePlanAPI extends RMModelRequest
File plan REST API Wrapper
Since:
2.6
Author:
Ramona Popa, Tuna Aksoy
  • Constructor Details

    • FilePlanAPI

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

    • getFilePlan

      public FilePlan getFilePlan(String filePlanId)
    • getFilePlan

      public FilePlan getFilePlan(String filePlanId, String parameters)
      Gets a file plan.
      Parameters:
      filePlanId - The identifier of a file plan
      parameters - The URL parameters to add
      Returns:
      The FilePlan for the given filePlanId
      Throws:
      RuntimeException - for the following cases:
      • filePlanId is not a valid format
      • authentication fails
      • current user does not have permission to read filePlanId
      • filePlanId does not exist
    • getRootRecordCategories

      public RecordCategoryCollection getRootRecordCategories(String filePlanId)
    • getRootRecordCategories

      public RecordCategoryCollection getRootRecordCategories(String filePlanId, String parameters)
      Gets the children (root categories) of a file plan.
      Parameters:
      filePlanId - The identifier of a file plan
      parameters - The URL parameters to add
      Returns:
      The RecordCategoryCollection for the given filePlanId
      Throws:
      RuntimeException - for the following cases:
      • authentication fails
      • current user does not have permission to read filePlanId
      • filePlanId does not exist
    • createRootRecordCategory

      public RecordCategory createRootRecordCategory(RecordCategory recordCategoryModel, String filePlanId)
    • createRootRecordCategory

      public RecordCategory createRootRecordCategory(RecordCategory recordCategoryModel, String filePlanId, String parameters)
      Creates a root record category.
      Parameters:
      recordCategoryModel - The record category model which holds the information
      filePlanId - The identifier of a file plan
      parameters - The URL parameters to add
      Returns:
      The created RecordCategory
      Throws:
      RuntimeException - for the following cases:
      • filePlanId is not a valid format or filePlanId is invalid
      • authentication fails
      • current user does not have permission to add children to filePlanId
      • filePlanIds does not exist
      • new name clashes with an existing node in the current parent container
      • model integrity exception, including node name with invalid characters
    • updateFilePlan

      public FilePlan updateFilePlan(FilePlan filePlanModel, String filePlanId)
    • updateFilePlan

      public FilePlan updateFilePlan(FilePlan filePlanModel, String filePlanId, String parameters)
      Updates a file plan.
      Parameters:
      filePlanModel - The file plan model which holds the information
      filePlanId - The identifier of the file plan
      parameters - The URL parameters to add
      Throws:
      RuntimeException - for the following cases:
      • the update request is invalid or filePlanId is not a valid format or filePlanModel is invalid
      • authentication fails
      • current user does not have permission to update filePlanId
      • filePlanId does not exist
      • model integrity exception, including file name with invalid characters
    • createHold

      public Hold createHold(Hold holdModel, String filePlanId, String parameters)
      Creates a hold.
      Parameters:
      holdModel - The hold model
      filePlanId - The identifier of a file plan
      parameters - The URL parameters to add
      Returns:
      The created Hold
      Throws:
      RuntimeException - for the following cases:
      • filePlanId is not a valid format or filePlanId is invalid
      • authentication fails
      • current user does not have permission to add children to filePlanId
      • filePlanIds does not exist
      • new name clashes with an existing node in the current parent container
    • createHold

      public Hold createHold(Hold holdModel, String filePlanId)
    • getHolds

      public HoldCollection getHolds(String filePlanId, String parameters)
      Gets the holds of a file plan.
      Parameters:
      filePlanId - The identifier of a file plan
      parameters - The URL parameters to add
      Returns:
      The HoldCollection for the given filePlanId
      Throws:
      RuntimeException - for the following cases:
      • authentication fails
      • current user does not have permission to read filePlanId
      • filePlanId does not exist
    • getHolds

      public HoldCollection getHolds(String filePlanId)
    • getFilePlanRoles

      public RoleCollection getFilePlanRoles(String filePlanId, String parameters)
      Gets the roles of a file plan.
      Parameters:
      filePlanId - The identifier of a file plan
      parameters - The URL parameters to add
      Returns:
      The {Pagination and RoleModel Entries} for the given filePlanId
      Throws:
      RuntimeException - for the following cases:
      • authentication fails
      • current user does not have permission to read filePlanId
      • filePlanId does not exist
    • getFilePlanRoles

      public RoleCollection getFilePlanRoles(String filePlanId)