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

public class RMSiteAPI extends RMModelRequest
RM Site REST API Wrapper
Since:
2.6
Author:
Tuna Aksoy
  • Constructor Details

    • RMSiteAPI

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

    • getSite

      public RMSite getSite()
      Get the RM site
      Returns:
      The RMSite for the given file plan component id
      Throws:
      RuntimeException - for the following cases:
      • Api Response code 400 Invalid parameter: GET request is supported only for the RM site
      • Api Response code 401 If authentication failed
      • Api Response code 409 If RM Site does not exist
      • Api Response code default Unexpected error
    • createRMSite

      public RMSite createRMSite(RMSite rmSiteModel)
      Create the RM site
      Parameters:
      rmSiteModel - The properties of the rm site to be created
      Returns:
      The RMSite with the given properties
      Throws:
      RuntimeException - for the following cases:
      • Api Response code 400 Invalid parameter: title, or description exceed the maximum length; or siteBodyCreate invalid
      • Api Response code 401 If authentication failed</
      • Api Response code 409 RM Site already exists
      • Api Response code default Unexpected error
    • deleteRMSite

      public void deleteRMSite()
      Delete RM site
      Throws:
      RuntimeException - for the following cases:
      • Api Response code 400 Invalid parameter: DELETE request is supported only for the RM site
      • Api Response code 401 If authentication failed</
      • Api Response code 403 Current user does not have permission to delete the site that is visible to them.
      • Api Response code 404 RM site does not exist
      • Api Response code default Unexpected error
    • updateRMSite

      public RMSite updateRMSite(RMSite rmSiteModel)
      Update RM site
      Parameters:
      rmSiteModel - The properties to be updated
      Returns:
      The updated RMSite
      Throws:
      RuntimeException - for the following cases:
      • Api Response code 400 the update request is invalid rmSiteModel is invalid
      • Api Response code 401 If authentication fails
      • Api Response code 403 does not have permission to update RMSite
      • Api Response code 404 RMSiteModel does not exist
      • Api Response code default Unexpected error,model integrity exception
    • existsRMSite

      public boolean existsRMSite()
      Checks if the RM site exists or not
      Returns:
      true if the RM site exists, false otherwise
      Throws:
      RuntimeException - for the following cases:
      • Api Response code 400 Invalid parameter: GET request is supported only for the RM site
      • Api Response code 401 If authentication failed
      • Api Response code 409 If RM Site does not exist
      • Api Response code default Unexpected error