Class UnfiledRecordFolderAPI


  • public class UnfiledRecordFolderAPI
    extends RMModelRequest
    Unfiled Record Folders REST API Wrapper
    Since:
    2.6
    Author:
    Ramona Popa
    • Constructor Detail

      • UnfiledRecordFolderAPI

        public UnfiledRecordFolderAPI​(RMRestWrapper rmRestWrapper)
        Parameters:
        rmRestWrapper - RM REST Wrapper
    • Method Detail

      • getUnfiledRecordFolder

        public UnfiledRecordFolder getUnfiledRecordFolder​(String unfiledRecordFolderId,
                                                          String parameters)
        Gets an unfiled record folder.
        Parameters:
        unfiledRecordFolderId - The identifier of a unfiled record folder
        parameters - The URL parameters to add
        Returns:
        The UnfiledRecordFolder for the given unfiledRecordFolderId
        Throws:
        RuntimeException - for the following cases:
        • unfiledRecordFolderId is not a valid format
        • authentication fails
        • current user does not have permission to read unfiledRecordFolderId
        • unfiledRecordFolderId does not exist
      • getUnfiledRecordFolderChildren

        public UnfiledContainerChildCollection getUnfiledRecordFolderChildren​(String unfiledRecordFolderId,
                                                                              String parameters)
        Gets the children of an unfiled record folder
        Parameters:
        unfiledRecordFolderId - The identifier of an unfiled records folder
        parameters - The URL parameters to add
        Returns:
        The UnfiledRecordFolderChildCollection for the given unfiledRecordFolderId
        Throws:
        RuntimeException - for the following cases:
        • authentication fails
        • current user does not have permission to read unfiledRecordFolderId
        • unfiledRecordFolderId does not exist
      • createUnfiledRecordFolderChild

        public UnfiledContainerChild createUnfiledRecordFolderChild​(UnfiledContainerChild unfiledRecordFolderChildModel,
                                                                    String unfiledRecordFolderId,
                                                                    String parameters)
        Creates an unfiled record folder child. Can be a record or an unfiled record folder.
        Parameters:
        unfiledRecordFolderChildModel - The unfiled folder child model which holds the information
        unfiledRecordFolderId - The identifier of an unfiled folder
        parameters - The URL parameters to add
        Returns:
        The created UnfiledRecordFolderChild
        Throws:
        RuntimeException - for the following cases:
        • unfiledRecordFolderId is not a valid format or unfiledRecordFolderChildModel is invalid
        • authentication fails
        • current user does not have permission to add children to unfiledRecordFolderId
        • unfiledRecordFolderId does not exist
        • new name clashes with an existing node in the current parent container
        • model integrity exception, including node name with invalid characters
      • uploadRecord

        public UnfiledContainerChild uploadRecord​(UnfiledContainerChild unfiledRecordFolderChildModel,
                                                  String unfiledRecordFolderId,
                                                  File unfiledRecordFolderChildContent)
        Create a record from file resource
        Parameters:
        unfiledRecordFolderChildModel - UnfiledContainerChild for electronic record to be created
        unfiledRecordFolderChildContent - File pointing to the content of the electronic record to be created
        unfiledRecordFolderId - The identifier of a unfiled record folder
        Returns:
        newly created UnfiledContainerChild
        Throws:
        RuntimeException - for invalid recordModel JSON strings
      • updateUnfiledRecordFolder

        public UnfiledRecordFolder updateUnfiledRecordFolder​(UnfiledRecordFolder unfiledRecordFolderModel,
                                                             String unfiledRecordFolderId,
                                                             String parameters)
        Updates an unfiled record folder
        Parameters:
        unfiledRecordFolderModel - The unfiled record folder model which holds the information
        unfiledRecordFolderId - The identifier of an unfiled record folder
        parameters - The URL parameters to add
        returns - The updated UnfiledRecordFolder
        Throws:
        RuntimeException - for the following cases:
        • the update request is invalid or unfiledRecordFolderId is not a valid format or unfiledRecordFolderModel is invalid
        • authentication fails
        • current user does not have permission to update unfiledRecordFolderId
        • unfiledRecordFolderId does not exist
        • the updated name clashes with an existing root category of special container in the current fileplan
        • model integrity exception, including file name with invalid characters
      • deleteUnfiledRecordFolder

        public void deleteUnfiledRecordFolder​(String unfiledRecordFolderId)
        Deletes an unfiled record folder.
        Parameters:
        unfiledRecordFolderId - The identifier of a unfiled record folder
        Throws:
        RuntimeException - for the following cases:
        • unfiledRecordFolderId is not a valid format
        • authentication fails
        • current user does not have permission to delete unfiledRecordFolderId
        • unfiledRecordFolderId does not exist
        • unfiledRecordFolderId is locked and cannot be deleted