Class CopyToAPI

java.lang.Object
org.alfresco.rest.core.v0.BaseAPI
org.alfresco.rest.v0.CopyToAPI

@Component public class CopyToAPI extends BaseAPI
The v0 REST API for copy-to (which supports multi-item copy).
Since:
2.6
Author:
Tom Page
  • Constructor Details

    • CopyToAPI

      public CopyToAPI()
  • Method Details

    • copyTo

      public org.apache.http.HttpResponse copyTo(String user, String password, String targetContainerPath, List<String> nodeRefs)
      Copy a list of nodes to the target container.
      Parameters:
      user - The username of the user to use.
      password - The password of the user.
      targetContainerPath - The destination to copy the nodes to. This should be in the format "{site}/{container}/{path}", "{site}/{container}", "{store_type}/{store_id}/{id}/{path}", "{store_type}/{store_id}/{id}" or "{store_type}/{store_id}".
      nodeRefs - The list of nodes to copy.
      Returns:
      The HTTP Response.
      Throws:
      AssertionError - If the API call didn't return a 200 response.
    • copyTo

      public org.apache.http.HttpResponse copyTo(String user, String password, int expectedStatusCode, String targetContainerPath, List<String> nodeRefs)
      Copy a list of nodes to the target container.
      Parameters:
      user - The username of the user to use.
      password - The password of the user.
      expectedStatusCode - The expected return status code.
      targetContainerPath - The destination to copy the nodes to. This should be in the format "{site}/{container}/{path}", "{site}/{container}", "{store_type}/{store_id}/{id}/{path}", "{store_type}/{store_id}/{id}" or "{store_type}/{store_id}".
      nodeRefs - The list of nodes to copy.
      Returns:
      The HTTP Response.
      Throws:
      AssertionError - If the API didn't return the expected status code.