Package org.alfresco.service.cmr.remote
Interface RepoRemote
- All Known Implementing Classes:
RepoRemoteImpl,RepoRemoteService
public interface RepoRemote
A highly simplified remote interface for the repo.
- Author:
- britt
-
Method Summary
Modifier and TypeMethodDescriptioncreateDirectory(NodeRef base, String path) Create a new directory.createFile(NodeRef base, String path) Create a file relative to a base node.getListing(NodeRef dir) Get a listing of a directory.getRoot()Get the root node of the SpacesStore repo.Lookup a node by path relative to a node.Read a file directly.Read a file from a relative path.voidremoveNode(NodeRef toRemove) Remove a node directly.voidremoveNode(NodeRef base, String path) Remove a node via a relative path.voidRename a nodeWrite to an already existing file.
-
Method Details
-
getRoot
NodeRef getRoot()Get the root node of the SpacesStore repo.- Returns:
- The root node ref.
-
getListing
Get a listing of a directory.- Parameters:
dir- The node ref of the directory.- Returns:
- A Map of names to node refs.
-
lookup
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
Create a file relative to a base node.- Parameters:
base- The base node ref.path- The relative path.- Returns:
- An OutputStream.
-
writeFile
Write to an already existing file.- Parameters:
base- The base node ref.path- The relative path.- Returns:
- An OutputStream
-
createDirectory
Create a new directory.- Parameters:
base- The base node ref.path- The relative path.- Returns:
- The node ref to the newly created directory.
-
removeNode
Remove a node directly.- Parameters:
toRemove- The node ref to remove.
-
removeNode
Remove a node via a relative path.- Parameters:
base- The base node ref.path- The relative path.
-
rename
Rename a node- Parameters:
base- The base node ref.src- The relative source path.dst- The relative target path.
-
readFile
Read a file directly.- Parameters:
fileRef- The node ref of the file.- Returns:
- An InputStream.
-
readFile
Read a file from a relative path.- Parameters:
base- The base node ref.path- The relative path to the file.- Returns:
- An InputStream.
-