|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.alfresco.repo.avm.AVMRepository
public class AVMRepository
This or AVMStore are the implementors of the operations specified by AVMService.
| Constructor Summary | |
|---|---|
AVMRepository()
Create a new one. |
|
| Method Summary | |
|---|---|
void |
addAspect(java.lang.String path,
QName aspectName)
Add an aspect to an AVM Node. |
boolean |
can(AVMStore store,
AVMNode node,
java.lang.String permission)
Evaluate permission on a node. |
boolean |
can(java.lang.String storeName,
int version,
java.lang.String path,
java.lang.String permission)
|
void |
createAVMStore(java.lang.String name)
Create a new AVMStore. |
void |
createBranch(int version,
java.lang.String srcPath,
java.lang.String dstPath,
java.lang.String name)
Create a new branch. |
ContentWriter |
createContentWriter(java.lang.String path)
Get a ContentWriter to a file node. |
AVMNodeDescriptor |
createDirectory(AVMNodeDescriptor parent,
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. |
java.io.OutputStream |
createFile(java.lang.String path,
java.lang.String name)
Create a 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 File as content. |
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 storeName,
java.lang.String tag,
java.lang.String description)
Create a snapshot of a single AVMStore. |
void |
deleteNodeProperties(java.lang.String path)
Delete all properties on a node. |
void |
deleteNodeProperty(java.lang.String path,
QName name)
Delete a single property from a node. |
void |
deleteStoreProperty(java.lang.String store,
QName name)
Delete a property from a store. |
void |
flatten(java.lang.String path,
java.lang.String name)
Remove name without leaving behind a deleted node. |
AVMNodeDescriptor |
forceCopy(java.lang.String path)
Force a copy on write. |
DbAccessControlList |
getACL(int version,
java.lang.String path)
Get the ACL on a node. |
org.alfresco.util.Pair |
getAPath(AVMNodeDescriptor desc)
Get a single valid path for a node. |
java.util.Set |
getAspects(AVMNodeDescriptor desc)
|
java.util.Set |
getAspects(int version,
java.lang.String path)
Get all the aspects on an AVM node. |
AVMStoreDescriptor |
getAVMStore(java.lang.String name)
Get a descriptor for an AVMStore. |
AVMNodeDescriptor |
getAVMStoreRoot(int version,
java.lang.String name)
Get a descriptor for an AVMStore root. |
java.util.List |
getAVMStores()
Get descriptors of all AVMStores. |
java.util.List |
getAVMStoreVersions(java.lang.String name)
Get all version for a given AVMStore. |
java.util.List |
getAVMStoreVersions(java.lang.String name,
java.util.Date from,
java.util.Date to)
Get the set of versions between (inclusive) of the given dates. |
AVMNodeDescriptor |
getCommonAncestor(AVMNodeDescriptor left,
AVMNodeDescriptor right)
Get the common ancestor of two nodes if one exists. |
ContentData |
getContentDataForRead(AVMNodeDescriptor desc)
|
ContentData |
getContentDataForRead(int version,
java.lang.String path)
Get the ContentData for a file. |
ContentData |
getContentDataForWrite(java.lang.String path)
Get the ContentData for a file for writing. |
ContentReader |
getContentReader(int version,
java.lang.String path)
Get a content reader from a file node. |
java.util.List |
getDeleted(int version,
java.lang.String path)
Get the names of deleted nodes in a directory. |
java.util.List |
getHeadPaths(AVMNodeDescriptor desc)
Get all paths for a node reachable by HEAD. |
java.util.List |
getHistory(AVMNodeDescriptor desc,
int count)
Get the history chain for a node. |
java.lang.String |
getIndirectionPath(int version,
java.lang.String path)
Get the indirection path for a layered node. |
java.io.InputStream |
getInputStream(AVMNodeDescriptor desc)
|
java.io.InputStream |
getInputStream(int version,
java.lang.String path)
Get an input stream from a file. |
static AVMRepository |
GetInstance()
Get the single instance of AVMRepository. |
int |
getLatestSnapshotID(java.lang.String name)
Get the latest extant snapshotted version id. |
int |
getLatestVersionID(java.lang.String name)
Get the next version id for the given AVMStore. |
LayeringDescriptor |
getLayeringInfo(int version,
java.lang.String path)
Get information about layering of a path. |
java.util.SortedMap |
getListing(AVMNodeDescriptor dir,
boolean includeDeleted)
Get a directory listing from a directory node descriptor. |
java.util.SortedMap |
getListing(int version,
java.lang.String path,
boolean includeDeleted)
Get a listing of a directory. |
java.util.SortedMap |
getListingDirect(AVMNodeDescriptor dir,
boolean includeDeleted)
Get the list of nodes directly contained in 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.util.Map |
getNodeProperties(AVMNodeDescriptor desc)
|
java.util.Map |
getNodeProperties(int version,
java.lang.String path)
Get a Map of all the properties of a node. |
PropertyValue |
getNodeProperty(int version,
java.lang.String path,
QName name)
Get a property by name for a node. |
java.io.OutputStream |
getOutputStream(java.lang.String path)
Get an output stream to a file. |
java.util.List |
getPaths(AVMNodeDescriptor desc)
Get all the paths to a particular node. |
java.util.List |
getPathsInStoreHead(AVMNodeDescriptor desc,
java.lang.String store)
Get all paths in a particular store in the head version for a particular node. |
java.util.List |
getPathsInStoreVersion(AVMNodeDescriptor desc,
java.lang.String store,
int version)
|
DbAccessControlList |
getStoreAcl(java.lang.String storeName)
Get the ACL on a store. |
java.util.Map |
getStoreProperties(java.lang.String store)
Get all the properties for a store. |
PropertyValue |
getStoreProperty(java.lang.String store,
QName name)
Get a property from a store. |
java.util.List |
getVersionPaths(VersionRoot version,
AVMNode node)
Gets all the pass from to the given node starting from the give version root. |
boolean |
hasAspect(int version,
java.lang.String path,
QName aspectName)
Does a node have a particular aspect. |
long |
issueID()
Issue a node id. |
long |
issueLayerID()
Issue a new layer id. |
void |
link(AVMNodeDescriptor parent,
java.lang.String name,
AVMNodeDescriptor child)
This is the danger version of link. |
void |
link(java.lang.String parentPath,
java.lang.String name,
AVMNodeDescriptor toLink)
Link a node into a directory, directly. |
AVMNodeDescriptor |
lookup(AVMNodeDescriptor dir,
java.lang.String name,
boolean includeDeleted)
Lookup a descriptor from a directory descriptor. |
org.alfresco.repo.avm.Lookup |
lookup(int version,
java.lang.String path,
boolean includeDeleted)
Lookup a node. |
org.alfresco.repo.avm.Lookup |
lookupDirectory(int version,
java.lang.String path)
Lookup a directory specifically. |
void |
makePrimary(java.lang.String path)
Make a directory into a primary indirection. |
void |
purgeAVMStore(java.lang.String name)
Get rid of all content that lives only in the given AVMStore. |
void |
purgeVersion(java.lang.String name,
int version)
Remove all content specific to a AVMRepository and version. |
java.util.Map |
queryStorePropertyKey(java.lang.String store,
QName keyPattern)
Queries a given store for properties with keys that match a given pattern. |
java.util.Map |
queryStoresPropertyKeys(QName keyPattern)
Queries all AVM stores for properties with keys that match a given pattern. |
void |
remove(java.lang.String path,
java.lang.String name)
Remove a node and everything underneath it. |
void |
removeAspect(java.lang.String path,
QName aspectName)
Remove an aspect and all associated properties from a node. |
void |
rename(java.lang.String srcPath,
java.lang.String srcName,
java.lang.String dstPath,
java.lang.String dstName)
Rename a node. |
void |
renameStore(java.lang.String sourceName,
java.lang.String destName)
Rename a store. |
void |
retargetLayeredDirectory(java.lang.String path,
java.lang.String target)
Change what a layered directory points at. |
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,
DbAccessControlList acl)
Set the ACL on a node. |
void |
setAvmNodeDAO(AVMNodeDAO dao)
|
void |
setAvmStoreDAO(AVMStoreDAO dao)
|
void |
setAvmStorePropertyDAO(AVMStorePropertyDAO dao)
|
void |
setChildEntryDAO(ChildEntryDAO dao)
|
void |
setContentData(java.lang.String path,
ContentData data)
Set the ContentData on a file. |
void |
setContentStore(ContentStore store)
Set the ContentService. |
void |
setCreateStoreTxnListener(CreateStoreTxnListener listener)
|
void |
setCreateVersionTxnListener(CreateVersionTxnListener listener)
|
void |
setDictionaryService(DictionaryService service)
|
void |
setEncoding(java.lang.String path,
java.lang.String encoding)
Set the encoding on a node. |
void |
setGuid(java.lang.String path,
java.lang.String guid)
Set the GUID on a node. |
void |
setLayerIssuer(Issuer layerIssuer)
Set the layer issuer. |
void |
setLookupCache(LookupCache cache)
Set the Lookup Cache instance. |
void |
setMetaDataFrom(java.lang.String path,
AVMNodeDescriptor from)
|
void |
setMimeType(java.lang.String path,
java.lang.String mimeType)
Set the mime type on a node. |
void |
setNodeIssuer(Issuer nodeIssuer)
Set the node issuer. |
void |
setNodeProperties(java.lang.String path,
java.util.Map properties)
Set a collection of properties at once. |
void |
setNodeProperty(java.lang.String path,
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 |
setPermissionService(PermissionService service)
|
void |
setPurgeStoreTxnListener(PurgeStoreTxnListener listener)
|
void |
setPurgeVersionTxnListener(PurgeVersionTxnListener listener)
|
void |
setQnameDAO(QNameDAO qnameDAO)
|
void |
setStoreAcl(java.lang.String storeName,
DbAccessControlList acl)
Set the acl on a store. |
void |
setStoreProperties(java.lang.String store,
java.util.Map props)
Set a group of properties on a store. |
void |
setStoreProperty(java.lang.String store,
QName name,
PropertyValue value)
Set a property on a store. |
void |
setVersionLayeredNodeEntryDAO(VersionLayeredNodeEntryDAO dao)
|
void |
setVersionRootDAO(VersionRootDAO dao)
|
void |
uncover(java.lang.String dirPath,
java.lang.String name)
Uncover a deleted name in a layered directory. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AVMRepository()
| Method Detail |
|---|
public void setNodeIssuer(Issuer nodeIssuer)
nodeIssuer - The issuer.public void setLayerIssuer(Issuer layerIssuer)
layerIssuer - The issuer.public void setContentStore(ContentStore store)
public void setLookupCache(LookupCache cache)
cache - The instance to set.public void setCreateStoreTxnListener(CreateStoreTxnListener listener)
public void setPurgeStoreTxnListener(PurgeStoreTxnListener listener)
public void setCreateVersionTxnListener(CreateVersionTxnListener listener)
public void setPurgeVersionTxnListener(PurgeVersionTxnListener listener)
public void setQnameDAO(QNameDAO qnameDAO)
public void setAvmStoreDAO(AVMStoreDAO dao)
public void setAvmNodeDAO(AVMNodeDAO dao)
public void setVersionRootDAO(VersionRootDAO dao)
public void setVersionLayeredNodeEntryDAO(VersionLayeredNodeEntryDAO dao)
public void setAvmStorePropertyDAO(AVMStorePropertyDAO dao)
public void setChildEntryDAO(ChildEntryDAO dao)
public void setPermissionService(PermissionService service)
public void setDictionaryService(DictionaryService service)
public java.io.OutputStream createFile(java.lang.String path,
java.lang.String name)
path - The path to the containing directory.name - The name for the new file.
public void createFile(java.lang.String path,
java.lang.String name,
java.io.File data,
java.util.List aspects,
java.util.Map properties)
path - The path to the containing directory.name - The name to give the file.data - The file contents.
public void createDirectory(java.lang.String path,
java.lang.String name,
java.util.List aspects,
java.util.Map properties)
path - The path to the containing directory.name - The name to give the directory.
public AVMNodeDescriptor createDirectory(AVMNodeDescriptor parent,
java.lang.String name)
parent - The parent node.name - The name of the new directory.
public void createLayeredDirectory(java.lang.String srcPath,
java.lang.String dstPath,
java.lang.String name)
srcPath - The target indirection for the new layered directory.dstPath - The path to the containing directory.name - The name for the new directory.
public void createLayeredFile(java.lang.String srcPath,
java.lang.String dstPath,
java.lang.String name)
srcPath - The target indirection for the new layered file.dstPath - The path to the containing directory.name - The name of the new layered file.public void createAVMStore(java.lang.String name)
name - The name to give the new AVMStore.
public void createBranch(int version,
java.lang.String srcPath,
java.lang.String dstPath,
java.lang.String name)
version - The version to branch off.srcPath - The path to make a branch from.dstPath - The containing directory.name - The name of the new branch.public java.io.OutputStream getOutputStream(java.lang.String path)
path - The full path to the file.
public ContentReader getContentReader(int version,
java.lang.String path)
version - The version of the file.path - The path to the file.
public ContentWriter createContentWriter(java.lang.String path)
path - The path to the file.
public void rename(java.lang.String srcPath,
java.lang.String srcName,
java.lang.String dstPath,
java.lang.String dstName)
srcPath - Source containing directory.srcName - Source name.dstPath - Destination containing directory.dstName - Destination name.
public void uncover(java.lang.String dirPath,
java.lang.String name)
dirPath - The path to the layered directory.name - The name to uncover.
public java.util.Map createSnapshot(java.lang.String storeName,
java.lang.String tag,
java.lang.String description)
store - The name of the repository.tag - The short description.description - The thick description.
public void remove(java.lang.String path,
java.lang.String name)
path - The path to the containing directory.name - The name of the node to remove.public void purgeAVMStore(java.lang.String name)
name - The name of the AVMStore to purge.
public void purgeVersion(java.lang.String name,
int version)
name - The name of the AVMStore.version - The version to purge.
public java.io.InputStream getInputStream(int version,
java.lang.String path)
version - The version to look under.path - The path to the file.
public java.io.InputStream getInputStream(AVMNodeDescriptor desc)
public java.util.SortedMap getListing(int version,
java.lang.String path,
boolean includeDeleted)
version - The version to look under.path - The path to the directory.includeDeleted - Whether to see DeletedNodes.
public java.util.SortedMap getListingDirect(int version,
java.lang.String path,
boolean includeDeleted)
version - The version to look under.path - The path to the directory to list.
public java.util.SortedMap getListingDirect(AVMNodeDescriptor dir,
boolean includeDeleted)
dir - The descriptor to the directory node.includeDeleted - Whether to include deleted children.
public java.util.SortedMap getListing(AVMNodeDescriptor dir,
boolean includeDeleted)
dir - The directory node descriptor.
public java.util.List getDeleted(int version,
java.lang.String path)
version - The version to look under.path - The path to the directory.
public java.util.List getAVMStores()
public AVMStoreDescriptor getAVMStore(java.lang.String name)
name - The name to get.
public java.util.List getAVMStoreVersions(java.lang.String name)
name - The name of the AVMStore.
public java.util.List getAVMStoreVersions(java.lang.String name,
java.util.Date from,
java.util.Date to)
name - The name of the AVMRepository.from - The earliest date.to - The latest date.
public long issueID()
public long issueLayerID()
public java.lang.String getIndirectionPath(int version,
java.lang.String path)
version - The version to look under.path - The path to the node.
public int getLatestVersionID(java.lang.String name)
name - The name of the AVMStore.
public int getLatestSnapshotID(java.lang.String name)
name - The store name.
public AVMNodeDescriptor getAVMStoreRoot(int version,
java.lang.String name)
version - The version to get.name - The name of the AVMStore.
public org.alfresco.repo.avm.Lookup lookup(int version,
java.lang.String path,
boolean includeDeleted)
version - The version to look under.path - The path to lookup.includeDeleted - Whether to see DeletedNodes.
public AVMNodeDescriptor lookup(AVMNodeDescriptor dir,
java.lang.String name,
boolean includeDeleted)
dir - The directory descriptor.name - The name of the child to lookup.
public java.util.List getPaths(AVMNodeDescriptor desc)
desc - The node descriptor.
public org.alfresco.util.Pair getAPath(AVMNodeDescriptor desc)
desc - The node descriptor.
public java.util.List getHeadPaths(AVMNodeDescriptor desc)
desc - The node descriptor.
public java.util.List getVersionPaths(VersionRoot version,
AVMNode node)
version - The version root.node - The node to get the paths of.
public java.util.List getPathsInStoreHead(AVMNodeDescriptor desc,
java.lang.String store)
desc - The node descriptor.store - The name of the store.
public LayeringDescriptor getLayeringInfo(int version,
java.lang.String path)
version - The version to look under.path - The full avm path.
public org.alfresco.repo.avm.Lookup lookupDirectory(int version,
java.lang.String path)
version - The version to look under.path - The path to lookup.
public void makePrimary(java.lang.String path)
path - The full path.
public void retargetLayeredDirectory(java.lang.String path,
java.lang.String target)
path - The full path to the layered directory.target - The new target path.
public java.util.List getHistory(AVMNodeDescriptor desc,
int count)
desc - The node to get history of.count - The maximum number of ancestors to traverse. Negative means all.
public void setOpacity(java.lang.String path,
boolean opacity)
path - The path to the layered directory.opacity - True is opaque; false is not.
public void setNodeProperty(java.lang.String path,
QName name,
PropertyValue value)
path - The path to the node.name - The name of the property.value - The value of the property.
public void setNodeProperties(java.lang.String path,
java.util.Map properties)
path - The path to the node.properties - The Map of QNames to PropertyValues.
public PropertyValue getNodeProperty(int version,
java.lang.String path,
QName name)
version - The version to look under.path - The path to the node.name - The name of the property.
public java.util.Map getNodeProperties(int version,
java.lang.String path)
version - The version to look under.path - The path to the node.
public void deleteNodeProperty(java.lang.String path,
QName name)
path - The path to the node.name - The name of the property.public void deleteNodeProperties(java.lang.String path)
path - The path to the node.
public void setStoreProperty(java.lang.String store,
QName name,
PropertyValue value)
store - The AVMStore.name - The QName.value - The PropertyValue to set.
public void setStoreProperties(java.lang.String store,
java.util.Map props)
store - The AVMStore.props - The properties to set.
public PropertyValue getStoreProperty(java.lang.String store,
QName name)
store - The name of the store.name - The property
public java.util.Map queryStorePropertyKey(java.lang.String store,
QName keyPattern)
store - The name of the store.keyPattern - The sql 'like' pattern, inserted into a QName.
public java.util.Map queryStoresPropertyKeys(QName keyPattern)
keyPattern - The sql 'like' pattern, inserted into a QName.
public java.util.Map getStoreProperties(java.lang.String store)
store - The name of the Store.
public void deleteStoreProperty(java.lang.String store,
QName name)
store - The name of the store.name - The name of the property.
public AVMNodeDescriptor getCommonAncestor(AVMNodeDescriptor left,
AVMNodeDescriptor right)
left - The first node.right - The second node.
public ContentData getContentDataForRead(int version,
java.lang.String path)
version - The version to look under.path - The path to the file.
public ContentData getContentDataForWrite(java.lang.String path)
path - The path to the file.
public void setContentData(java.lang.String path,
ContentData data)
path - The path to the file.data - The content data to set.public static AVMRepository GetInstance()
public void setMetaDataFrom(java.lang.String path,
AVMNodeDescriptor from)
public void addAspect(java.lang.String path,
QName aspectName)
path - The path to the node.aspectName - The name of the aspect.
public java.util.Set getAspects(int version,
java.lang.String path)
version - The version to look under.path - The path to the node.
public void removeAspect(java.lang.String path,
QName aspectName)
path - The path to the node.aspectName - The name of the aspect.
public boolean hasAspect(int version,
java.lang.String path,
QName aspectName)
version - The version to look under.path - The path to the node.aspectName - The name of the aspect.
public void setACL(java.lang.String path,
DbAccessControlList acl)
path - The path to the node.acl - The ACL to set.
public DbAccessControlList getACL(int version,
java.lang.String path)
version - The version to look under.path - The path to the node.
public void link(java.lang.String parentPath,
java.lang.String name,
AVMNodeDescriptor toLink)
parentPath - The path to the parent.name - The name to give the node.toLink - The node to link.
public void link(AVMNodeDescriptor parent,
java.lang.String name,
AVMNodeDescriptor child)
parent - The parent directory.name - The name to give the child.child - The child to link in.
public void flatten(java.lang.String path,
java.lang.String name)
path - The path to the layered directory.name - The name of the child.public AVMNodeDescriptor forceCopy(java.lang.String path)
path - The path to force.
public void renameStore(java.lang.String sourceName,
java.lang.String destName)
sourceName - The original name.destName - The new name.
AVMNotFoundException
AVMExistsException
public void revert(java.lang.String path,
java.lang.String name,
AVMNodeDescriptor toRevertTo)
path - The path to the parent directory.name - The name of the node.toRevertTo - The descriptor of the version to revert to.
public void setGuid(java.lang.String path,
java.lang.String guid)
path - guid -
public void setEncoding(java.lang.String path,
java.lang.String encoding)
path - encoding -
public void setMimeType(java.lang.String path,
java.lang.String mimeType)
path - encoding -
public java.util.List getPathsInStoreVersion(AVMNodeDescriptor desc,
java.lang.String store,
int version)
public java.util.Map getNodeProperties(AVMNodeDescriptor desc)
public ContentData getContentDataForRead(AVMNodeDescriptor desc)
public java.util.Set getAspects(AVMNodeDescriptor desc)
public boolean can(AVMStore store,
AVMNode node,
java.lang.String permission)
store - node - permission -
public boolean can(java.lang.String storeName,
int version,
java.lang.String path,
java.lang.String permission)
public void setStoreAcl(java.lang.String storeName,
DbAccessControlList acl)
storeName - acl - public DbAccessControlList getStoreAcl(java.lang.String storeName)
storeName -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||