Class FilePlanAPI


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

      • FilePlanAPI

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

      • 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,
                                                                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,
                                                       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,
                                       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