Class DeletedNodesImpl

java.lang.Object
org.alfresco.rest.api.impl.DeletedNodesImpl
All Implemented Interfaces:
DeletedNodes, RecognizedParamsExtractor

public class DeletedNodesImpl extends Object implements DeletedNodes, RecognizedParamsExtractor
Handles trashcan / deleted nodes
Author:
Gethin James
  • Constructor Details

    • DeletedNodesImpl

      public DeletedNodesImpl()
  • Method Details

    • setNodeArchiveService

      public void setNodeArchiveService(NodeArchiveService nodeArchiveService)
    • setPersonService

      public void setPersonService(PersonService personService)
    • setNodeService

      public void setNodeService(NodeService nodeService)
    • setNodes

      public void setNodes(Nodes nodes)
    • setRenditions

      public void setRenditions(Renditions renditions)
    • listDeleted

      public CollectionWithPagingInfo<Node> listDeleted(Parameters parameters)
      Description copied from interface: DeletedNodes
      Lists deleted nodes using a ArchivedNodesCannedQuery
      Specified by:
      listDeleted in interface DeletedNodes
      Parameters:
      parameters -
      Returns:
      Collection of deleted Nodes
    • getDeletedNode

      public Node getDeletedNode(String originalId, Parameters parameters, boolean fullnode, Map<String,UserInfo> mapUserInfo)
      Description copied from interface: DeletedNodes
      Gets a single deleted node by id.
      Specified by:
      getDeletedNode in interface DeletedNodes
      Parameters:
      originalId -
      parameters -
      fullnode - Should we return the full representation of the minimal one?
      mapUserInfo -
      Returns:
      a deleted node
    • restoreArchivedNode

      public Node restoreArchivedNode(String archivedId, NodeTargetAssoc nodeTargetAssoc)
      Description copied from interface: DeletedNodes
      Restores a deleted node and returns it.
      Specified by:
      restoreArchivedNode in interface DeletedNodes
      Parameters:
      archivedId -
      nodeTargetAssoc - - optional
      Returns:
      the new undeleted node.
    • purgeArchivedNode

      public void purgeArchivedNode(String archivedId)
      Description copied from interface: DeletedNodes
      Permanently delete the node.
      Specified by:
      purgeArchivedNode in interface DeletedNodes
      Parameters:
      archivedId -
    • getContent

      public BinaryResource getContent(String archivedId, String renditionId, Parameters parameters)
      Description copied from interface: DeletedNodes
      Download file content (or rendition content) via archived node.
      Specified by:
      getContent in interface DeletedNodes
      Parameters:
      archivedId -
      renditionId - - optional
      parameters - Parameters
      Returns:
    • getRendition

      public Rendition getRendition(String archivedId, String renditionId, Parameters parameters)
      Specified by:
      getRendition in interface DeletedNodes
      Parameters:
      archivedId -
      renditionId -
      Returns:
    • getRenditions

      public CollectionWithPagingInfo<Rendition> getRenditions(String archivedId, Parameters parameters)
      Specified by:
      getRenditions in interface DeletedNodes
      Parameters:
      archivedId -
      Returns:
    • requestContentDirectUrl

      public DirectAccessUrl requestContentDirectUrl(String originalNodeId, String renditionId, boolean attachment, Long validFor, String fileName)
      Gets a presigned URL to directly access content.
      Specified by:
      requestContentDirectUrl in interface DeletedNodes
      Parameters:
      originalNodeId - The node id for which to obtain the direct access URL
      renditionId - The rendition id for which to obtain the direct access URL
      attachment - true if an attachment URL is requested, false for an embedded URL, true by default.
      validFor - The time at which the direct access URL will expire.
      fileName - Optional overide for file name
      Returns:
      A direct access URL object for the content.