Package org.alfresco.service.cmr.remote
Interface RepoRemoteTransport
- All Known Implementing Classes:
RepoRemoteTransportService
public interface RepoRemoteTransport
Over the wire, and authentication safe flavor of
RepoRemote interface.
- Author:
- britt
-
Method Summary
Modifier and TypeMethodDescriptionvoidcloseInputHandle(String ticket, String handle) Close a remote InputStream.voidcloseOutputHandle(String ticket, String handle) Close a remote OutputStream.createDirectory(String ticket, NodeRef base, String path) Create a new directory.createFile(String ticket, NodeRef base, String path) Create a file relative to a base node.getListing(String ticket, NodeRef dir) Get a listing of a directory.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.byte[]Read a block of bytes over the wire.voidremoveNode(String ticket, NodeRef toRemove) Remove a node directly.voidremoveNode(String ticket, NodeRef base, String path) Remove a node via a relative path.voidRename a nodeWrite to an already existing file.voidwriteOutput(String ticket, String handle, byte[] buff, int count) Write a portion of a block of bytes over the wire.
-
Method Details
-
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:
- A handle.
-
writeFile
Write to an already existing file.- Parameters:
base- The base node ref.path- The relative path.- Returns:
- A handle.
-
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:
- A handle.
-
readFile
Read a file from a relative path.- Parameters:
base- The base node ref.path- The relative path to the file.- Returns:
- A handle.
-
readInput
Read a block of bytes over the wire.- Parameters:
ticket- The authentication ticket.handle- The remote handle.count- The number of bytes to try to read.- Returns:
- A buffer of the bytes read. Length is 0 at EOF.
-
writeOutput
Write a portion of a block of bytes over the wire.- Parameters:
ticket- The authentication ticket.handle- The remote handle.buff- The buffer with data.count- The number of bytes to write.
-
closeInputHandle
Close a remote InputStream.- Parameters:
ticket- The authentication ticket.handle- The handle.
-
closeOutputHandle
Close a remote OutputStream.- Parameters:
ticket- The authentication ticket.handle- The handle.
-