public class RepoRemoteTransportService extends Object implements RepoRemoteTransport, Runnable
Constructor and Description |
---|
RepoRemoteTransportService()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
closeInputHandle(String ticket,
String handle)
Close a remote InputStream.
|
void |
closeOutputHandle(String ticket,
String handle)
Close a remote OutputStream.
|
org.alfresco.service.cmr.repository.NodeRef |
createDirectory(String ticket,
org.alfresco.service.cmr.repository.NodeRef base,
String path)
Create a new directory.
|
String |
createFile(String ticket,
org.alfresco.service.cmr.repository.NodeRef base,
String path)
Create a file relative to a base node.
|
Map<String,org.alfresco.util.Pair<org.alfresco.service.cmr.repository.NodeRef,Boolean>> |
getListing(String ticket,
org.alfresco.service.cmr.repository.NodeRef dir)
Get a listing of a directory.
|
org.alfresco.service.cmr.repository.NodeRef |
getRoot(String ticket)
Get the root node of the SpacesStore repo.
|
void |
init()
The init method.
|
org.alfresco.util.Pair<org.alfresco.service.cmr.repository.NodeRef,Boolean> |
lookup(String ticket,
org.alfresco.service.cmr.repository.NodeRef base,
String path)
Lookup a node by path relative to a node.
|
String |
readFile(String ticket,
org.alfresco.service.cmr.repository.NodeRef fileRef)
Read a file directly.
|
String |
readFile(String ticket,
org.alfresco.service.cmr.repository.NodeRef base,
String path)
Read a file from a relative path.
|
byte[] |
readInput(String ticket,
String handle,
int count)
Read a block of bytes over the wire.
|
void |
removeNode(String ticket,
org.alfresco.service.cmr.repository.NodeRef toRemove)
Remove a node directly.
|
void |
removeNode(String ticket,
org.alfresco.service.cmr.repository.NodeRef base,
String path)
Remove a node via a relative path.
|
void |
rename(String ticket,
org.alfresco.service.cmr.repository.NodeRef base,
String src,
String dst)
Rename a node
|
void |
run()
The body of this Runnable.
|
void |
setAuthenticationService(AuthenticationService service)
Set the AuthenticationService instance.
|
void |
setIdleTimeout(long timeout)
Set the Idle Timeout value.
|
void |
setRepoRemote(RepoRemote remote)
Set the RepoRemote instance.
|
void |
shutDown()
Shutdown the Runnable cleanly.
|
String |
writeFile(String ticket,
org.alfresco.service.cmr.repository.NodeRef base,
String path)
Write to an already existing file.
|
void |
writeOutput(String ticket,
String handle,
byte[] buff,
int count)
Write a portion of a block of bytes over the wire.
|
public RepoRemoteTransportService()
public void setIdleTimeout(long timeout)
timeout
- The value to set.public void setRepoRemote(RepoRemote remote)
public void setAuthenticationService(AuthenticationService service)
public void init()
public void shutDown()
public void closeInputHandle(String ticket, String handle)
RepoRemoteTransport
closeInputHandle
in interface RepoRemoteTransport
ticket
- The authentication ticket.handle
- The handle.public void closeOutputHandle(String ticket, String handle)
RepoRemoteTransport
closeOutputHandle
in interface RepoRemoteTransport
ticket
- The authentication ticket.handle
- The handle.public org.alfresco.service.cmr.repository.NodeRef createDirectory(String ticket, org.alfresco.service.cmr.repository.NodeRef base, String path)
RepoRemoteTransport
createDirectory
in interface RepoRemoteTransport
base
- The base node ref.path
- The relative path.public String createFile(String ticket, org.alfresco.service.cmr.repository.NodeRef base, String path)
RepoRemoteTransport
createFile
in interface RepoRemoteTransport
base
- The base node ref.path
- The relative path.public Map<String,org.alfresco.util.Pair<org.alfresco.service.cmr.repository.NodeRef,Boolean>> getListing(String ticket, org.alfresco.service.cmr.repository.NodeRef dir)
RepoRemoteTransport
getListing
in interface RepoRemoteTransport
dir
- The node ref of the directory.public org.alfresco.service.cmr.repository.NodeRef getRoot(String ticket)
RepoRemoteTransport
getRoot
in interface RepoRemoteTransport
public org.alfresco.util.Pair<org.alfresco.service.cmr.repository.NodeRef,Boolean> lookup(String ticket, org.alfresco.service.cmr.repository.NodeRef base, String path)
RepoRemoteTransport
lookup
in interface RepoRemoteTransport
base
- The base node ref.path
- The relative path.public String readFile(String ticket, org.alfresco.service.cmr.repository.NodeRef base, String path)
RepoRemoteTransport
readFile
in interface RepoRemoteTransport
base
- The base node ref.path
- The relative path to the file.public String readFile(String ticket, org.alfresco.service.cmr.repository.NodeRef fileRef)
RepoRemoteTransport
readFile
in interface RepoRemoteTransport
fileRef
- The node ref of the file.public byte[] readInput(String ticket, String handle, int count)
RepoRemoteTransport
readInput
in interface RepoRemoteTransport
ticket
- The authentication ticket.handle
- The remote handle.count
- The number of bytes to try to read.public void removeNode(String ticket, org.alfresco.service.cmr.repository.NodeRef base, String path)
RepoRemoteTransport
removeNode
in interface RepoRemoteTransport
base
- The base node ref.path
- The relative path.public void removeNode(String ticket, org.alfresco.service.cmr.repository.NodeRef toRemove)
RepoRemoteTransport
removeNode
in interface RepoRemoteTransport
toRemove
- The node ref to remove.public void rename(String ticket, org.alfresco.service.cmr.repository.NodeRef base, String src, String dst)
RepoRemoteTransport
rename
in interface RepoRemoteTransport
base
- The base node ref.src
- The relative source path.dst
- The relative target path.public String writeFile(String ticket, org.alfresco.service.cmr.repository.NodeRef base, String path)
RepoRemoteTransport
writeFile
in interface RepoRemoteTransport
base
- The base node ref.path
- The relative path.public void writeOutput(String ticket, String handle, byte[] buff, int count)
RepoRemoteTransport
writeOutput
in interface RepoRemoteTransport
ticket
- The authentication ticket.handle
- The remote handle.buff
- The buffer with data.count
- The number of bytes to write.Copyright © 2005–2017 Alfresco Software. All rights reserved.