Class RepoRemoteImpl

  • All Implemented Interfaces:
    RepoRemote

    public class RepoRemoteImpl
    extends Object
    implements RepoRemote
    Client side implementation of RepoRemote interface.
    Author:
    britt
    • Constructor Detail

      • RepoRemoteImpl

        public RepoRemoteImpl()
        Default constructor.
    • Method Detail

      • setRepoRemoteTransport

        public void setRepoRemoteTransport​(RepoRemoteTransport transport)
        Set the transport instance.
      • setClientTicketHolder

        public void setClientTicketHolder​(ClientTicketHolder ticketHolder)
        Setter.
        Parameters:
        ticketHolder - To set.
      • createDirectory

        public org.alfresco.service.cmr.repository.NodeRef createDirectory​(org.alfresco.service.cmr.repository.NodeRef base,
                                                                           String path)
        Description copied from interface: RepoRemote
        Create a new directory.
        Specified by:
        createDirectory in interface RepoRemote
        Parameters:
        base - The base node ref.
        path - The relative path.
        Returns:
        The node ref to the newly created directory.
      • createFile

        public OutputStream createFile​(org.alfresco.service.cmr.repository.NodeRef base,
                                       String path)
        Description copied from interface: RepoRemote
        Create a file relative to a base node.
        Specified by:
        createFile in interface RepoRemote
        Parameters:
        base - The base node ref.
        path - The relative path.
        Returns:
        An OutputStream.
      • getListing

        public Map<String,​org.alfresco.util.Pair<org.alfresco.service.cmr.repository.NodeRef,​Boolean>> getListing​(org.alfresco.service.cmr.repository.NodeRef dir)
        Description copied from interface: RepoRemote
        Get a listing of a directory.
        Specified by:
        getListing in interface RepoRemote
        Parameters:
        dir - The node ref of the directory.
        Returns:
        A Map of names to node refs.
      • getRoot

        public org.alfresco.service.cmr.repository.NodeRef getRoot()
        Description copied from interface: RepoRemote
        Get the root node of the SpacesStore repo.
        Specified by:
        getRoot in interface RepoRemote
        Returns:
        The root node ref.
      • lookup

        public org.alfresco.util.Pair<org.alfresco.service.cmr.repository.NodeRef,​Boolean> lookup​(org.alfresco.service.cmr.repository.NodeRef base,
                                                                                                        String path)
        Description copied from interface: RepoRemote
        Lookup a node by path relative to a node.
        Specified by:
        lookup in interface RepoRemote
        Parameters:
        base - The base node ref.
        path - The relative path.
        Returns:
        The node ref or null.
      • readFile

        public InputStream readFile​(org.alfresco.service.cmr.repository.NodeRef fileRef)
        Description copied from interface: RepoRemote
        Read a file directly.
        Specified by:
        readFile in interface RepoRemote
        Parameters:
        fileRef - The node ref of the file.
        Returns:
        An InputStream.
      • readFile

        public InputStream readFile​(org.alfresco.service.cmr.repository.NodeRef base,
                                    String path)
        Description copied from interface: RepoRemote
        Read a file from a relative path.
        Specified by:
        readFile in interface RepoRemote
        Parameters:
        base - The base node ref.
        path - The relative path to the file.
        Returns:
        An InputStream.
      • removeNode

        public void removeNode​(org.alfresco.service.cmr.repository.NodeRef toRemove)
        Description copied from interface: RepoRemote
        Remove a node directly.
        Specified by:
        removeNode in interface RepoRemote
        Parameters:
        toRemove - The node ref to remove.
      • removeNode

        public void removeNode​(org.alfresco.service.cmr.repository.NodeRef base,
                               String path)
        Description copied from interface: RepoRemote
        Remove a node via a relative path.
        Specified by:
        removeNode in interface RepoRemote
        Parameters:
        base - The base node ref.
        path - The relative path.
      • rename

        public void rename​(org.alfresco.service.cmr.repository.NodeRef base,
                           String src,
                           String dst)
        Description copied from interface: RepoRemote
        Rename a node
        Specified by:
        rename in interface RepoRemote
        Parameters:
        base - The base node ref.
        src - The relative source path.
        dst - The relative target path.
      • writeFile

        public OutputStream writeFile​(org.alfresco.service.cmr.repository.NodeRef base,
                                      String path)
        Description copied from interface: RepoRemote
        Write to an already existing file.
        Specified by:
        writeFile in interface RepoRemote
        Parameters:
        base - The base node ref.
        path - The relative path.
        Returns:
        An OutputStream