Class RecordCategoriesAPI


  • @Component
    public class RecordCategoriesAPI
    extends BaseAPI
    Methods to make API requests using v0 API on record categories
    Since:
    2.5
    Author:
    Oana Nechiforescu
    • Constructor Detail

      • RecordCategoriesAPI

        public RecordCategoriesAPI()
    • Method Detail

      • createRetentionSchedule

        public org.apache.http.HttpResponse createRetentionSchedule​(String user,
                                                                    String password,
                                                                    String categoryName)
        Creates a retention schedule for the category given as parameter
        Parameters:
        user - the user creating the disposition schedule
        password - the user's password
        categoryName - the category name to create the retention schedule for
        Returns:
        The HTTP Response.
      • getDispositionScheduleNodeRef

        public String getDispositionScheduleNodeRef​(String user,
                                                    String password,
                                                    String categoryName)
        Get the disposition schedule nodeRef
        Parameters:
        user -
        password -
        categoryName -
        Returns:
        the disposition schedule nodeRef
      • setRetentionScheduleGeneralFields

        public org.apache.http.HttpResponse setRetentionScheduleGeneralFields​(String user,
                                                                              String password,
                                                                              String retentionNodeRef,
                                                                              Map<BaseAPI.RETENTION_SCHEDULE,​String> retentionProperties,
                                                                              Boolean appliedToRecords)
        Sets retention schedule authority and instructions, also if it is applied to records or folders
        Parameters:
        user - the user creating the disposition schedule
        password - the user's password
        retentionNodeRef - the retention nodeRef
        Returns:
        The HTTP Response.
      • addDispositionScheduleSteps

        public org.apache.http.HttpResponse addDispositionScheduleSteps​(String user,
                                                                        String password,
                                                                        String categoryName,
                                                                        Map<BaseAPI.RETENTION_SCHEDULE,​String> properties)
        Creates a retention schedule steps for the category given as parameter
        Parameters:
        user - the user creating the disposition schedule
        password - the user's password
        categoryName - the category name to create the retention schedule for
        Returns:
        The HTTP Response.
      • deleteCategory

        public void deleteCategory​(String username,
                                   String password,
                                   String categoryName)
        Delete a category
        Parameters:
        username - user's username
        password - its password
        categoryName - the name of the category
        Throws:
        AssertionError - if the delete was unsuccessful.
      • deleteSubCategory

        public void deleteSubCategory​(String username,
                                      String password,
                                      String categoryName,
                                      String subCategoryName)
        Delete a sub-category
        Parameters:
        username - user's username
        password - its password
        categoryName - the name of the sub-category
        Throws:
        AssertionError - if the deletion was unsuccessful.
      • deleteFolderInContainer

        public void deleteFolderInContainer​(String username,
                                            String password,
                                            String folderName,
                                            String containerName)
        Delete a folder inside a container in RM site
        Parameters:
        username - user's username
        password - its password
        folderName - folder name
        containerName - the name of the category or container sin which the folder is
        Throws:
        AssertionError - if the deletion was unsuccessful.
      • getRetentionProperties

        public Map<BaseAPI.RETENTION_SCHEDULE,​String> getRetentionProperties​(String authority,
                                                                                   String instructions)
        Returns a map of retention properties
        Parameters:
        authority - retention authority
        instructions - retention authority
        Returns:
        the map