Class RepoRemoteService

java.lang.Object
org.alfresco.repo.remote.RepoRemoteService
All Implemented Interfaces:
RepoRemote

public class RepoRemoteService extends Object implements RepoRemote
Server side implementation of RepoRemote.
Author:
britt
  • Constructor Details

    • RepoRemoteService

      public RepoRemoteService()
      Default constructor.
  • Method Details

    • setNodeService

      public void setNodeService(NodeService service)
      Set the NodeService instance.
    • setContentService

      public void setContentService(ContentService service)
      Set the ContentService instance.
    • setFileFolderService

      public void setFileFolderService(FileFolderService service)
      Set the FileFolderService instance.
    • createDirectory

      public NodeRef createDirectory(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(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,Pair<NodeRef,Boolean>> getListing(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 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 Pair<NodeRef,Boolean> lookup(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(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(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(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(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(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(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