public class AVMRemoteTransportService extends java.lang.Object implements AVMRemoteTransport, java.lang.Runnable
Constructor and Description |
---|
AVMRemoteTransportService()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addAspect(java.lang.String ticket,
java.lang.String path,
org.alfresco.service.namespace.QName aspectName)
Add an aspect to an AVM node.
|
void |
closeInputHandle(java.lang.String ticket,
java.lang.String handle)
Close an input stream.
|
void |
closeOutputHandle(java.lang.String ticket,
java.lang.String handle)
Close the server side output stream designated by the handle.
|
void |
createBranch(java.lang.String ticket,
int version,
java.lang.String srcPath,
java.lang.String dstPath,
java.lang.String name)
Create a new branch.
|
void |
createDirectory(java.lang.String ticket,
java.lang.String path,
java.lang.String name)
Create a directory.
|
java.lang.String |
createFile(java.lang.String ticket,
java.lang.String path,
java.lang.String name)
Create a file and return a handle to an output stream.
|
void |
createLayeredDirectory(java.lang.String ticket,
java.lang.String targetPath,
java.lang.String parent,
java.lang.String name)
Create a layered directory.
|
void |
createLayeredFile(java.lang.String ticket,
java.lang.String targetPath,
java.lang.String parent,
java.lang.String name)
Create a new layered file.
|
java.util.Map |
createSnapshot(java.lang.String ticket,
java.lang.String store,
java.lang.String label,
java.lang.String comment)
Snapshot an AVMStore.
|
void |
createStore(java.lang.String ticket,
java.lang.String name)
Create a new AVMStore.
|
void |
deleteNodeProperties(java.lang.String ticket,
java.lang.String path)
Delete all properties from a node.
|
void |
deleteNodeProperty(java.lang.String ticket,
java.lang.String path,
org.alfresco.service.namespace.QName name)
Delete a property from a node.
|
void |
deleteStoreProperty(java.lang.String ticket,
java.lang.String store,
org.alfresco.service.namespace.QName name)
Delete a property from a store.
|
org.alfresco.util.Pair |
getAPath(java.lang.String ticket,
AVMNodeDescriptor desc)
Get a version and path for a node.
|
java.util.Set |
getAspects(java.lang.String ticket,
int version,
java.lang.String path)
Get all the aspects on an AVM node.
|
AVMNodeDescriptor |
getCommonAncestor(java.lang.String ticket,
AVMNodeDescriptor left,
AVMNodeDescriptor right)
Get the most recent common ancestor of two nodes.
|
java.util.List |
getDeleted(java.lang.String ticket,
int version,
java.lang.String path)
Get the names of nodes that have been deleted in a directory.
|
java.util.SortedMap |
getDirectoryListing(java.lang.String ticket,
AVMNodeDescriptor dir)
Get a directory listing from a node descriptor.
|
java.util.SortedMap |
getDirectoryListing(java.lang.String ticket,
int version,
java.lang.String path)
Get a listing of a directory.
|
java.util.SortedMap |
getDirectoryListingDirect(java.lang.String ticket,
int version,
java.lang.String path)
Get a listing of a directories direct contents.
|
java.util.List |
getHistory(java.lang.String ticket,
AVMNodeDescriptor desc,
int count)
Get a list of ancestors of a node.
|
java.lang.String |
getIndirectionPath(java.lang.String ticket,
int version,
java.lang.String path)
Get the indirection path for a node.
|
java.lang.String |
getInputHandle(java.lang.String ticket,
AVMNodeDescriptor desc)
Get an input handle from a descriptor.
|
java.lang.String |
getInputHandle(java.lang.String ticket,
int version,
java.lang.String path)
Get an input handle.
|
int |
getLatestSnapshotID(java.lang.String ticket,
java.lang.String storeName)
Get the id of the latest version snapshot.
|
LayeringDescriptor |
getLayeringInfo(java.lang.String ticket,
int version,
java.lang.String path)
Get layering information about a path.
|
int |
getNextVersionID(java.lang.String ticket,
java.lang.String storeName)
Get the latest version id of the given AVMStore.
|
java.util.Map |
getNodeProperties(java.lang.String ticket,
int version,
java.lang.String path)
Get all properties of a node.
|
PropertyValue |
getNodeProperty(java.lang.String ticket,
int version,
java.lang.String path,
org.alfresco.service.namespace.QName name)
Get the value of a node property.
|
java.lang.String |
getOutputHandle(java.lang.String ticket,
java.lang.String path)
Get an opaque handle to a server side output stream.
|
AVMStoreDescriptor |
getStore(java.lang.String ticket,
java.lang.String name)
Get the descriptor for a given AVMStore.
|
java.util.Map |
getStoreProperties(java.lang.String ticket,
java.lang.String store)
Get all the properties on a store.
|
PropertyValue |
getStoreProperty(java.lang.String ticket,
java.lang.String store,
org.alfresco.service.namespace.QName name)
Get a property from a store.
|
AVMNodeDescriptor |
getStoreRoot(java.lang.String ticket,
int version,
java.lang.String name)
Get the specified root of the specified store.
|
java.util.List |
getStores(java.lang.String ticket)
Get a list of all AVM stores.
|
java.util.List |
getStoreVersions(java.lang.String ticket,
java.lang.String name)
Get a List of all versions in a given store.
|
java.util.List |
getStoreVersions(java.lang.String ticket,
java.lang.String name,
java.util.Date from,
java.util.Date to)
Get AVMStore versions between given dates.
|
boolean |
hasAspect(java.lang.String ticket,
int version,
java.lang.String path,
org.alfresco.service.namespace.QName aspectName)
Does a node have a particular aspect.
|
void |
init()
The init method.
|
AVMNodeDescriptor |
lookup(java.lang.String ticket,
AVMNodeDescriptor dir,
java.lang.String name)
Get a descriptor for the specified node.
|
AVMNodeDescriptor |
lookup(java.lang.String ticket,
AVMNodeDescriptor dir,
java.lang.String name,
boolean includeDeleted)
Lookup a node identified by the directory that contains it, and its name;
optionally, the lookup can retrive the descriptor of a node even if
it has been deleted from its containing directory.
|
AVMNodeDescriptor |
lookup(java.lang.String ticket,
int version,
java.lang.String path)
Get a descriptor for the specified node.
|
AVMNodeDescriptor |
lookup(java.lang.String ticket,
int version,
java.lang.String path,
boolean includeDeleted)
Lookup a node identified by version ID and path; optionally,
if the node is deleted, its descriptor can still
be retrieved.
|
void |
makePrimary(java.lang.String ticket,
java.lang.String path)
Turn a directory into a primary indirection node.
|
void |
purgeStore(java.lang.String ticket,
java.lang.String name)
Purge an AVMStore.
|
void |
purgeVersion(java.lang.String ticket,
int version,
java.lang.String name)
Purge a given version from a given store.
|
java.util.Map |
queryStorePropertyKey(java.lang.String ticket,
java.lang.String store,
org.alfresco.service.namespace.QName keyPattern)
Query a store for keys that match a pattern.
|
java.util.Map |
queryStoresPropertyKey(java.lang.String ticket,
org.alfresco.service.namespace.QName keyPattern)
Query all stores for keys that match a pattern.
|
byte[] |
readInput(java.lang.String ticket,
java.lang.String handle,
int count)
Read a chunk of data from a handle.
|
void |
removeAspect(java.lang.String ticket,
java.lang.String path,
org.alfresco.service.namespace.QName aspectName)
Remove an aspect and its properties from a node.
|
void |
removeNode(java.lang.String ticket,
java.lang.String parent,
java.lang.String name)
Remove a node.
|
void |
rename(java.lang.String ticket,
java.lang.String srcParent,
java.lang.String srcName,
java.lang.String dstParent,
java.lang.String dstName)
Rename a node.
|
void |
renameStore(java.lang.String ticket,
java.lang.String sourceName,
java.lang.String destName)
Rename a store.
|
void |
retargetLayeredDirectory(java.lang.String ticket,
java.lang.String path,
java.lang.String target)
Set a layered directory node to point at a different target.
|
void |
revert(java.lang.String ticket,
java.lang.String path,
AVMNodeDescriptor toRevertTo)
Revert a head path to a given version.
|
void |
run()
The body of this Runnable.
|
void |
setAuthenticationService(AuthenticationService service) |
void |
setAvmService(AVMService service)
Set the AVMService.
|
void |
setEncoding(java.lang.String ticket,
java.lang.String path,
java.lang.String encoding)
Set the encoding.
|
void |
setGuid(java.lang.String ticket,
java.lang.String path,
java.lang.String guid)
Set the GUID on a node.
|
void |
setIdleTimeout(long timeout)
Set the Idle Timeout value.
|
void |
setMimeType(java.lang.String ticket,
java.lang.String path,
java.lang.String mimeType)
Set the mime type.
|
void |
setNodeProperties(java.lang.String ticket,
java.lang.String path,
java.util.Map properties)
Set a group of properties on a node.
|
void |
setNodeProperty(java.lang.String ticket,
java.lang.String path,
org.alfresco.service.namespace.QName name,
PropertyValue value)
Set a property on a node.
|
void |
setOpacity(java.lang.String ticket,
java.lang.String path,
boolean opacity)
Turn on or off a directory's opacity.
|
void |
setStoreProperties(java.lang.String ticket,
java.lang.String store,
java.util.Map props)
Set a group of properties on a store.
|
void |
setStoreProperty(java.lang.String ticket,
java.lang.String store,
org.alfresco.service.namespace.QName name,
PropertyValue value)
Set a property on a store.
|
void |
shutDown()
Shutdown the Runnable cleanly.
|
void |
uncover(java.lang.String ticket,
java.lang.String dirPath,
java.lang.String name)
Uncover a name in a layered directory.
|
void |
writeOutput(java.lang.String ticket,
java.lang.String handle,
byte[] buff,
int count)
Write
count bytes from buffer buff
starting at offset offset in buff |
public AVMRemoteTransportService()
public void setIdleTimeout(long timeout)
timeout
- The value to set.public void setAvmService(AVMService service)
service
- The service to set.public void setAuthenticationService(AuthenticationService service)
public void init()
public void run()
run
in interface java.lang.Runnable
public void shutDown()
public java.lang.String getInputHandle(java.lang.String ticket, int version, java.lang.String path)
getInputHandle
in interface AVMRemoteTransport
version
- The version to look under.path
- The path to the file.public java.lang.String getInputHandle(java.lang.String ticket, AVMNodeDescriptor desc)
AVMRemoteTransport
getInputHandle
in interface AVMRemoteTransport
ticket
- The authentication ticket.desc
- The descriptor.public byte[] readInput(java.lang.String ticket, java.lang.String handle, int count)
readInput
in interface AVMRemoteTransport
handle
- The opaque input stream handle.count
- The number of bytes to try to read.public void closeInputHandle(java.lang.String ticket, java.lang.String handle)
closeInputHandle
in interface AVMRemoteTransport
handle
- The opaque handle to the server side stream.public java.lang.String getOutputHandle(java.lang.String ticket, java.lang.String path)
getOutputHandle
in interface AVMRemoteTransport
path
- The path to the existing file.public void writeOutput(java.lang.String ticket, java.lang.String handle, byte[] buff, int count)
count
bytes from buffer buff
starting at offset offset
in buff
writeOutput
in interface AVMRemoteTransport
handle
- The opaque handle to the server side output stream.buff
- The data buffer.offset
- The offset within the buffer.count
- The number of bytes to write.public void closeOutputHandle(java.lang.String ticket, java.lang.String handle)
closeOutputHandle
in interface AVMRemoteTransport
handle
- The handle to the server side output stream.public java.util.SortedMap getDirectoryListingDirect(java.lang.String ticket, int version, java.lang.String path)
getDirectoryListingDirect
in interface AVMRemoteTransport
version
- The version to look under.path
- The path to the directory.public java.util.SortedMap getDirectoryListing(java.lang.String ticket, int version, java.lang.String path)
getDirectoryListing
in interface AVMRemoteTransport
version
- The version to look under.path
- The path to the directory.public java.util.SortedMap getDirectoryListing(java.lang.String ticket, AVMNodeDescriptor dir)
getDirectoryListing
in interface AVMRemoteTransport
dir
- The directory node descriptor.public java.util.List getDeleted(java.lang.String ticket, int version, java.lang.String path)
getDeleted
in interface AVMRemoteTransport
version
- The version to look under.path
- The path to the directory.public java.lang.String createFile(java.lang.String ticket, java.lang.String path, java.lang.String name)
createFile
in interface AVMRemoteTransport
path
- The path to the file.name
- The name of the file to create.public void createDirectory(java.lang.String ticket, java.lang.String path, java.lang.String name)
createDirectory
in interface AVMRemoteTransport
path
- The path to the containing directory.name
- The name for the new directory.public void createLayeredFile(java.lang.String ticket, java.lang.String targetPath, java.lang.String parent, java.lang.String name)
createLayeredFile
in interface AVMRemoteTransport
targetPath
- The path that is targeted.parent
- The path to the parent directory.name
- The name for the new file.public void createLayeredDirectory(java.lang.String ticket, java.lang.String targetPath, java.lang.String parent, java.lang.String name)
createLayeredDirectory
in interface AVMRemoteTransport
targetPath
- The path that is targeted.parent
- The parent directory.name
- The name of the new directory.public void retargetLayeredDirectory(java.lang.String ticket, java.lang.String path, java.lang.String target)
retargetLayeredDirectory
in interface AVMRemoteTransport
path
- The path to the layered directory node.target
- The new target.public void createStore(java.lang.String ticket, java.lang.String name)
createStore
in interface AVMRemoteTransport
name
- The name to give the new store.public void createBranch(java.lang.String ticket, int version, java.lang.String srcPath, java.lang.String dstPath, java.lang.String name)
createBranch
in interface AVMRemoteTransport
version
- The version to look under for the source node.srcPath
- The path to the source node.dstPath
- The path to the destination directory.name
- The name of the new branch.public void removeNode(java.lang.String ticket, java.lang.String parent, java.lang.String name)
removeNode
in interface AVMRemoteTransport
parent
- The path to the parent directory.name
- The name of the node to remove.public void rename(java.lang.String ticket, java.lang.String srcParent, java.lang.String srcName, java.lang.String dstParent, java.lang.String dstName)
rename
in interface AVMRemoteTransport
srcParent
- The source directory path.srcName
- The source node name.dstParent
- The destination directory path.dstName
- The destination name for the node.public void uncover(java.lang.String ticket, java.lang.String dirPath, java.lang.String name)
uncover
in interface AVMRemoteTransport
dirPath
- The path to the directory.name
- The name to uncover.public int getNextVersionID(java.lang.String ticket, java.lang.String storeName)
getNextVersionID
in interface AVMRemoteTransport
storeName
- The name of the AVMStore.public int getLatestSnapshotID(java.lang.String ticket, java.lang.String storeName)
getLatestSnapshotID
in interface AVMRemoteTransport
storeName
- The store name.public java.util.Map createSnapshot(java.lang.String ticket, java.lang.String store, java.lang.String label, java.lang.String comment)
createSnapshot
in interface AVMRemoteTransport
store
- The name of the AVMStore to snapshot.public java.util.List getStoreVersions(java.lang.String ticket, java.lang.String name)
getStoreVersions
in interface AVMRemoteTransport
name
- The name of the store.public java.util.List getStoreVersions(java.lang.String ticket, java.lang.String name, java.util.Date from, java.util.Date to)
getStoreVersions
in interface AVMRemoteTransport
name
- The name of the store.from
- The date from which (inclusive).to
- The date to which (inclusive).public java.util.List getStores(java.lang.String ticket)
getStores
in interface AVMRemoteTransport
public AVMStoreDescriptor getStore(java.lang.String ticket, java.lang.String name)
getStore
in interface AVMRemoteTransport
name
- The name of the store.public AVMNodeDescriptor getStoreRoot(java.lang.String ticket, int version, java.lang.String name)
getStoreRoot
in interface AVMRemoteTransport
version
- The version number to fetch.name
- The name of the store.public AVMNodeDescriptor lookup(java.lang.String ticket, int version, java.lang.String path)
lookup
in interface AVMRemoteTransport
version
- The version to look under.path
- The path to the node.public AVMNodeDescriptor lookup(java.lang.String ticket, int version, java.lang.String path, boolean includeDeleted)
lookup
in interface AVMRemoteTransport
version
- The version ID to look under.path
- The simple absolute path to the parent directory.includeDeleted
- Whether to allow a deleted node to be retrievedpublic AVMNodeDescriptor lookup(java.lang.String ticket, AVMNodeDescriptor dir, java.lang.String name)
lookup
in interface AVMRemoteTransport
dir
- The descriptor for the directory node.name
- The name of the node to lookup.public AVMNodeDescriptor lookup(java.lang.String ticket, AVMNodeDescriptor dir, java.lang.String name, boolean includeDeleted)
lookup
in interface AVMRemoteTransport
dir
- The descriptor for the directory node.name
- The name to lookup.includeDeleted
- Whether to allow a deleted node to be retrieved via the lookupAVMNotFoundException
AVMWrongTypeException
public java.lang.String getIndirectionPath(java.lang.String ticket, int version, java.lang.String path)
getIndirectionPath
in interface AVMRemoteTransport
version
- The version to look under.path
- The path to the node.public void purgeStore(java.lang.String ticket, java.lang.String name)
purgeStore
in interface AVMRemoteTransport
name
- The name of the store to purge.public void purgeVersion(java.lang.String ticket, int version, java.lang.String name)
purgeVersion
in interface AVMRemoteTransport
version
- The version id.name
- The name of the store.public void makePrimary(java.lang.String ticket, java.lang.String path)
makePrimary
in interface AVMRemoteTransport
path
- The path to the directory.public java.util.List getHistory(java.lang.String ticket, AVMNodeDescriptor desc, int count)
getHistory
in interface AVMRemoteTransport
desc
- The descriptor of the node whose history is to be fetched.count
- The maximum number of ancestors that will be returned.public void setOpacity(java.lang.String ticket, java.lang.String path, boolean opacity)
setOpacity
in interface AVMRemoteTransport
path
- The path to the directory.opacity
- Whether the directory should be opaque or not.public AVMNodeDescriptor getCommonAncestor(java.lang.String ticket, AVMNodeDescriptor left, AVMNodeDescriptor right)
getCommonAncestor
in interface AVMRemoteTransport
left
- One node.right
- The other node.public LayeringDescriptor getLayeringInfo(java.lang.String ticket, int version, java.lang.String path)
getLayeringInfo
in interface AVMRemoteTransport
version
- The version to look under.path
- The path to the node.public void setNodeProperty(java.lang.String ticket, java.lang.String path, org.alfresco.service.namespace.QName name, PropertyValue value)
setNodeProperty
in interface AVMRemoteTransport
path
- The path to the node.name
- The name of the property.value
- The value to give the property.public void setNodeProperties(java.lang.String ticket, java.lang.String path, java.util.Map properties)
setNodeProperties
in interface AVMRemoteTransport
path
- The path to the node.properties
- A Map of QNames to PropertyValues to set.public PropertyValue getNodeProperty(java.lang.String ticket, int version, java.lang.String path, org.alfresco.service.namespace.QName name)
getNodeProperty
in interface AVMRemoteTransport
version
- The version to look under.path
- The path to the node.name
- The name of the property.public java.util.Map getNodeProperties(java.lang.String ticket, int version, java.lang.String path)
getNodeProperties
in interface AVMRemoteTransport
version
- The version.path
- The path to the node.public void deleteNodeProperty(java.lang.String ticket, java.lang.String path, org.alfresco.service.namespace.QName name)
deleteNodeProperty
in interface AVMRemoteTransport
path
- The path to the node.name
- The name of the property.public void deleteNodeProperties(java.lang.String ticket, java.lang.String path)
deleteNodeProperties
in interface AVMRemoteTransport
path
- The path to the node.public void setStoreProperty(java.lang.String ticket, java.lang.String store, org.alfresco.service.namespace.QName name, PropertyValue value)
setStoreProperty
in interface AVMRemoteTransport
store
- The name of the store.name
- The name of the property to set.value
- The value of the property to set.public void setStoreProperties(java.lang.String ticket, java.lang.String store, java.util.Map props)
setStoreProperties
in interface AVMRemoteTransport
store
- The name of the store.props
- A Map of QNames to PropertyValues to set.public PropertyValue getStoreProperty(java.lang.String ticket, java.lang.String store, org.alfresco.service.namespace.QName name)
getStoreProperty
in interface AVMRemoteTransport
store
- The name of the store.name
- The name of the property.public java.util.Map queryStorePropertyKey(java.lang.String ticket, java.lang.String store, org.alfresco.service.namespace.QName keyPattern)
queryStorePropertyKey
in interface AVMRemoteTransport
store
- The store name.keyPattern
- The sql 'like' pattern.public java.util.Map queryStoresPropertyKey(java.lang.String ticket, org.alfresco.service.namespace.QName keyPattern)
queryStoresPropertyKey
in interface AVMRemoteTransport
keyPattern
- The sql 'like' pattern.public java.util.Map getStoreProperties(java.lang.String ticket, java.lang.String store)
getStoreProperties
in interface AVMRemoteTransport
store
- The name of the store.public void deleteStoreProperty(java.lang.String ticket, java.lang.String store, org.alfresco.service.namespace.QName name)
deleteStoreProperty
in interface AVMRemoteTransport
store
- The name of the store.name
- The name of the property.public void renameStore(java.lang.String ticket, java.lang.String sourceName, java.lang.String destName)
AVMRemoteTransport
renameStore
in interface AVMRemoteTransport
ticket
- The authentication ticket.sourceName
- The original name.destName
- The new name.public void addAspect(java.lang.String ticket, java.lang.String path, org.alfresco.service.namespace.QName aspectName)
AVMRemoteTransport
addAspect
in interface AVMRemoteTransport
path
- The path to the node.aspectName
- The QName of the aspect.public java.util.Set getAspects(java.lang.String ticket, int version, java.lang.String path)
AVMRemoteTransport
getAspects
in interface AVMRemoteTransport
version
- The version to look under.path
- The path to the node.public boolean hasAspect(java.lang.String ticket, int version, java.lang.String path, org.alfresco.service.namespace.QName aspectName)
AVMRemoteTransport
hasAspect
in interface AVMRemoteTransport
version
- The version to look under.path
- The path to the node.aspectName
- The aspect name to check.public void removeAspect(java.lang.String ticket, java.lang.String path, org.alfresco.service.namespace.QName aspectName)
AVMRemoteTransport
removeAspect
in interface AVMRemoteTransport
path
- The path to the node.aspectName
- The name of the aspect.public void revert(java.lang.String ticket, java.lang.String path, AVMNodeDescriptor toRevertTo)
AVMRemoteTransport
revert
in interface AVMRemoteTransport
path
- The path to the node to revert.toRevertTo
- The descriptor of the version to revert to.public org.alfresco.util.Pair getAPath(java.lang.String ticket, AVMNodeDescriptor desc)
AVMRemoteTransport
getAPath
in interface AVMRemoteTransport
ticket
- The authentication ticket.desc
- The node descriptor for the node we want to get a path to.public void setGuid(java.lang.String ticket, java.lang.String path, java.lang.String guid)
AVMRemoteTransport
setGuid
in interface AVMRemoteTransport
ticket
- The authentication ticket.path
- The path to the node.guid
- The GUID to set.public void setEncoding(java.lang.String ticket, java.lang.String path, java.lang.String encoding)
AVMRemoteTransport
setEncoding
in interface AVMRemoteTransport
path
- The path of the file.encoding
- The encoding.public void setMimeType(java.lang.String ticket, java.lang.String path, java.lang.String mimeType)
AVMRemoteTransport
setMimeType
in interface AVMRemoteTransport
path
- The path of the file.mimeType
- The mime type.Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.