Class UnfiledContainerAPI

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

public class UnfiledContainerAPI extends RMModelRequest
Unfiled Container REST API Wrapper
Since:
2.6
Author:
Tuna Aksoy, Ana Bozianu
  • Constructor Details

    • UnfiledContainerAPI

      public UnfiledContainerAPI(RMRestWrapper rmRestWrapper)
      Parameters:
      rmRestWrapper - RM REST Wrapper
  • Method Details

    • getUnfiledContainer

      public UnfiledContainer getUnfiledContainer(String unfiledContainerId)
    • getUnfiledContainer

      public UnfiledContainer getUnfiledContainer(String unfiledContainerId, String parameters)
      Gets an unfiled record container.
      Parameters:
      unfiledContainerId - The identifier of a unfiled record container
      parameters - The URL parameters to add
      Returns:
      The UnfiledContainer for the given unfiledContainerId
      Throws:
      RuntimeException - for the following cases:
      • unfiledContainerId is not a valid format
      • authentication fails
      • current user does not have permission to read unfiledContainerId
      • unfiledContainerId does not exist
    • getUnfiledContainerChildren

      public UnfiledContainerChildCollection getUnfiledContainerChildren(String unfiledContainerId)
    • getUnfiledContainerChildren

      public UnfiledContainerChildCollection getUnfiledContainerChildren(String unfiledContainerId, String parameters)
      Gets the children of an unfiled records container
      Parameters:
      unfiledContainerId - The identifier of an unfiled records container
      parameters - The URL parameters to add
      Returns:
      The UnfiledContainerChildCollection for the given unfiledContainerId
      Throws:
      RuntimeException - for the following cases:
      • authentication fails
      • current user does not have permission to read unfiledContainerId
      • unfiledContainerId does not exist
    • createUnfiledContainerChild

      public UnfiledContainerChild createUnfiledContainerChild(UnfiledContainerChild unfiledContainerChildModel, String unfiledContainerId)
    • createUnfiledContainerChild

      public UnfiledContainerChild createUnfiledContainerChild(UnfiledContainerChild unfiledContainerChildModel, String unfiledContainerId, String parameters)
      Creates an unfiled container child. Can be a record or an unfiled record folder.
      Parameters:
      unfiledContainerChildModel - The unfiled container child model which holds the information
      unfiledContainerId - The identifier of an unfiled container
      parameters - The URL parameters to add
      Returns:
      The created UnfiledContainerChild
      Throws:
      RuntimeException - for the following cases:
      • unfiledContainerId is not a valid format or unfiledContainerChildModel is invalid
      • authentication fails
      • current user does not have permission to add children to unfiledContainerId
      • unfiledContainerId 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 unfiledContainerChildModel, String unfiledContainerId, File unfiledContainerChildContent)
      Create a record from file resource
      Parameters:
      unfiledContainerChildModel - UnfiledContainerChild for electronic record to be created
      unfiledContainerChildContent - File pointing to the content of the electronic record to be created
      unfiledContainerId - The identifier of a unfiled container
      Returns:
      newly created UnfiledContainerChild
      Throws:
      RuntimeException - for invalid recordModel JSON strings
    • updateUnfiledContainer

      public UnfiledContainer updateUnfiledContainer(UnfiledContainer unfiledContainerModel, String unfiledContainerId)
    • updateUnfiledContainer

      public UnfiledContainer updateUnfiledContainer(UnfiledContainer unfiledContainerModel, String unfiledContainerId, String parameters)
      Updates an unfiled record container
      Parameters:
      unfiledContainerModel - The unfiled record container model which holds the information
      unfiledContainerId - The identifier of an unfiled record container
      parameters - The URL parameters to add
      returns - The updated UnfiledContainer
      Throws:
      RuntimeException - for the following cases:
      • the update request is invalid or unfiledContainerId is not a valid format or unfiledContainerModel is invalid
      • authentication fails
      • current user does not have permission to update unfiledContainerId
      • unfiledContainerId 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