org.alfresco.repo.avm
Class AVMStoreImpl

java.lang.Object
  extended by org.alfresco.repo.avm.AVMStoreImpl
All Implemented Interfaces:
AVMStore

public class AVMStoreImpl
extends java.lang.Object
implements AVMStore

A Repository contains a current root directory and a list of root versions. Each root version corresponds to a separate snapshot operation.


Constructor Summary
AVMStoreImpl()
          Default constructor.
AVMStoreImpl(AVMRepository repo, java.lang.String name)
          Make a brand new AVMStore.
 
Method Summary
 void addAspect(java.lang.String path, org.alfresco.service.namespace.QName aspectName)
          Add an aspect to a node.
 org.alfresco.service.cmr.repository.ContentWriter createContentWriter(java.lang.String path, boolean update)
          Get a ContentWriter to a file.
 void createDirectory(java.lang.String path, java.lang.String name, java.util.List aspects, java.util.Map properties)
          Create a new directory.
 java.io.OutputStream createFile(java.lang.String path, java.lang.String name)
          Create a new file.
 void createFile(java.lang.String path, java.lang.String name, java.io.File data, java.util.List aspects, java.util.Map properties)
          Create a file with the given contents.
 void createLayeredDirectory(java.lang.String srcPath, java.lang.String dstPath, java.lang.String name)
          Create a new layered directory.
 void createLayeredFile(java.lang.String srcPath, java.lang.String dstPath, java.lang.String name)
          Create a new layered file.
 java.util.Map createSnapshot(java.lang.String tag, java.lang.String description, java.util.Map snapShotMap)
          Snapshot this store.
 void deleteNodeProperties(java.lang.String path)
          Delete all properties from a node.
 void deleteNodeProperty(java.lang.String path, org.alfresco.service.namespace.QName name)
          Delete a single property from a node.
 void deleteProperty(org.alfresco.service.namespace.QName name)
          Delete a property.
 boolean equals(java.lang.Object obj)
          Equals override.
 Acl getACL(int version, java.lang.String path)
          Get the ACL on a node.
 java.util.Set getAspects(int version, java.lang.String path)
          Get all aspects on a given node.
 AVMRepository getAVMRepository()
          Get the AVMRepository.
 org.alfresco.service.cmr.repository.ContentData getContentDataForRead(int version, java.lang.String path)
          Get the ContentData on a file.
 org.alfresco.service.cmr.repository.ContentData getContentDataForWrite(java.lang.String path)
          Get the ContentData on a file for writing.
 org.alfresco.service.cmr.repository.ContentReader getContentReader(int version, java.lang.String path)
          Get a ContentReader from a file.
 java.util.List getDeleted(int version, java.lang.String path)
          Get the names of the deleted nodes in a directory.
 AVMStoreDescriptor getDescriptor()
          Get the descriptor for this.
 long getId()
          Get the primary key.
 java.lang.String getIndirectionPath(int version, java.lang.String path)
          Get the effective indirection path for a layered node.
 java.io.InputStream getInputStream(int version, java.lang.String path)
          Get an input stream from a file.
 int getLastVersionID()
          This gets the last extant version id.
 java.util.SortedMap getListing(int version, java.lang.String path, boolean includeDeleted)
          Get a listing from a directory.
 java.util.SortedMap getListingDirect(int version, java.lang.String path, boolean includeDeleted)
          Get the list of nodes directly contained in a directory.
 java.lang.String getName()
          Get the name of this AVMStore.
 int getNextVersionID()
          Get the next version id.
 java.util.Map getNodeProperties(int version, java.lang.String path)
          Get all the properties associated with a node.
 PropertyValue getNodeProperty(int version, java.lang.String path, org.alfresco.service.namespace.QName name)
          Get a property by name.
 java.io.OutputStream getOutputStream(java.lang.String path)
          Get an output stream to a file.
 java.util.Map getProperties()
          Get all the properties associated with this store.
 PropertyValue getProperty(org.alfresco.service.namespace.QName name)
          Get a property by name.
 DirectoryNode getRoot()
          Get the root directory.
 AVMNodeDescriptor getRoot(int version)
          Get the root node descriptor.
 Acl getStoreAcl()
          Get the Acl associated with this store.
 long getVers()
          Get the version (for concurrency control).
 java.util.List getVersions()
          Get the set of all extant versions for this AVMStore.
 java.util.List getVersions(java.util.Date from, java.util.Date to)
          Get the versions between the given dates (inclusive).
 java.util.List getVersionsBetween(int startVersion, int endVersion)
          Get all versions from an including startVersion up to but NOT including endVersion
 java.util.List getVersionsFrom(int version)
          Get all the versions starting from the last until the version specified
 java.util.List getVersionsTo(int version)
          Get all the versions after and including the one specified
 boolean hasAspect(int version, java.lang.String path, org.alfresco.service.namespace.QName aspectName)
          Does a given node have a given aspect.
 int hashCode()
          Get a hash code.
 void link(java.lang.String parentPath, java.lang.String name, AVMNodeDescriptor toLink)
          Link a node into a directory, directly.
 org.alfresco.repo.avm.Lookup lookup(int version, java.lang.String path, boolean write, boolean includeDeleted)
          Lookup up a path.
 org.alfresco.repo.avm.Lookup lookupDirectory(int version, java.lang.String path, boolean write)
          Lookup a node and insist that it is a directory.
 void makePrimary(java.lang.String path)
          Make the indicated node a primary indirection.
 void purgeVersion(int version)
          Purge all nodes reachable only via this version and repository.
 void removeAspect(java.lang.String path, org.alfresco.service.namespace.QName aspectName)
          Remove an aspect and all its properties from a node.
 void removeNode(java.lang.String path, java.lang.String name)
          Remove a node and everything underneath it.
 void retargetLayeredDirectory(java.lang.String path, java.lang.String target)
          Change the indirection of a layered directory.
 void revert(java.lang.String path, java.lang.String name, AVMNodeDescriptor toRevertTo)
          Revert a head path to a given version.
 void setACL(java.lang.String path, Acl acl)
          Set the ACL on a node.
 void setContentData(java.lang.String path, org.alfresco.service.cmr.repository.ContentData data)
          Set the ContentData for a file.
 void setEncoding(java.lang.String path, java.lang.String encoding)
          Set the encoding of a file.
 void setGuid(java.lang.String path, java.lang.String guid)
          Set the GUID on a node.
 void setId(long id)
          Set the primary key
 void setMetaDataFrom(java.lang.String path, AVMNode from)
          Set meta data, aspects, properties, acls, from another node.
 void setMimeType(java.lang.String path, java.lang.String mimeType)
          Set the mime type of a file.
 void setName(java.lang.String name)
          Set the name of this AVMStore.
 void setNewRoot(DirectoryNode root)
          Set a new root for this.
 void setNextVersionID(int nextVersionID)
          Set the next version id.
 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 setProperties(java.util.Map properties)
          Set a group of properties on this store.
 void setProperty(org.alfresco.service.namespace.QName name, PropertyValue value)
          Set a property on this store.
 void setRoot(DirectoryNode root)
          Set the root directory.
 void setStoreAcl(Acl acl)
          Set the acl on this store.
 void setVers(long vers)
          Set the version (for concurrency control).
 java.lang.String toString()
           
 void uncover(java.lang.String dirPath, java.lang.String name)
          Allow a name which has been deleted to be visible through that layer.
 void updateLink(java.lang.String parentPath, java.lang.String name, AVMNodeDescriptor toLink)
          Update a link to a node in a directory, directly.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AVMStoreImpl

public AVMStoreImpl()
Default constructor.


AVMStoreImpl

public AVMStoreImpl(AVMRepository repo,
                    java.lang.String name)
Make a brand new AVMStore.

Parameters:
repo - The AVMRepository.
name - The name of the AVMStore.
Method Detail

setId

public void setId(long id)
Set the primary key

Parameters:
id - The primary key.

getId

public long getId()
Get the primary key.

Specified by:
getId in interface AVMStore
Returns:
The primary key.

setNewRoot

public void setNewRoot(DirectoryNode root)
Set a new root for this.

Specified by:
setNewRoot in interface AVMStore
Parameters:
root -

createSnapshot

public java.util.Map createSnapshot(java.lang.String tag,
                                    java.lang.String description,
                                    java.util.Map snapShotMap)
Snapshot this store. This creates a new version record.

Specified by:
createSnapshot in interface AVMStore
Parameters:
tag - The short description.
snapShotMap - Keeps track of snapshot ids for all stores that end up snapshotted, possibly recursively.
Returns:
The version id of the new snapshot.

createDirectory

public void createDirectory(java.lang.String path,
                            java.lang.String name,
                            java.util.List aspects,
                            java.util.Map properties)
Create a new directory.

Specified by:
createDirectory in interface AVMStore
Parameters:
path - The path to the containing directory.
name - The name of the new directory.

createLayeredDirectory

public void createLayeredDirectory(java.lang.String srcPath,
                                   java.lang.String dstPath,
                                   java.lang.String name)
Create a new layered directory.

Specified by:
createLayeredDirectory in interface AVMStore
Parameters:
srcPath - The target indirection for a layered node.
dstPath - The containing directory for the new node.
name - The name of the new node.

createFile

public java.io.OutputStream createFile(java.lang.String path,
                                       java.lang.String name)
Create a new file.

Specified by:
createFile in interface AVMStore
Parameters:
path - The path to the directory to contain the new file.
name - The name to give the new file. initial content.
Returns:
An OutputStream.

createFile

public void createFile(java.lang.String path,
                       java.lang.String name,
                       java.io.File data,
                       java.util.List aspects,
                       java.util.Map properties)
Create a file with the given contents.

Specified by:
createFile in interface AVMStore
Parameters:
path - The path to the containing directory.
name - The name to give the new file.
data - The contents.

createLayeredFile

public void createLayeredFile(java.lang.String srcPath,
                              java.lang.String dstPath,
                              java.lang.String name)
Create a new layered file.

Specified by:
createLayeredFile in interface AVMStore
Parameters:
srcPath - The target indirection for the layered file.
dstPath - The path to the directory to contain the new file.
name - The name of the new file.

getInputStream

public java.io.InputStream getInputStream(int version,
                                          java.lang.String path)
Get an input stream from a file.

Specified by:
getInputStream in interface AVMStore
Parameters:
version - The version id to look under.
path - The path to the file.
Returns:
An InputStream.

getContentReader

public org.alfresco.service.cmr.repository.ContentReader getContentReader(int version,
                                                                          java.lang.String path)
Get a ContentReader from a file.

Specified by:
getContentReader in interface AVMStore
Parameters:
version - The version to look under.
path - The path to the file.
Returns:
A ContentReader.

createContentWriter

public org.alfresco.service.cmr.repository.ContentWriter createContentWriter(java.lang.String path,
                                                                             boolean update)
Get a ContentWriter to a file.

Specified by:
createContentWriter in interface AVMStore
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.

getListing

public java.util.SortedMap getListing(int version,
                                      java.lang.String path,
                                      boolean includeDeleted)
Get a listing from a directory.

Specified by:
getListing in interface AVMStore
Parameters:
version - The version to look under.
path - The path to the directory.
includeDeleted - Whether to see Deleted nodes.
Returns:
A List of FolderEntries.

getListingDirect

public java.util.SortedMap getListingDirect(int version,
                                            java.lang.String path,
                                            boolean includeDeleted)
Get the list of nodes directly contained in a directory.

Specified by:
getListingDirect in interface AVMStore
Parameters:
version - The version to look under.
path - The path to the directory.
includeDeleted - Whether to see Deleted nodes.
Returns:
A Map of names to descriptors.

getDeleted

public java.util.List getDeleted(int version,
                                 java.lang.String path)
Get the names of the deleted nodes in a directory.

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

getOutputStream

public java.io.OutputStream getOutputStream(java.lang.String path)
Get an output stream to a file.

Specified by:
getOutputStream in interface AVMStore
Parameters:
path - The path to the file.
Returns:
An OutputStream.

removeNode

public void removeNode(java.lang.String path,
                       java.lang.String name)
Remove a node and everything underneath it.

Specified by:
removeNode in interface AVMStore
Parameters:
path - The path to the containing directory.
name - The name of the node to remove.

uncover

public void uncover(java.lang.String dirPath,
                    java.lang.String name)
Allow a name which has been deleted to be visible through that layer.

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

getVersions

public java.util.List getVersions()
Get the set of all extant versions for this AVMStore.

Specified by:
getVersions in interface AVMStore
Returns:
A Set of version ids.

getVersions

public java.util.List getVersions(java.util.Date from,
                                  java.util.Date to)
Get the versions between the given dates (inclusive). From or to may be null but not both.

Specified by:
getVersions in interface AVMStore
Parameters:
from - The earliest date.
to - The latest date.
Returns:
The Set of matching version IDs.

getVersionsTo

public java.util.List getVersionsTo(int version)
Description copied from interface: AVMStore
Get all the versions after and including the one specified

Specified by:
getVersionsTo in interface AVMStore
Parameters:
version - - the version to start from
Returns:
- the versions in ascending order

getVersionsFrom

public java.util.List getVersionsFrom(int version)
Description copied from interface: AVMStore
Get all the versions starting from the last until the version specified

Specified by:
getVersionsFrom in interface AVMStore
Parameters:
version - - the version which which to end
Returns:
- the versions in descending order

getVersionsBetween

public java.util.List getVersionsBetween(int startVersion,
                                         int endVersion)
Description copied from interface: AVMStore
Get all versions from an including startVersion up to but NOT including endVersion

Specified by:
getVersionsBetween in interface AVMStore
Returns:
- the versions in ascending order

getAVMRepository

public AVMRepository getAVMRepository()
Get the AVMRepository.

Specified by:
getAVMRepository in interface AVMStore
Returns:
The AVMRepository

lookup

public org.alfresco.repo.avm.Lookup lookup(int version,
                                           java.lang.String path,
                                           boolean write,
                                           boolean includeDeleted)
Lookup up a path.

Specified by:
lookup in interface AVMStore
Parameters:
version - The version to look in.
path - The path to look up.
write - Whether this is in the context of a write.
includeDeleted - Whether to see Deleted nodes.
Returns:
A Lookup object.

getRoot

public AVMNodeDescriptor getRoot(int version)
Get the root node descriptor.

Specified by:
getRoot in interface AVMStore
Parameters:
version - The version to get.
Returns:
The descriptor.

lookupDirectory

public org.alfresco.repo.avm.Lookup lookupDirectory(int version,
                                                    java.lang.String path,
                                                    boolean write)
Lookup a node and insist that it is a directory.

Specified by:
lookupDirectory in interface AVMStore
Parameters:
version - The version to look under.
path - The path to the directory.
write - Whether this is in a write context.
Returns:
A Lookup object.

getIndirectionPath

public java.lang.String getIndirectionPath(int version,
                                           java.lang.String path)
Get the effective indirection path for a layered node.

Specified by:
getIndirectionPath in interface AVMStore
Parameters:
version - The version to look under.
path - The path to the node.
Returns:
The effective indirection.

makePrimary

public void makePrimary(java.lang.String path)
Make the indicated node a primary indirection.

Specified by:
makePrimary in interface AVMStore
Parameters:
path - The path to the node.

retargetLayeredDirectory

public void retargetLayeredDirectory(java.lang.String path,
                                     java.lang.String target)
Change the indirection of a layered directory.

Specified by:
retargetLayeredDirectory in interface AVMStore
Parameters:
path - The path to the layered directory.
target - The target indirection to set.

setName

public void setName(java.lang.String name)
Set the name of this AVMStore.

Specified by:
setName in interface AVMStore
Parameters:
name -

getName

public java.lang.String getName()
Get the name of this AVMStore.

Specified by:
getName in interface AVMStore
Returns:
The name.

getStoreAcl

public Acl getStoreAcl()
Description copied from interface: AVMStore
Get the Acl associated with this store.

Specified by:
getStoreAcl in interface AVMStore
Returns:

setStoreAcl

public void setStoreAcl(Acl acl)
Description copied from interface: AVMStore
Set the acl on this store.

Specified by:
setStoreAcl in interface AVMStore

setNextVersionID

public void setNextVersionID(int nextVersionID)
Set the next version id.

Parameters:
nextVersionID -

getNextVersionID

public int getNextVersionID()
Get the next version id.

Specified by:
getNextVersionID in interface AVMStore
Returns:
The next version id.

getLastVersionID

public int getLastVersionID()
This gets the last extant version id.

Specified by:
getLastVersionID in interface AVMStore

setRoot

public void setRoot(DirectoryNode root)
Set the root directory.

Parameters:
root -

getRoot

public DirectoryNode getRoot()
Get the root directory.

Specified by:
getRoot in interface AVMStore
Returns:
The root directory.

setVers

public void setVers(long vers)
Set the version (for concurrency control).

Parameters:
vers - The version for optimistic locks.

getVers

public long getVers()
Get the version (for concurrency control).

Returns:
The version for optimistic locks.

equals

public boolean equals(java.lang.Object obj)
Equals override.

Overrides:
equals in class java.lang.Object
Parameters:
obj -
Returns:
Equality.

hashCode

public int hashCode()
Get a hash code.

Overrides:
hashCode in class java.lang.Object
Returns:
The hash code.

purgeVersion

public void purgeVersion(int version)
Purge all nodes reachable only via this version and repository.

Specified by:
purgeVersion in interface AVMStore
Parameters:
version -

getDescriptor

public AVMStoreDescriptor getDescriptor()
Get the descriptor for this.

Specified by:
getDescriptor in interface AVMStore
Returns:
An AVMStoreDescriptor

setOpacity

public void setOpacity(java.lang.String path,
                       boolean opacity)
Set the opacity of a layered directory. An opaque directory hides what is pointed at by its indirection.

Specified by:
setOpacity in interface AVMStore
Parameters:
path - The path to the layered directory.
opacity - True is opaque; false is not.

setNodeProperty

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

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

setNodeProperties

public void setNodeProperties(java.lang.String path,
                              java.util.Map properties)
Set a collection of properties on a node.

Specified by:
setNodeProperties in interface AVMStore
Parameters:
path - The path to the node.
properties - The Map of QNames to PropertyValues.

getNodeProperty

public PropertyValue getNodeProperty(int version,
                                     java.lang.String path,
                                     org.alfresco.service.namespace.QName name)
Get a property by name.

Specified by:
getNodeProperty in interface AVMStore
Parameters:
version - The version to lookup.
path - The path to the node.
name - The name of the property.
Returns:
A PropertyValue or null if not found.

getNodeProperties

public java.util.Map getNodeProperties(int version,
                                       java.lang.String path)
Get all the properties associated with a node.

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

deleteNodeProperty

public void deleteNodeProperty(java.lang.String path,
                               org.alfresco.service.namespace.QName name)
Delete a single property from a node.

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

deleteNodeProperties

public void deleteNodeProperties(java.lang.String path)
Delete all properties from a node.

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

setProperty

public void setProperty(org.alfresco.service.namespace.QName name,
                        PropertyValue value)
Set a property on this store. Replaces if property already exists.

Specified by:
setProperty in interface AVMStore
Parameters:
name - The QName of the property.
value - The actual PropertyValue.

setProperties

public void setProperties(java.util.Map properties)
Set a group of properties on this store. Replaces any property that exists.

Specified by:
setProperties in interface AVMStore
Parameters:
properties - A Map of QNames to PropertyValues to set.

getProperty

public PropertyValue getProperty(org.alfresco.service.namespace.QName name)
Get a property by name.

Specified by:
getProperty in interface AVMStore
Parameters:
name - The QName of the property to fetch.
Returns:
The PropertyValue or null if non-existent.

getProperties

public java.util.Map getProperties()
Get all the properties associated with this store.

Specified by:
getProperties in interface AVMStore
Returns:
A Map of the properties.

deleteProperty

public void deleteProperty(org.alfresco.service.namespace.QName name)
Delete a property.

Specified by:
deleteProperty in interface AVMStore
Parameters:
name - The name of the property to delete.

getContentDataForRead

public org.alfresco.service.cmr.repository.ContentData getContentDataForRead(int version,
                                                                             java.lang.String path)
Get the ContentData on a file.

Specified by:
getContentDataForRead in interface AVMStore
Parameters:
version - The version to look under.
path - The path to the file.
Returns:
The ContentData corresponding to the file.

getContentDataForWrite

public org.alfresco.service.cmr.repository.ContentData getContentDataForWrite(java.lang.String path)
Get the ContentData on a file for writing.

Specified by:
getContentDataForWrite in interface AVMStore
Parameters:
path - The path to the file.
Returns:
The ContentData corresponding to the file.

setContentData

public void setContentData(java.lang.String path,
                           org.alfresco.service.cmr.repository.ContentData data)
Set the ContentData for a file.

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

setMetaDataFrom

public void setMetaDataFrom(java.lang.String path,
                            AVMNode from)
Set meta data, aspects, properties, acls, from another node.

Specified by:
setMetaDataFrom in interface AVMStore
Parameters:
path - The path to the node to set metadata on.
from - The node to get the metadata from.

addAspect

public void addAspect(java.lang.String path,
                      org.alfresco.service.namespace.QName aspectName)
Add an aspect to a node.

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

getAspects

public java.util.Set getAspects(int version,
                                java.lang.String path)
Get all aspects on a given node.

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

removeAspect

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

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

hasAspect

public boolean hasAspect(int version,
                         java.lang.String path,
                         org.alfresco.service.namespace.QName aspectName)
Does a given node have a given aspect.

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

setACL

public void setACL(java.lang.String path,
                   Acl acl)
Set the ACL on a node.

Specified by:
setACL in interface AVMStore
Parameters:
path - The path to the node.
acl - The ACL to set.

getACL

public Acl getACL(int version,
                  java.lang.String path)
Get the ACL on a node.

Specified by:
getACL in interface AVMStore
Parameters:
version - The version to look under.
path - The path to the node.
Returns:
The ACL.

link

public void link(java.lang.String parentPath,
                 java.lang.String name,
                 AVMNodeDescriptor toLink)
Link a node into a directory, directly.

Specified by:
link in interface AVMStore
Parameters:
parentPath - The path to the directory.
name - The name to give the parent.
toLink - The node to link.

updateLink

public void updateLink(java.lang.String parentPath,
                       java.lang.String name,
                       AVMNodeDescriptor toLink)
Update a link to a node in a directory, directly.

Specified by:
updateLink in interface AVMStore
Parameters:
parentPath - The path to the directory.
name - The name to give the parent.
toLink - The node to link.

revert

public void revert(java.lang.String path,
                   java.lang.String name,
                   AVMNodeDescriptor toRevertTo)
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 AVMStore
Parameters:
path - The path to the parent directory.
name - The name of the node to revert.
toRevertTo - The descriptor of the version to revert to.

setGuid

public void setGuid(java.lang.String path,
                    java.lang.String guid)
Description copied from interface: AVMStore
Set the GUID on a node.

Specified by:
setGuid in interface AVMStore

setEncoding

public void setEncoding(java.lang.String path,
                        java.lang.String encoding)
Description copied from interface: AVMStore
Set the encoding of a file.

Specified by:
setEncoding in interface AVMStore

setMimeType

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

Specified by:
setMimeType in interface AVMStore

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


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