org.alfresco.repo.avm
Class MultiTAVMService

java.lang.Object
  extended by org.alfresco.repo.avm.MultiTAVMService
All Implemented Interfaces:
AVMService

public class MultiTAVMService
extends java.lang.Object
implements AVMService

An MT-aware wrapper of AVMService


Constructor Summary
MultiTAVMService()
           
 
Method Summary
 void addAspect(java.lang.String path, org.alfresco.service.namespace.QName aspectName)
          Add an aspect to an AVM node.
 void copy(int srcVersion, java.lang.String srcPath, java.lang.String dstPath, java.lang.String name)
          Perform a non-virtual (heavy-weight), and potentially recursive copy of the source into the destination directory.
 void createBranch(int version, java.lang.String srcPath, java.lang.String dstPath, java.lang.String name)
          Create a branch from a given version and path.
 void createDirectory(java.lang.String path, java.lang.String name)
          Create a new directory.
 void createDirectory(java.lang.String path, java.lang.String name, java.util.List aspects, java.util.Map properties)
          Create a new directory with aspects and properties.
 java.io.OutputStream createFile(java.lang.String path, java.lang.String name)
          Create a new "plain" (non-layered) file within a path.
 void createFile(java.lang.String path, java.lang.String name, java.io.InputStream in)
          Create a new "plain" (non-layered) file.
 void createFile(java.lang.String path, java.lang.String name, java.io.InputStream in, java.util.List aspects, java.util.Map properties)
          Create a new "plain" (non-layered) file with aspects and properties.
 void createLayeredDirectory(java.lang.String targetPath, java.lang.String parentPath, java.lang.String name)
          Create a new layered directory.
 void createLayeredFile(java.lang.String targetPath, java.lang.String parentPath, java.lang.String name)
          Create a new layered file.
 java.util.Map createSnapshot(java.lang.String storeName, java.lang.String tag, java.lang.String description)
          Snapshot the given AVMStore.
 void createStore(java.lang.String storeName)
          Create a new AVMStore.
 void createStore(java.lang.String name, java.util.Map props)
          Create a new AVMStore with store properties (equivalent to createStore + setProperties)
 void deleteNodeProperties(java.lang.String path)
          Delete all the properties attached to an AVM node.
 void deleteNodeProperty(java.lang.String path, org.alfresco.service.namespace.QName name)
          Delete a property.
 void deleteStoreProperty(java.lang.String storeName, org.alfresco.service.namespace.QName name)
          Delete a property on a store by name.
 AVMNodeDescriptor forceCopy(java.lang.String path)
          Low-level internal function:   Force a copy on write write event on the given node.
 org.alfresco.util.Pair getAPath(AVMNodeDescriptor desc)
          Get a single valid path to a given node.
 java.util.Set getAspects(AVMNodeDescriptor desc)
          Get all the aspects from a node descriptor.
 java.util.Set getAspects(int version, java.lang.String path)
          Get all the aspects on an AVM node.
 AVMNodeDescriptor getCommonAncestor(AVMNodeDescriptor left, AVMNodeDescriptor right)
          Get the common ancestor of two nodes if a common ancestor exists.
 org.alfresco.service.cmr.repository.ContentData getContentDataForRead(AVMNodeDescriptor desc)
          Get ContentData using only a node descriptor.
 org.alfresco.service.cmr.repository.ContentData getContentDataForRead(int version, java.lang.String path)
          Low-level internal function:   Get the ContentData for a node in a read context.
 org.alfresco.service.cmr.repository.ContentData getContentDataForWrite(java.lang.String path)
          Low-level internal function:   Get the ContentData for a node in a write context.
 org.alfresco.service.cmr.repository.ContentReader getContentReader(int version, java.lang.String path)
          Low-level internal function:   Fetch a content reader for a file node.
 org.alfresco.service.cmr.repository.ContentWriter getContentWriter(java.lang.String path, boolean update)
          Low-level internal function:   Fetch a ContentWriter to a file node.
 java.util.List getDeleted(int version, java.lang.String path)
          Non-recursively get the names of nodes that have been deleted in a directory identified by a version ID and a path
 java.util.SortedMap getDirectoryListing(AVMNodeDescriptor dir)
          Get a non-recursive directory listing of a directory node identified by a node descriptor.
 java.util.SortedMap getDirectoryListing(AVMNodeDescriptor dir, boolean includeDeleted)
          Get a non-recursive directory listing of a directory identified by a node descriptor; optionally, deleted nodes can be included in this listing.
 java.util.SortedMap getDirectoryListing(AVMNodeDescriptor dir, java.lang.String childNamePattern)
          Get a non-recursive directory listing of a directory node identified by a node descriptor.
 java.util.SortedMap getDirectoryListing(int version, java.lang.String path)
          Get a non-recursive listing of a directory identified by its version ID and path.
 java.util.SortedMap getDirectoryListing(int version, java.lang.String path, boolean includeDeleted)
          Get a non-recursive listing of a directory node identified by its version ID and path; optionally, deleted notes can be included in this listing.
 AVMNodeDescriptor[] getDirectoryListingArray(AVMNodeDescriptor dir, boolean includeDeleted)
          A convenience method to get a non-recursive directory listing as an Array from a directory identified by a node descriptor; optionally, deleted nodes can be included in this listing.
 AVMNodeDescriptor[] getDirectoryListingArray(int version, java.lang.String path, boolean includeDeleted)
          A convenience method to get a directory listing as an Array of AVMNodeDescriptors; this function is otherwise equivalent to getDirectoryListing
 java.util.SortedMap getDirectoryListingDirect(AVMNodeDescriptor dir, boolean includeDeleted)
          Get a non-recursive listing of all the nodes contained by a directory identified by an AVMNodeDescriptor, excluding those that are only present "indirectly" via layering; optionally, deleted nodes that are directly contained can be included this listing.
 java.util.SortedMap getDirectoryListingDirect(int version, java.lang.String path)
          Get a non-recursive listing of nodes contained by a directory identified by its version ID and path, but exclude all nodes that are only contained "indirectly" via layering.
 java.util.SortedMap getDirectoryListingDirect(int version, java.lang.String path, boolean includeDeleted)
          Get a non-recursive listing of nodes contained directly, but exclude all nodes that are only contained "indirectly" (i.e.: via layering).
 java.io.InputStream getFileInputStream(AVMNodeDescriptor desc)
          Get an InputStream for reading the contents of a file node identified by its descriptor.
 java.io.InputStream getFileInputStream(int version, java.lang.String path)
          Get an InputStream for reading the contents of a file identified by its version ID and AVM path.
 java.io.OutputStream getFileOutputStream(java.lang.String path)
          Get an output stream to write to a file identified by an AVM path.
 java.util.List getHeadPaths(AVMNodeDescriptor desc)
          Get all paths that a given node has that are in the HEAD version ( -1 ).
 java.util.List getHistory(AVMNodeDescriptor desc, int count)
          Get a list of up to count nodes in the history chain of a node.
 java.lang.String getIndirectionPath(int version, java.lang.String path)
          Get the indirection path for a node in a layered context whether that indirection path is primary or non-primary (or seen via transparency).
 int getLatestSnapshotID(java.lang.String storeName)
          Get the latest snapshot ID of a store.
 LayeringDescriptor getLayeringInfo(int version, java.lang.String path)
          Get layering information about a path.
 int getNextVersionID(java.lang.String storeName)
          Gets the ID that the next snapshotted version of a store will have.
 java.util.Map getNodeProperties(AVMNodeDescriptor desc)
          Get all the properties associated with a node identified by a descriptor.
 java.util.Map getNodeProperties(int version, java.lang.String path)
          Get all the properties associated with a node that is identified by a version ID and a path.
 PropertyValue getNodeProperty(int version, java.lang.String path, org.alfresco.service.namespace.QName name)
          Get a property of a node by QName.
 java.util.List getPaths(AVMNodeDescriptor desc)
          Get a list of all paths that a given node has.
 java.util.List getPathsInStoreHead(AVMNodeDescriptor desc, java.lang.String storeName)
          Get all paths to a node starting at the HEAD version ( -1 ) of a store.
 java.util.List getPathsInStoreVersion(AVMNodeDescriptor desc, java.lang.String storeName, int version)
          Get all paths to a given node in a single store in a single non-head version.
 AVMStoreDescriptor getStore(java.lang.String storeName)
          Get a descriptor for an AVMStore.
 java.util.Map getStoreProperties(java.lang.String storeName)
          Get all the properties associated with a store.
 PropertyValue getStoreProperty(java.lang.String storeName, org.alfresco.service.namespace.QName name)
          Get a property from a store.
 AVMNodeDescriptor getStoreRoot(int version, java.lang.String storeName)
          A convenience method for getting the specified root directory of an AVMStore (e.g.: "mysite:/").
 java.util.List getStores()
          Get the descriptors of all AVMStores in the repository.
 java.util.List getStoreVersions(java.lang.String storeName)
          Get the set of versions in an AVMStore.
 java.util.List getStoreVersions(java.lang.String storeName, java.util.Date from, java.util.Date to)
          Get AVMStore version descriptors by creation date.
 java.util.List getStoreVersionsBetween(java.lang.String name, int from, int to)
          Get all versions from an including startVersion up to but NOT including endVersion
 java.util.List getStoreVersionsFrom(java.lang.String name, int version)
          Get all versions from the last down to and including the one specified Returned in descending version id.
 java.util.List getStoreVersionsTo(java.lang.String name, int version)
          Get all versions from the first up to and including the one specified Returned in ascending version id order.
 AVMStoreDescriptor getSystemStore()
          Low-level internal function:   Retrieve the reserved "system" store.
 boolean hasAspect(int version, java.lang.String path, org.alfresco.service.namespace.QName aspectName)
          Determines whether a node has a particular aspect.
 void link(java.lang.String parentPath, java.lang.String name, AVMNodeDescriptor toLink)
          Low-level internal function:   Insert a node into a parent directly.
 AVMNodeDescriptor lookup(AVMNodeDescriptor dir, java.lang.String name)
          Lookup a node identified by the directory node that contains it, and its name.
 AVMNodeDescriptor lookup(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(int version, java.lang.String path)
          Lookup a node identified by version ID and path.
 AVMNodeDescriptor lookup(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 path)
          Make a directory into a primary indirection node.
 void makeTransparent(java.lang.String dirPath, java.lang.String name)
          Atomically delete name within dirPath and uncover it so whatever is underneath can be seen via transparency.
 void purgeStore(java.lang.String storeName)
          Purge an AVMStore.
 void purgeVersion(int version, java.lang.String storeName)
          Purge a version from an AVMStore.
 java.util.Map queryStorePropertyKey(java.lang.String storeName, org.alfresco.service.namespace.QName keyPattern)
          Queries a given store for properties with keys that match a given pattern.
 java.util.Map queryStoresPropertyKeys(org.alfresco.service.namespace.QName keyPattern)
          Queries all AVM stores for properties with keys that match a given pattern.
 void removeAspect(java.lang.String path, org.alfresco.service.namespace.QName aspectName)
          Remove an aspect and its properties from a node.
 void removeNode(java.lang.String path)
          A convenience method that removes a node specified by an AVM path.
 void removeNode(java.lang.String parent, java.lang.String name)
          Remove a file or directory from its parent directory.
 void rename(java.lang.String srcParent, java.lang.String srcName, java.lang.String dstParent, java.lang.String dstName)
          Rename a file or directory.
 void renameStore(java.lang.String sourceStoreName, java.lang.String destStoreName)
          Rename a store.
 void retargetLayeredDirectory(java.lang.String path, java.lang.String target)
          Retarget a layered directory.
 void revert(java.lang.String path, AVMNodeDescriptor toRevertTo)
          Revert a HEAD path to a given version.
 void setAvmService(AVMService fService)
           
 void setContentData(java.lang.String path, org.alfresco.service.cmr.repository.ContentData data)
          Low-level internal function:   Set the content data on a file.
 void setEncoding(java.lang.String path, java.lang.String encoding)
          Set the encoding.
 void setGuid(java.lang.String path, java.lang.String guid)
          Set the GUID on a node.
 void setMetaDataFrom(java.lang.String path, AVMNodeDescriptor from)
          Set all metadata on a node from another node.
 void setMimeType(java.lang.String path, java.lang.String mimeType)
          Set the mime type.
 void setNodeProperties(java.lang.String path, java.util.Map properties)
          Set a collection of properties on a node.
 void setNodeProperty(java.lang.String path, org.alfresco.service.namespace.QName name, PropertyValue value)
          Set a property on a node.
 void setOpacity(java.lang.String path, boolean opacity)
          Set the opacity of a layered directory.
 void setStoreProperties(java.lang.String storeName, java.util.Map props)
          Set a group of properties on a store.
 void setStoreProperty(java.lang.String storeName, org.alfresco.service.namespace.QName name, PropertyValue value)
          Set a property on a store.
 void setTenantService(org.alfresco.repo.tenant.TenantService tenantService)
           
 void uncover(java.lang.String dirPath, java.lang.String name)
          If a layered directory dirPath has a deleted entry of the given name, remove that name from the deleted list, so that if a layer below it contains an entry of this name, it can be seen via transparency from dirPath.
 void updateLink(java.lang.String parentPath, java.lang.String name, AVMNodeDescriptor toLink)
          Low-level internal function:   replace a node in a parent directly.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiTAVMService

public MultiTAVMService()
Method Detail

setAvmService

public void setAvmService(AVMService fService)

setTenantService

public void setTenantService(org.alfresco.repo.tenant.TenantService tenantService)

addAspect

public void addAspect(java.lang.String path,
                      org.alfresco.service.namespace.QName aspectName)
Description copied from interface: AVMService
Add an aspect to an AVM node.

Specified by:
addAspect in interface AVMService
Parameters:
path - The path to the node.
aspectName - The QName of the aspect.

copy

public void copy(int srcVersion,
                 java.lang.String srcPath,
                 java.lang.String dstPath,
                 java.lang.String name)
Description copied from interface: AVMService
Perform a non-virtual (heavy-weight), and potentially recursive copy of the source into the destination directory. All node properties, access control lists (ACLs), and aspects are copied.

Specified by:
copy in interface AVMService
Parameters:
srcVersion - The version of the source.
srcPath - The path of the source directory.
dstPath - The directory containing the destination directory.
name - The name of the destination within dstPath.

createBranch

public void createBranch(int version,
                         java.lang.String srcPath,
                         java.lang.String dstPath,
                         java.lang.String name)
Description copied from interface: AVMService
Create a branch from a given version and path. As a side effect, an automatic snapshot is taken of the store that contains the node that is being branched from.

Specified by:
createBranch in interface AVMService
Parameters:
version - The version number from which to make the branch.
srcPath - The path to the node to branch from.
dstPath - The path to the directory to contain the new branch.
name - The name to give the new branch.

createDirectory

public void createDirectory(java.lang.String path,
                            java.lang.String name)
Description copied from interface: AVMService
Create a new directory. If path is within a layer, the new directory will be a layered directory; otherwise, the new directory will be a plain directory.

Specified by:
createDirectory in interface AVMService
Parameters:
path - The simple absolute path to the parent.
name - The name to give the directory.

createFile

public java.io.OutputStream createFile(java.lang.String path,
                                       java.lang.String name)
Description copied from interface: AVMService
Create a new "plain" (non-layered) file within a path. This function fails if the file already exists, or if the directory identified by path does not exist.

Specified by:
createFile in interface AVMService
Parameters:
path - The path of the directory containing the created file.
name - The name of the new file
Returns:
An opaque handle to a server side output stream.

createFile

public void createFile(java.lang.String path,
                       java.lang.String name,
                       java.io.InputStream in)
Description copied from interface: AVMService
Create a new "plain" (non-layered) file. Guarantees that the entire contents of the input stream will be loaded atomically. The directory identified by path must already exist.

Specified by:
createFile in interface AVMService
Parameters:
path - The path of the directory containing the created file.
name - The name of the new file
in - An input stream with data for the file.

createLayeredDirectory

public void createLayeredDirectory(java.lang.String targetPath,
                                   java.lang.String parentPath,
                                   java.lang.String name)
Description copied from interface: AVMService
Create a new layered directory. In whatever context this is created, this will be a layered directory that has a primary indirection.

Note: a "primary" indirection is one in which the target is explicitly set; "non-primary" indirect nodes compute their effective target dynamically on the basis of their relative position to the closest "primary" indirect node that contains them. Therefore, changing the target of a "primary" layered directory node immediately alters the indirection targets computed by the "non-primary" layered nodes it contains.

Note: the target of the indirection does not need to exist at the time the layered directory node is created.

Specified by:
createLayeredDirectory in interface AVMService
Parameters:
targetPath - The absolute path to the underlying directory that the layered directory being created will point at.
parentPath - The absolute path to directory containing the layered directory being created.
name - The name of the layered directory being created

createLayeredFile

public void createLayeredFile(java.lang.String targetPath,
                              java.lang.String parentPath,
                              java.lang.String name)
Description copied from interface: AVMService
Create a new layered file.

Note: the target of the indirection does not need to exist at the time the layered file node is created.

Specified by:
createLayeredFile in interface AVMService
Parameters:
targetPath - The absolute path of the underlying file being pointed at
parentPath - The absolute path of the directory containing layered file to be created
name - The name of the layered file to be created

createSnapshot

public java.util.Map createSnapshot(java.lang.String storeName,
                                    java.lang.String tag,
                                    java.lang.String description)
Description copied from interface: AVMService
Snapshot the given AVMStore. When files have been modified since the previous snapshot, a new snapshot version is created; otherwise, no extra snapshot is actually taken.

When no snapshot is actually taken, but either 'tag' or 'store' are non-null, they will override the value for the last snapshot (i.e.: the old values will be discarded); however, if both 'tag' and 'description' are null then invoking createSnapshot when no files have been modified becomes a true no-op.

Specified by:
createSnapshot in interface AVMService
Parameters:
storeName - The name of the AVMStore to snapshot.
tag - The short description.
description - The thick description.
Returns:
A Map of all implicitly or explicitly snapshotted stores to last version id.

createStore

public void createStore(java.lang.String storeName)
Description copied from interface: AVMService
Create a new AVMStore. All stores are top level objects within the AVM repository. The AVM is a forest of versioned trees; each versioned tree is contained within a AVM store with a unique name. If a store is removed via purgeStore, the name of the deleted store can be reused in a later call to createStore.

The store name must be non-null, cannot be the empty string, and must not contain characters that are illegal in normal file names.

Specified by:
createStore in interface AVMService
Parameters:
storeName - The name of the new AVMStore.

createStore

public void createStore(java.lang.String name,
                        java.util.Map props)
Description copied from interface: AVMService
Create a new AVMStore with store properties (equivalent to createStore + setProperties)

Specified by:
createStore in interface AVMService
Parameters:
name - The name of the new AVMStore.
props - A Map of the properties to set.

deleteNodeProperties

public void deleteNodeProperties(java.lang.String path)
Description copied from interface: AVMService
Delete all the properties attached to an AVM node.

Note: to remove an apsect, see: removeAspect

Specified by:
deleteNodeProperties in interface AVMService
Parameters:
path - The path to the node.

deleteNodeProperty

public void deleteNodeProperty(java.lang.String path,
                               org.alfresco.service.namespace.QName name)
Description copied from interface: AVMService
Delete a property.

Note: to remove an apsect, see: removeAspect

Specified by:
deleteNodeProperty in interface AVMService
Parameters:
path - The path to the node.
name - The QName of the property to delete.

deleteStoreProperty

public void deleteStoreProperty(java.lang.String storeName,
                                org.alfresco.service.namespace.QName name)
Description copied from interface: AVMService
Delete a property on a store by name.

Note: to remove an apsect, see: removeAspect

Specified by:
deleteStoreProperty in interface AVMService
Parameters:
storeName - The name of the store.
name - The name of the property to delete.

updateLink

public void updateLink(java.lang.String parentPath,
                       java.lang.String name,
                       AVMNodeDescriptor toLink)
Description copied from interface: AVMService
Low-level internal function:   replace a node in a parent directly. Caution: this is not something one ordinary applications should do, but it is used internally by the AVMSyncService.update() method. This function may disappear from the public interface.

Specified by:
updateLink in interface AVMService
Parameters:
parentPath - The path to the parent directory.
name - The name to give the node.
toLink - A descriptor for the node to insert.

forceCopy

public AVMNodeDescriptor forceCopy(java.lang.String path)
Description copied from interface: AVMService
Low-level internal function:   Force a copy on write write event on the given node. This function is not usually needed, and may be removed from the public interface.

Specified by:
forceCopy in interface AVMService
Parameters:
path - The path to force.

getAPath

public org.alfresco.util.Pair getAPath(AVMNodeDescriptor desc)
Description copied from interface: AVMService
Get a single valid path to a given node.

Specified by:
getAPath in interface AVMService
Parameters:
desc - The descriptor of the node to which a version and path will be fetched.
Returns:
version and path.

getPathsInStoreVersion

public java.util.List getPathsInStoreVersion(AVMNodeDescriptor desc,
                                             java.lang.String storeName,
                                             int version)
Description copied from interface: AVMService
Get all paths to a given node in a single store in a single non-head version.

Specified by:
getPathsInStoreVersion in interface AVMService
Parameters:
desc - The node descriptor.
storeName - The name of the store.
version - The version.
Returns:
A List of AVM paths.

getAspects

public java.util.Set getAspects(int version,
                                java.lang.String path)
Description copied from interface: AVMService
Get all the aspects on an AVM node.

Specified by:
getAspects in interface AVMService
Parameters:
version - The version to look under.
path - The path to the node.
Returns:
A Set of the QNames of the aspects.

getAspects

public java.util.Set getAspects(AVMNodeDescriptor desc)
Description copied from interface: AVMService
Get all the aspects from a node descriptor.

Specified by:
getAspects in interface AVMService
Parameters:
desc - The node descriptor.
Returns:
The Set of Aspects.

getCommonAncestor

public AVMNodeDescriptor getCommonAncestor(AVMNodeDescriptor left,
                                           AVMNodeDescriptor right)
Description copied from interface: AVMService
Get the common ancestor of two nodes if a common ancestor exists. This function is useful for detecting and merging conflicts.

Specified by:
getCommonAncestor in interface AVMService
Parameters:
left - The first node.
right - The second node.
Returns:
The common ancestor. There are four possible results. Null means that there is no common ancestor. Left returned means that left is strictly an ancestor of right. Right returned means that right is strictly an ancestor of left. Any other non null return is the common ancestor and indicates that left and right are in conflict.

getContentDataForRead

public org.alfresco.service.cmr.repository.ContentData getContentDataForRead(int version,
                                                                             java.lang.String path)
Description copied from interface: AVMService
Low-level internal function:   Get the ContentData for a node in a read context. Only applies to a file.

Specified by:
getContentDataForRead in interface AVMService
Parameters:
version - The version to look under.
path - The path to the node.
Returns:
The ContentData object.

getContentDataForRead

public org.alfresco.service.cmr.repository.ContentData getContentDataForRead(AVMNodeDescriptor desc)
Description copied from interface: AVMService
Get ContentData using only a node descriptor.

Specified by:
getContentDataForRead in interface AVMService
Parameters:
desc - The node descriptor.
Returns:
The ContentData

getContentDataForWrite

public org.alfresco.service.cmr.repository.ContentData getContentDataForWrite(java.lang.String path)
Description copied from interface: AVMService
Low-level internal function:   Get the ContentData for a node in a write context.

Specified by:
getContentDataForWrite in interface AVMService
Parameters:
path - The path to the node.
Returns:
The ContentData object.

getContentReader

public org.alfresco.service.cmr.repository.ContentReader getContentReader(int version,
                                                                          java.lang.String path)
Description copied from interface: AVMService
Low-level internal function:   Fetch a content reader for a file node. This function is similar to getFileInputStream; however, it can be used to fetch either InputStream or a random-access nio channel.

Specified by:
getContentReader in interface AVMService
Parameters:
version - The version ID of the file.
path - The absolute AVM path to the file.
Returns:
A ContentReader.

getContentWriter

public org.alfresco.service.cmr.repository.ContentWriter getContentWriter(java.lang.String path,
                                                                          boolean update)
Description copied from interface: AVMService
Low-level internal function:   Fetch a ContentWriter to a file node.

Specified by:
getContentWriter in interface AVMService
Parameters:
path - The path to the file.
update - true if the property must be updated atomically when the content write stream is closed (attaches a listener to the stream); false if the client code will perform the updates itself.
Returns:
A ContentWriter.

getDeleted

public java.util.List getDeleted(int version,
                                 java.lang.String path)
Description copied from interface: AVMService
Non-recursively get the names of nodes that have been deleted in a directory identified by a version ID and a path

Specified by:
getDeleted in interface AVMService
Parameters:
version - The version to look under.
path - The path of the directory.
Returns:
A List of names.

getDirectoryListing

public java.util.SortedMap getDirectoryListing(int version,
                                               java.lang.String path)
Description copied from interface: AVMService
Get a non-recursive listing of a directory identified by its version ID and path. If path does not refer to a directory node, AVMWrongTypeException is thrown.

Specified by:
getDirectoryListing in interface AVMService
Parameters:
version - The version ID to look in.
path - The absolute AVM path to the file.
Returns:
A Map of names to descriptors.

getDirectoryListing

public java.util.SortedMap getDirectoryListing(int version,
                                               java.lang.String path,
                                               boolean includeDeleted)
Description copied from interface: AVMService
Get a non-recursive listing of a directory node identified by its version ID and path; optionally, deleted notes can be included in this listing.

If instead, you wish to obtain a list of only the deleted nodes within a directory, see: getDeleted.

Specified by:
getDirectoryListing in interface AVMService
Parameters:
version - The version ID to look in.
path - The absolute AVM path to the file.
includeDeleted - Whether to include deleted nodes
Returns:
A Map of names to descriptors.

getDirectoryListing

public java.util.SortedMap getDirectoryListing(AVMNodeDescriptor dir)
Description copied from interface: AVMService
Get a non-recursive directory listing of a directory node identified by a node descriptor.

Specified by:
getDirectoryListing in interface AVMService
Parameters:
dir - The directory node descriptor.
Returns:
A sorted Map of names to node descriptors.

getDirectoryListing

public java.util.SortedMap getDirectoryListing(AVMNodeDescriptor dir,
                                               boolean includeDeleted)
Description copied from interface: AVMService
Get a non-recursive directory listing of a directory identified by a node descriptor; optionally, deleted nodes can be included in this listing.

Specified by:
getDirectoryListing in interface AVMService
Parameters:
dir - The directory node descriptor.
includeDeleted - Whether to include deleted nodes.
Returns:
A Map of names to node descriptors.

getDirectoryListing

public java.util.SortedMap getDirectoryListing(AVMNodeDescriptor dir,
                                               java.lang.String childNamePattern)
Description copied from interface: AVMService
Get a non-recursive directory listing of a directory node identified by a node descriptor. Only return children matching the given pattern. '*' match any number of characters - equivalent to SQL '%' '?' match a single character - equivalent to SQL '_' '\' escape - valid sequences "\\", "\*" and "\?"

Specified by:
getDirectoryListing in interface AVMService
Parameters:
dir - The directory node descriptor.
Returns:
A sorted Map of names to node descriptors.

getDirectoryListingArray

public AVMNodeDescriptor[] getDirectoryListingArray(int version,
                                                    java.lang.String path,
                                                    boolean includeDeleted)
Description copied from interface: AVMService
A convenience method to get a directory listing as an Array of AVMNodeDescriptors; this function is otherwise equivalent to getDirectoryListing

Specified by:
getDirectoryListingArray in interface AVMService
Parameters:
version - The version to look under.
path - The path to the directory to be listed.
includeDeleted - Whether to include deleted nodes
Returns:
An array of AVMNodeDescriptors.

getDirectoryListingArray

public AVMNodeDescriptor[] getDirectoryListingArray(AVMNodeDescriptor dir,
                                                    boolean includeDeleted)
Description copied from interface: AVMService
A convenience method to get a non-recursive directory listing as an Array from a directory identified by a node descriptor; optionally, deleted nodes can be included in this listing. This function is identical to getDirectoryListing except that it returns an array.

Specified by:
getDirectoryListingArray in interface AVMService
Parameters:
dir - The descriptor pointing at the directory to list.
includeDeleted - Whether include deleted nodes
Returns:
An array of AVMNodeDescriptors.

getDirectoryListingDirect

public java.util.SortedMap getDirectoryListingDirect(int version,
                                                     java.lang.String path)
Description copied from interface: AVMService
Get a non-recursive listing of nodes contained by a directory identified by its version ID and path, but exclude all nodes that are only contained "indirectly" via layering.

If this function is called on a "plain" (non-layered) directory, it is equivalent to getDirectoryListing.

Specified by:
getDirectoryListingDirect in interface AVMService
Parameters:
version - The version to look up.
path - The full path to get listing for.
Returns:
A Map of names to descriptors.

getDirectoryListingDirect

public java.util.SortedMap getDirectoryListingDirect(int version,
                                                     java.lang.String path,
                                                     boolean includeDeleted)
Description copied from interface: AVMService
Get a non-recursive listing of nodes contained directly, but exclude all nodes that are only contained "indirectly" (i.e.: via layering). This function is identical to getDirectoryListingDirect but it has the option of including deleted nodes in the listing.

Specified by:
getDirectoryListingDirect in interface AVMService
Parameters:
version - The version to look up.
path - The absolute AVM directory path to get a listing for.
includeDeleted - Whether to include deleted nodes.
Returns:
A Map of names to descriptors.

getDirectoryListingDirect

public java.util.SortedMap getDirectoryListingDirect(AVMNodeDescriptor dir,
                                                     boolean includeDeleted)
Description copied from interface: AVMService
Get a non-recursive listing of all the nodes contained by a directory identified by an AVMNodeDescriptor, excluding those that are only present "indirectly" via layering; optionally, deleted nodes that are directly contained can be included this listing.

Specified by:
getDirectoryListingDirect in interface AVMService
Parameters:
dir - The directory descriptor.
includeDeleted - Whether to include directly contained deleted nodes
Returns:
A Map of Strings to descriptors.

getFileInputStream

public java.io.InputStream getFileInputStream(int version,
                                              java.lang.String path)
Description copied from interface: AVMService
Get an InputStream for reading the contents of a file identified by its version ID and AVM path. This method can be used for either plain or layered files.

Specified by:
getFileInputStream in interface AVMService
Parameters:
version - The version ID to look in.
path - The absolute path to the file.
Returns:
An InputStream for the designated file.

getFileInputStream

public java.io.InputStream getFileInputStream(AVMNodeDescriptor desc)
Description copied from interface: AVMService
Get an InputStream for reading the contents of a file node identified by its descriptor. This method can be used for either plain or layered files.

Specified by:
getFileInputStream in interface AVMService
Parameters:
desc - The descriptor.
Returns:
An InputStream.

getFileOutputStream

public java.io.OutputStream getFileOutputStream(java.lang.String path)
Description copied from interface: AVMService
Get an output stream to write to a file identified by an AVM path. This file must already exist. This method can be used for either plain or layered files. To create a plain file, see: createFile. To create a layered file, see: createLayeredFile.

Specified by:
getFileOutputStream in interface AVMService
Parameters:
path - The absolute path to the file.

getHeadPaths

public java.util.List getHeadPaths(AVMNodeDescriptor desc)
Description copied from interface: AVMService
Get all paths that a given node has that are in the HEAD version ( -1 ). This can be an expensive operation but less so than getPaths().

Specified by:
getHeadPaths in interface AVMService
Parameters:
desc - The node descriptor to get paths for.
Returns:
A List of version, path Pairs.

getHistory

public java.util.List getHistory(AVMNodeDescriptor desc,
                                 int count)
Description copied from interface: AVMService
Get a list of up to count nodes in the history chain of a node. The initial element of the list returned will be desc (as long as the count is non-zero).

Specified by:
getHistory in interface AVMService
Parameters:
desc - The descriptor for a node to find ancestors for.
count - maximum number of ancestors to return in the list (the value -1 means "no limit -- return them all")
Returns:
A List of ancestors starting with the most recent.

getIndirectionPath

public java.lang.String getIndirectionPath(int version,
                                           java.lang.String path)
Description copied from interface: AVMService
Get the indirection path for a node in a layered context whether that indirection path is primary or non-primary (or seen via transparency). If you call getIndirectionPath on a layered node, you'll fetch its explicitly set target; if you call this function on a non-primary indirection node or a node seen via transparency, you'll get back the path to the corresponding node in the underlying target.

For example, if "mysite--alice:/www" is a layered directory that targets "mysite:/www", and "mysite--alice" contains no content directly, then if the path path "mysite:/www/avm_webapps/ROOT/x/y/z" is valid, calling getIndirectionPath on "mysite--alice:/www/avm_webapps/ROOT/x/y/z" will yield "mysite:/www/avm_webapps/ROOT/x/y/z".

Specified by:
getIndirectionPath in interface AVMService
Parameters:
version - The version number to get.
path - The path to the node of interest.
Returns:
The indirection path, or null if the path is not in a layered context.

getLatestSnapshotID

public int getLatestSnapshotID(java.lang.String storeName)
Description copied from interface: AVMService
Get the latest snapshot ID of a store. Note: All stores have at least one snapshot ID: 0; this is the "empty" snapshot taken when the store is first created.

Specified by:
getLatestSnapshotID in interface AVMService
Parameters:
storeName - The store name.
Returns:
The ID of the latest extant version of the store.

getLayeringInfo

public LayeringDescriptor getLayeringInfo(int version,
                                          java.lang.String path)
Description copied from interface: AVMService
Get layering information about a path. The LayeringDescriptor returned can be used to determine whether a node is in the background (and if so, which AVM store contains it directly), or if it is directly contained by the AVM store referenced by path.

Specified by:
getLayeringInfo in interface AVMService
Parameters:
version - The version to look under.
path - The absolute AVM path.
Returns:
A LayeringDescriptor.

getNextVersionID

public int getNextVersionID(java.lang.String storeName)
Description copied from interface: AVMService
Gets the ID that the next snapshotted version of a store will have.

Note: unless the operations that require this value to be valid are performed within a transaction, this value can become "stale".

Specified by:
getNextVersionID in interface AVMService
Parameters:
storeName - The name of the AVMStore.
Returns:
The next version ID of the AVMStore.

getNodeProperties

public java.util.Map getNodeProperties(int version,
                                       java.lang.String path)
Description copied from interface: AVMService
Get all the properties associated with a node that is identified by a version ID and a path.

Specified by:
getNodeProperties in interface AVMService
Parameters:
version - The version to look under.
path - The path to the node.
Returns:
A Map of QNames to PropertyValues.

getNodeProperties

public java.util.Map getNodeProperties(AVMNodeDescriptor desc)
Description copied from interface: AVMService
Get all the properties associated with a node identified by a descriptor.

Specified by:
getNodeProperties in interface AVMService
Parameters:
desc - The node descriptor
Returns:
A Map of the properties.

getNodeProperty

public PropertyValue getNodeProperty(int version,
                                     java.lang.String path,
                                     org.alfresco.service.namespace.QName name)
Description copied from interface: AVMService
Get a property of a node by QName.

Specified by:
getNodeProperty in interface AVMService
Parameters:
version - The version to look under.
path - The path to the node.
name - The QName.
Returns:
The PropertyValue or null if it doesn't exist.

getPaths

public java.util.List getPaths(AVMNodeDescriptor desc)
Description copied from interface: AVMService
Get a list of all paths that a given node has. This can be an extremely expensive operation due to the large number of paths to an AVMNodeDescriptor that can be generated via branching and versioning. For example, if an asset is present in the initial version of a store, and that store has been versioned 10,000 times, there are a minimum of 10,000 paths that lead to it. The effect of branching is multiplicative.

Note: paths that only access desc via transparency are not returned by this function; only "direct" containment relationships are considered.

For those concerned with records management applications, it's worth noting that once every path to an asset has been deleted, the system will purge it entirely in an asynchronous manner.

Specified by:
getPaths in interface AVMService
Parameters:
desc - The node descriptor to get paths for.
Returns:
A List of version, path Pairs.

getPathsInStoreHead

public java.util.List getPathsInStoreHead(AVMNodeDescriptor desc,
                                          java.lang.String storeName)
Description copied from interface: AVMService
Get all paths to a node starting at the HEAD version ( -1 ) of a store. This can be an expensive operation but less so than getHeadPaths().

Specified by:
getPathsInStoreHead in interface AVMService
Parameters:
desc - The node descriptor.
storeName - The store.
Returns:
A List of all paths meeting the criteria.

getStore

public AVMStoreDescriptor getStore(java.lang.String storeName)
Description copied from interface: AVMService
Get a descriptor for an AVMStore.

Specified by:
getStore in interface AVMService
Parameters:
storeName - The AVMStore's name.
Returns:
A Descriptor, or null if not found.

getStoreProperties

public java.util.Map getStoreProperties(java.lang.String storeName)
Description copied from interface: AVMService
Get all the properties associated with a store.

Specified by:
getStoreProperties in interface AVMService
Parameters:
storeName - The name of the store.
Returns:
A Map of the stores properties.

getStoreProperty

public PropertyValue getStoreProperty(java.lang.String storeName,
                                      org.alfresco.service.namespace.QName name)
Description copied from interface: AVMService
Get a property from a store.

Specified by:
getStoreProperty in interface AVMService
Parameters:
storeName - The name of the store.
name - The name of the property.
Returns:
A PropertyValue or null if non-existent.

getStoreRoot

public AVMNodeDescriptor getStoreRoot(int version,
                                      java.lang.String storeName)
Description copied from interface: AVMService
A convenience method for getting the specified root directory of an AVMStore (e.g.: "mysite:/").

Specified by:
getStoreRoot in interface AVMService
Parameters:
version - The version to look up.
storeName - The name of the AVMStore.
Returns:
A descriptor for the specified root.

getStoreVersions

public java.util.List getStoreVersions(java.lang.String storeName)
Description copied from interface: AVMService
Get the set of versions in an AVMStore. The version ID values within this list will always be may appear out of order, and may contain missing values (due to the possibility that purgeStore operations have been performed). Because the number of versions that a store can contain may become large, this call can be a resource-intensive, and may even causing Out of Memory exceptions.

Specified by:
getStoreVersions in interface AVMService
Parameters:
storeName - The name of the AVMStore.
Returns:
A Set of version descriptors.

getStoreVersions

public java.util.List getStoreVersions(java.lang.String storeName,
                                       java.util.Date from,
                                       java.util.Date to)
Description copied from interface: AVMService
Get AVMStore version descriptors by creation date. Either from or to can be null but not both.

The order of the values returned is not guaranteed, nor are the version IDs necessarily free of "missing" values (due to the possibility that purgeStore operations have been performed).

Note: for portability, all dates are stored as 64-bit longs, with a time resolution of one millisecond. Therefore, aliasing/wrapping are not a concern unless you need to plan 292.4 million years ahead. If so, please contact your system administrator.

Specified by:
getStoreVersions in interface AVMService
Parameters:
storeName - The name of the AVMStore.
from - Earliest date of version to include.
to - Latest date of version to include.
Returns:
The Set of version descriptors that match.

getStores

public java.util.List getStores()
Description copied from interface: AVMService
Get the descriptors of all AVMStores in the repository.

Specified by:
getStores in interface AVMService
Returns:
A List of all AVMStores.

getSystemStore

public AVMStoreDescriptor getSystemStore()
Description copied from interface: AVMService
Low-level internal function:   Retrieve the reserved "system" store. This method isn't currently used, but may be in some future release.

Specified by:
getSystemStore in interface AVMService
Returns:
The descriptor.

hasAspect

public boolean hasAspect(int version,
                         java.lang.String path,
                         org.alfresco.service.namespace.QName aspectName)
Description copied from interface: AVMService
Determines whether a node has a particular aspect.

Specified by:
hasAspect in interface AVMService
Parameters:
version - The version to look under.
path - The path to the node.
aspectName - The aspect name to check.
Returns:
Whether the given node has the given aspect.

link

public void link(java.lang.String parentPath,
                 java.lang.String name,
                 AVMNodeDescriptor toLink)
Description copied from interface: AVMService
Low-level internal function:   Insert a node into a parent directly. Caution: this is not something one ordinary applications should do, but it is used internally by the AVMSyncService.update() method. This function may disappear from the public interface.

Specified by:
link in interface AVMService
Parameters:
parentPath - The path to the parent directory.
name - The name to give the node.
toLink - A descriptor for the node to insert.

lookup

public AVMNodeDescriptor lookup(int version,
                                java.lang.String path)
Description copied from interface: AVMService
Lookup a node identified by version ID and path.

Specified by:
lookup in interface AVMService
Parameters:
version - The version ID to look under.
path - The simple absolute path to the parent directory.
Returns:
An AVMNodeDescriptor, or null if the node does not exist.

lookup

public AVMNodeDescriptor lookup(int version,
                                java.lang.String path,
                                boolean includeDeleted)
Description copied from interface: AVMService
Lookup a node identified by version ID and path; optionally, if the node is deleted, its descriptor can still be retrieved.

Specified by:
lookup in interface AVMService
Parameters:
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 retrieved
Returns:
An AVMNodeDescriptor, or null if the version does not exist.

lookup

public AVMNodeDescriptor lookup(AVMNodeDescriptor dir,
                                java.lang.String name)
Description copied from interface: AVMService
Lookup a node identified by the directory node that contains it, and its name.

Specified by:
lookup in interface AVMService
Parameters:
dir - The descriptor for the directory node.
name - The name to lookup.
Returns:
The descriptor for the child.

lookup

public AVMNodeDescriptor lookup(AVMNodeDescriptor dir,
                                java.lang.String name,
                                boolean includeDeleted)
Description copied from interface: AVMService
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.

Specified by:
lookup in interface AVMService
Parameters:
dir - The descriptor for the directory node.
name - The name to lookup.
includeDeleted - Whether to allow a deleted node to be retrieved via the lookup
Returns:
The descriptor for the child, null if the child doesn't exist.

makePrimary

public void makePrimary(java.lang.String path)
Description copied from interface: AVMService
Make a directory into a primary indirection node.

Specified by:
makePrimary in interface AVMService
Parameters:
path - The full path.

makeTransparent

public void makeTransparent(java.lang.String dirPath,
                            java.lang.String name)
Description copied from interface: AVMService
Atomically delete name within dirPath and uncover it so whatever is underneath can be seen via transparency. If name corresponds to a deletion already, then the deletion step is skipped, and the "uncover" operation is performed.

Specified by:
makeTransparent in interface AVMService
Parameters:
dirPath - The path to the layered directory.
name - The name of the item this method will flatten

purgeStore

public void purgeStore(java.lang.String storeName)
Description copied from interface: AVMService
Purge an AVMStore. This completely removes an AVMStore.

Note: while the store being purged disappears from view immediately, any nodes that become unreachable as a result are deleted asynchronously.

Specified by:
purgeStore in interface AVMService
Parameters:
storeName - The name of the AVMStore.

purgeVersion

public void purgeVersion(int version,
                         java.lang.String storeName)
Description copied from interface: AVMService
Purge a version from an AVMStore. Deletes everything that lives in the given version only.

Specified by:
purgeVersion in interface AVMService
Parameters:
version - The version to purge.
storeName - The name of the AVMStore from which to purge it.

queryStorePropertyKey

public java.util.Map queryStorePropertyKey(java.lang.String storeName,
                                           org.alfresco.service.namespace.QName keyPattern)
Description copied from interface: AVMService
Queries a given store for properties with keys that match a given pattern.

Specified by:
queryStorePropertyKey in interface AVMService
Parameters:
storeName - The name of the store.
keyPattern - The sql 'like' pattern, inserted into a QName.
Returns:
A Map of the matching key value pairs.

queryStoresPropertyKeys

public java.util.Map queryStoresPropertyKeys(org.alfresco.service.namespace.QName keyPattern)
Description copied from interface: AVMService
Queries all AVM stores for properties with keys that match a given pattern.

Specified by:
queryStoresPropertyKeys in interface AVMService
Parameters:
keyPattern - The sql 'like' pattern, inserted into a QName.
Returns:
A Map of store names to Maps of property key value pairs that match the pattern.

removeAspect

public void removeAspect(java.lang.String path,
                         org.alfresco.service.namespace.QName aspectName)
Description copied from interface: AVMService
Remove an aspect and its properties from a node.

Specified by:
removeAspect in interface AVMService
Parameters:
path - The path to the node.
aspectName - The name of the aspect.

removeNode

public void removeNode(java.lang.String parent,
                       java.lang.String name)
Description copied from interface: AVMService
Remove a file or directory from its parent directory. In a layered context, the newly deleted node will hide a file of the same name in the corresponding layer below.

If instead you want to make the file in the lower layer visible via transparency, see: uncover. If you want to perform a removal and an uncover operation atomically, see: makeTransparent.

Caution: this removes directories even if they are not empty.

Note: developers of records management systems must also be aware that the AVMNode corresponding to the parent directory and name provided might still be accessible via different path lookups after this function has completed; this because branching and versioning operations create manifestations of nodes in a manner that is similar to a UNIX hard link. If you need to discover every possible path that could retrieve the associated AVMNode, see: getPaths, getHeadPaths, and getPathsInStoreHead.

Specified by:
removeNode in interface AVMService
Parameters:
parent - The absolute path to the parent directory.
name - The name of the child to remove.

removeNode

public void removeNode(java.lang.String path)
Description copied from interface: AVMService
A convenience method that removes a node specified by an AVM path. It merely parses an absolute path into a parent directory and a child name, then calls removeNode.

Specified by:
removeNode in interface AVMService
Parameters:
path - The full path to the node to remove.

rename

public void rename(java.lang.String srcParent,
                   java.lang.String srcName,
                   java.lang.String dstParent,
                   java.lang.String dstName)
Description copied from interface: AVMService
Rename a file or directory. There are a number of things to note about the interaction of rename and layering:

Note: if instead you want to rename an AVM store, see renameStore.

Specified by:
rename in interface AVMService
Parameters:
srcParent - The absolute path to the parent directory.
srcName - The name of the node in the src directory.
dstParent - The absolute path to the destination directory.
dstName - The name that the node will have in the destination directory.

renameStore

public void renameStore(java.lang.String sourceStoreName,
                        java.lang.String destStoreName)
Description copied from interface: AVMService
Rename a store.

Specified by:
renameStore in interface AVMService
Parameters:
sourceStoreName - The original name.
destStoreName - The new name.

retargetLayeredDirectory

public void retargetLayeredDirectory(java.lang.String path,
                                     java.lang.String target)
Description copied from interface: AVMService
Retarget a layered directory. Change the target pointed to by a layered directory node. This has the side effect of making the layered directory a primary indirection if the layered directory's indirection was "non-primary".

Specified by:
retargetLayeredDirectory in interface AVMService
Parameters:
path - Path to the layered directory.
target - The new indirection target of the layered directory

revert

public void revert(java.lang.String path,
                   AVMNodeDescriptor toRevertTo)
Description copied from interface: AVMService
Revert a HEAD path to a given version. This works by cloning the version to revert to, and then linking that new version into HEAD. The reverted version will have the previous HEAD version as ancestor.

Specified by:
revert in interface AVMService
Parameters:
path - The path to the node to revert.
toRevertTo - The descriptor of the version to revert to.

setContentData

public void setContentData(java.lang.String path,
                           org.alfresco.service.cmr.repository.ContentData data)
Description copied from interface: AVMService
Low-level internal function:   Set the content data on a file.

Specified by:
setContentData in interface AVMService
Parameters:
path - The path to the file.
data - The ContentData to set.

setEncoding

public void setEncoding(java.lang.String path,
                        java.lang.String encoding)
Description copied from interface: AVMService
Set the encoding.

Specified by:
setEncoding in interface AVMService
Parameters:
path - The path of the file.
encoding - The encoding.

setGuid

public void setGuid(java.lang.String path,
                    java.lang.String guid)
Description copied from interface: AVMService
Set the GUID on a node. The GUID of a node uniquely identifies the state of a node, i.e. its content, metadata, and aspects.

Specified by:
setGuid in interface AVMService
Parameters:
path - The path to the node.
guid - The GUID to set.

setMetaDataFrom

public void setMetaDataFrom(java.lang.String path,
                            AVMNodeDescriptor from)
Description copied from interface: AVMService
Set all metadata on a node from another node. Aspects, properties, ACLs.

Specified by:
setMetaDataFrom in interface AVMService
Parameters:
path - The path to the node to set.
from - The descriptor for the node to get metadata from.

setMimeType

public void setMimeType(java.lang.String path,
                        java.lang.String mimeType)
Description copied from interface: AVMService
Set the mime type.

Specified by:
setMimeType in interface AVMService
Parameters:
path - The path of the file.
mimeType - The mime type.

setNodeProperties

public void setNodeProperties(java.lang.String path,
                              java.util.Map properties)
Description copied from interface: AVMService
Set a collection of properties on a node.

Specified by:
setNodeProperties in interface AVMService
Parameters:
path - The path to the node.
properties - The Map of properties to set.

setNodeProperty

public void setNodeProperty(java.lang.String path,
                            org.alfresco.service.namespace.QName name,
                            PropertyValue value)
Description copied from interface: AVMService
Set a property on a node.

Specified by:
setNodeProperty in interface AVMService
Parameters:
path - The path to the node to set the property on.
name - The QName of the property.
value - The property to set.

setOpacity

public void setOpacity(java.lang.String path,
                       boolean opacity)
Description copied from interface: AVMService
Set the opacity of a layered directory. An opaque layered directory hides the contents of its indirection.

Specified by:
setOpacity in interface AVMService
Parameters:
path - The path to the layered directory.

setStoreProperties

public void setStoreProperties(java.lang.String storeName,
                               java.util.Map props)
Description copied from interface: AVMService
Set a group of properties on a store. Existing properties will be overwritten.

Specified by:
setStoreProperties in interface AVMService
Parameters:
storeName - The name of the store.
props - A Map of the properties to set.

setStoreProperty

public void setStoreProperty(java.lang.String storeName,
                             org.alfresco.service.namespace.QName name,
                             PropertyValue value)
Description copied from interface: AVMService
Set a property on a store. If the property exists it will be overwritten.

Specified by:
setStoreProperty in interface AVMService
Parameters:
storeName - The store to set the property on.
name - The name of the property.
value - The value of the property.

uncover

public void uncover(java.lang.String dirPath,
                    java.lang.String name)
Description copied from interface: AVMService
If a layered directory dirPath has a deleted entry of the given name, remove that name from the deleted list, so that if a layer below it contains an entry of this name, it can be seen via transparency from dirPath.

Note: if you are looking for an atomic operation that first deletes an object, then performs an "uncover" operation to make it transparent, see makeTransparent.

Specified by:
uncover in interface AVMService
Parameters:
dirPath - The path to the layered directory.
name - The name to uncover.

createDirectory

public void createDirectory(java.lang.String path,
                            java.lang.String name,
                            java.util.List aspects,
                            java.util.Map properties)
Description copied from interface: AVMService
Create a new directory with aspects and properties. If path is within a layer, the new directory will be a layered directory; otherwise, the new directory will be a plain directory.

Specified by:
createDirectory in interface AVMService
Parameters:
path - The simple absolute path to the parent.
name - The name to give the directory.
aspects - A list of aspects to add.
properties - A Map of properties to add.

createFile

public void createFile(java.lang.String path,
                       java.lang.String name,
                       java.io.InputStream in,
                       java.util.List aspects,
                       java.util.Map properties)
Description copied from interface: AVMService
Create a new "plain" (non-layered) file with aspects and properties. Guarantees that the entire contents of the input stream will be loaded atomically. The directory identified by path must already exist.

Specified by:
createFile in interface AVMService
Parameters:
path - The path of the directory containing the created file.
name - The name of the new file
in - An input stream with data for the file.
properties - A map of properties to give the file.

getStoreVersionsTo

public java.util.List getStoreVersionsTo(java.lang.String name,
                                         int version)
Description copied from interface: AVMService
Get all versions from the first up to and including the one specified Returned in ascending version id order.

Specified by:
getStoreVersionsTo in interface AVMService
Returns:
list of version descriptors

getStoreVersionsFrom

public java.util.List getStoreVersionsFrom(java.lang.String name,
                                           int version)
Description copied from interface: AVMService
Get all versions from the last down to and including the one specified Returned in descending version id.

Specified by:
getStoreVersionsFrom in interface AVMService
Returns:
list of version descriptors

getStoreVersionsBetween

public java.util.List getStoreVersionsBetween(java.lang.String name,
                                              int from,
                                              int to)
Description copied from interface: AVMService
Get all versions from an including startVersion up to but NOT including endVersion

Specified by:
getStoreVersionsBetween in interface AVMService
Returns:
list of version descriptors


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.