Package org.alfresco.repo.remote
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 Summary
Constructors Constructor Description RepoRemoteService()Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NodeRefcreateDirectory(NodeRef base, String path)Create a new directory.OutputStreamcreateFile(NodeRef base, String path)Create a file relative to a base node.Map<String,Pair<NodeRef,Boolean>>getListing(NodeRef dir)Get a listing of a directory.NodeRefgetRoot()Get the root node of the SpacesStore repo.Pair<NodeRef,Boolean>lookup(NodeRef base, String path)Lookup a node by path relative to a node.InputStreamreadFile(NodeRef fileRef)Read a file directly.InputStreamreadFile(NodeRef base, String path)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(NodeRef base, String src, String dst)Rename a nodevoidsetContentService(ContentService service)Set the ContentService instance.voidsetFileFolderService(FileFolderService service)Set the FileFolderService instance.voidsetNodeService(NodeService service)Set the NodeService instance.OutputStreamwriteFile(NodeRef base, String path)Write to an already existing file.
-
-
-
Method Detail
-
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:RepoRemoteCreate a new directory.- Specified by:
createDirectoryin interfaceRepoRemote- 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:RepoRemoteCreate a file relative to a base node.- Specified by:
createFilein interfaceRepoRemote- 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:RepoRemoteGet a listing of a directory.- Specified by:
getListingin interfaceRepoRemote- Parameters:
dir- The node ref of the directory.- Returns:
- A Map of names to node refs.
-
getRoot
public NodeRef getRoot()
Description copied from interface:RepoRemoteGet the root node of the SpacesStore repo.- Specified by:
getRootin interfaceRepoRemote- Returns:
- The root node ref.
-
lookup
public Pair<NodeRef,Boolean> lookup(NodeRef base, String path)
Description copied from interface:RepoRemoteLookup a node by path relative to a node.- Specified by:
lookupin interfaceRepoRemote- 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:RepoRemoteRead a file directly.- Specified by:
readFilein interfaceRepoRemote- Parameters:
fileRef- The node ref of the file.- Returns:
- An InputStream.
-
readFile
public InputStream readFile(NodeRef base, String path)
Description copied from interface:RepoRemoteRead a file from a relative path.- Specified by:
readFilein interfaceRepoRemote- 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:RepoRemoteRemove a node directly.- Specified by:
removeNodein interfaceRepoRemote- Parameters:
toRemove- The node ref to remove.
-
removeNode
public void removeNode(NodeRef base, String path)
Description copied from interface:RepoRemoteRemove a node via a relative path.- Specified by:
removeNodein interfaceRepoRemote- Parameters:
base- The base node ref.path- The relative path.
-
rename
public void rename(NodeRef base, String src, String dst)
Description copied from interface:RepoRemoteRename a node- Specified by:
renamein interfaceRepoRemote- 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:RepoRemoteWrite to an already existing file.- Specified by:
writeFilein interfaceRepoRemote- Parameters:
base- The base node ref.path- The relative path.- Returns:
- An OutputStream
-
-