Interface RepoRemote

All Known Implementing Classes:
RepoRemoteImpl, RepoRemoteService

public interface RepoRemote
A highly simplified remote interface for the repo.
Author:
britt
  • Method Details

    • getRoot

      NodeRef getRoot()
      Get the root node of the SpacesStore repo.
      Returns:
      The root node ref.
    • getListing

      Map<String,Pair<NodeRef,Boolean>> getListing(NodeRef dir)
      Get a listing of a directory.
      Parameters:
      dir - The node ref of the directory.
      Returns:
      A Map of names to node refs.
    • lookup

      Pair<NodeRef,Boolean> lookup(NodeRef base, String path)
      Lookup a node by path relative to a node.
      Parameters:
      base - The base node ref.
      path - The relative path.
      Returns:
      The node ref or null.
    • createFile

      OutputStream createFile(NodeRef base, String path)
      Create a file relative to a base node.
      Parameters:
      base - The base node ref.
      path - The relative path.
      Returns:
      An OutputStream.
    • writeFile

      OutputStream writeFile(NodeRef base, String path)
      Write to an already existing file.
      Parameters:
      base - The base node ref.
      path - The relative path.
      Returns:
      An OutputStream
    • createDirectory

      NodeRef createDirectory(NodeRef base, String path)
      Create a new directory.
      Parameters:
      base - The base node ref.
      path - The relative path.
      Returns:
      The node ref to the newly created directory.
    • removeNode

      void removeNode(NodeRef toRemove)
      Remove a node directly.
      Parameters:
      toRemove - The node ref to remove.
    • removeNode

      void removeNode(NodeRef base, String path)
      Remove a node via a relative path.
      Parameters:
      base - The base node ref.
      path - The relative path.
    • rename

      void rename(NodeRef base, String src, String dst)
      Rename a node
      Parameters:
      base - The base node ref.
      src - The relative source path.
      dst - The relative target path.
    • readFile

      InputStream readFile(NodeRef fileRef)
      Read a file directly.
      Parameters:
      fileRef - The node ref of the file.
      Returns:
      An InputStream.
    • readFile

      InputStream readFile(NodeRef base, String path)
      Read a file from a relative path.
      Parameters:
      base - The base node ref.
      path - The relative path to the file.
      Returns:
      An InputStream.