|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.alfresco.repo.avm.AVMNodeImpl
org.alfresco.repo.avm.DirectoryNodeImpl
org.alfresco.repo.avm.LayeredDirectoryNodeImpl
public class LayeredDirectoryNodeImpl
A layered directory node. A layered directory node points at an underlying directory, which may or may not exist. The visible contents of a layered directory node is the contents of the underlying node pointed at plus those nodes added to or modified in the layered directory node minus those nodes which have been deleted in the layered directory node.
Field Summary |
---|
Fields inherited from class org.alfresco.repo.avm.AVMNodeImpl |
---|
DEBUG |
Constructor Summary | |
---|---|
LayeredDirectoryNodeImpl()
Default constructor. |
|
LayeredDirectoryNodeImpl(DirectoryNode dir,
AVMStore store,
org.alfresco.repo.avm.Lookup srcLookup,
java.lang.String name,
java.lang.Long inheritedAcl,
ACLCopyMode mode)
Create a new layered directory based on a directory we are being named from that is in not in the layer of the source lookup. |
|
LayeredDirectoryNodeImpl(LayeredDirectoryNode other,
AVMStore repos,
org.alfresco.repo.avm.Lookup lookup,
boolean copyAll,
java.lang.Long parentAcl,
ACLCopyMode mode)
Kind of copy constructor, sort of. |
|
LayeredDirectoryNodeImpl(PlainDirectoryNode other,
AVMStore store,
org.alfresco.repo.avm.Lookup lPath,
boolean copyContents,
java.lang.Long parentAcl,
ACLCopyMode mode)
Construct one from a PlainDirectoryNode. |
|
LayeredDirectoryNodeImpl(java.lang.String indirection,
AVMStore store,
AVMNode toCopy,
java.lang.Long parentAcl,
ACLCopyMode mode)
Make a new one from a specified indirection path. |
Method Summary | |
---|---|
AVMNode |
copy(org.alfresco.repo.avm.Lookup lPath)
Copy on write logic. |
void |
flatten(java.lang.String name)
Remove name without leaving behind a deleted node. |
java.util.List |
getDeletedNames()
Get the names of nodes deleted in this directory. |
AVMNodeDescriptor |
getDescriptor(org.alfresco.repo.avm.Lookup lPath)
Get the descriptor for this node. |
AVMNodeDescriptor |
getDescriptor(org.alfresco.repo.avm.Lookup lPath,
java.lang.String name)
Get the descriptor for this node. |
AVMNodeDescriptor |
getDescriptor(java.lang.String parentPath,
java.lang.String name,
java.lang.String parentIndirection,
int parentIndirectionVersion)
Get a descriptor for this. |
java.lang.String |
getIndirection()
Get the indirection path. |
java.lang.Integer |
getIndirectionVersion()
Get the indirection version. |
long |
getLayerID()
Get the layer id. |
java.util.SortedMap |
getListing(AVMNodeDescriptor dir,
boolean includeDeleted)
Get a listing from a directory node descriptor. |
java.util.SortedMap |
getListing(AVMNodeDescriptor dir,
java.lang.String childNamePattern,
boolean includeDeleted)
Get a listing from a directory node descriptor. |
java.util.Map |
getListing(org.alfresco.repo.avm.Lookup lPath,
boolean includeDeleted)
Get a listing of the virtual contents of this directory. |
java.util.Map |
getListing(org.alfresco.repo.avm.Lookup lPath,
java.lang.String childNamePattern,
boolean includeDeleted)
Get a listing of the virtual contents of this directory. |
java.util.SortedMap |
getListingDirect(AVMNodeDescriptor dir,
boolean includeDeleted)
Get the direct contents of this directory. |
java.util.Map |
getListingDirect(org.alfresco.repo.avm.Lookup lPath,
boolean includeDeleted)
Get a listing of the nodes directly contained by a directory. |
boolean |
getOpacity()
Get the opacity of this. |
boolean |
getPrimaryIndirection()
Is this a primary indirection node. |
int |
getType()
Get the type of this node. |
java.lang.String |
getUnderlying(org.alfresco.repo.avm.Lookup lPath)
Get the underlying path in the Lookup's context. |
int |
getUnderlyingVersion(org.alfresco.repo.avm.Lookup lPath)
Get the underlying version in the lookup path context. |
void |
link(org.alfresco.repo.avm.Lookup lPath,
java.lang.String name,
AVMNodeDescriptor toLink)
Link a node with the given id into this directory. |
AVMNodeDescriptor |
lookupChild(AVMNodeDescriptor mine,
java.lang.String name,
boolean includeDeleted)
Lookup a child using a node descriptor as context. |
org.alfresco.util.Pair |
lookupChildEntry(org.alfresco.repo.avm.Lookup lPath,
java.lang.String name,
boolean includeDeleted)
Lookup a child entry by name. |
void |
putChild(java.lang.String name,
AVMNode node)
Insert a child node without COW. |
void |
rawSetPrimary(org.alfresco.repo.avm.Lookup lPath,
java.lang.String path)
Set the primary indirection. |
void |
removeChild(org.alfresco.repo.avm.Lookup lPath,
java.lang.String name)
Directly remove a child. |
void |
retarget(org.alfresco.repo.avm.Lookup lPath,
java.lang.String target)
Make this point at a new target. |
void |
setAclAndInherit(LayeredDirectoryNode layeredDirectory,
DbAccessControlList acl,
java.lang.String name)
|
void |
setIndirection(java.lang.String indirection)
Set the indirection. |
void |
setIndirectionVersion(java.lang.Integer version)
Set the indirection version for this layered node. |
void |
setIsRoot(boolean isRoot)
Does nothing because LayeredDirectoryNodes can't be roots. |
void |
setLayerID(long id)
Set the layer id. |
void |
setOpacity(boolean opacity)
Set the opacity of this, ie, whether it blocks things normally seen through its indirection. |
void |
setPrimaryIndirection(boolean has)
Set the primary indirection state of this. |
java.lang.String |
toString(org.alfresco.repo.avm.Lookup lPath)
For diagnostics. |
void |
turnPrimary(org.alfresco.repo.avm.Lookup lPath)
Make this node become a primary indirection. |
void |
uncover(org.alfresco.repo.avm.Lookup lPath,
java.lang.String name)
Let anything behind name in this become visible. |
Methods inherited from class org.alfresco.repo.avm.DirectoryNodeImpl |
---|
directlyContains, link, lookupChild |
Methods inherited from class org.alfresco.repo.avm.AVMNodeImpl |
---|
addAspect, addProperties, changeAncestor, checkReadOnly, copyACLs, copyAspects, copyCreationAndOwnerBasicAttributes, copyMetaDataFrom, copyProperties, deleteProperties, deleteProperty, equals, getAcl, getAncestor, getAspects, getBasicAttributes, getGuid, getId, getIsNew, getIsRoot, getMergedFrom, getProperties, getProperty, getStoreNew, getVers, getVersionID, hashCode, removeAspect, setAcl, setAncestor, setAspects, setBasicAttributes, setGuid, setId, setMergedFrom, setProperties, setProperty, setStoreNew, setVers, setVersionID, toString, updateModTime |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.alfresco.repo.avm.DirectoryNode |
---|
directlyContains, link, lookupChild |
Methods inherited from interface org.alfresco.repo.avm.AVMNode |
---|
addAspect, addProperties, changeAncestor, copyMetaDataFrom, deleteProperties, deleteProperty, getAcl, getAncestor, getAspects, getBasicAttributes, getGuid, getId, getIsNew, getIsRoot, getMergedFrom, getProperties, getProperty, getStoreNew, getVersionID, removeAspect, setAcl, setAncestor, setGuid, setMergedFrom, setProperties, setProperty, setStoreNew, setVersionID, updateModTime |
Methods inherited from interface org.alfresco.repo.avm.AVMNode |
---|
addAspect, addProperties, changeAncestor, copyMetaDataFrom, deleteProperties, deleteProperty, getAcl, getAncestor, getAspects, getBasicAttributes, getGuid, getId, getIsNew, getIsRoot, getMergedFrom, getProperties, getProperty, getStoreNew, getVersionID, removeAspect, setAcl, setAncestor, setGuid, setMergedFrom, setProperties, setProperty, setStoreNew, setVersionID, updateModTime |
Constructor Detail |
---|
public LayeredDirectoryNodeImpl()
public LayeredDirectoryNodeImpl(java.lang.String indirection, AVMStore store, AVMNode toCopy, java.lang.Long parentAcl, ACLCopyMode mode)
indirection
- The indirection path to set.store
- The store that owns this node.public LayeredDirectoryNodeImpl(LayeredDirectoryNode other, AVMStore repos, org.alfresco.repo.avm.Lookup lookup, boolean copyAll, java.lang.Long parentAcl, ACLCopyMode mode)
other
- The LayeredDirectoryNode we are copied from.repos
- The AVMStore object we use.public LayeredDirectoryNodeImpl(PlainDirectoryNode other, AVMStore store, org.alfresco.repo.avm.Lookup lPath, boolean copyContents, java.lang.Long parentAcl, ACLCopyMode mode)
other
- The PlainDirectoryNode.store
- The AVMStore we should belong to.lPath
- The Lookup object.public LayeredDirectoryNodeImpl(DirectoryNode dir, AVMStore store, org.alfresco.repo.avm.Lookup srcLookup, java.lang.String name, java.lang.Long inheritedAcl, ACLCopyMode mode)
dir
- The directorystore
- The storesrcLookup
- The source lookup.name
- The name of the target.Method Detail |
---|
public boolean getPrimaryIndirection()
getPrimaryIndirection
in interface LayeredDirectoryNode
public void setPrimaryIndirection(boolean has)
setPrimaryIndirection
in interface LayeredDirectoryNode
has
- Whether this is a primary indirection node.public java.lang.String getIndirection()
getIndirection
in interface Layered
public java.lang.String getUnderlying(org.alfresco.repo.avm.Lookup lPath)
getUnderlying
in interface Layered
lPath
- The Lookup.
public int getUnderlyingVersion(org.alfresco.repo.avm.Lookup lPath)
getUnderlyingVersion
in interface Layered
lPath
- The Lookup.
public long getLayerID()
getLayerID
in interface LayeredDirectoryNode
public void setLayerID(long id)
setLayerID
in interface LayeredDirectoryNode
id
- The id to set.public AVMNode copy(org.alfresco.repo.avm.Lookup lPath)
copy
in interface AVMNode
lPath
-
public void putChild(java.lang.String name, AVMNode node)
putChild
in interface DirectoryNode
name
- The name to give the child.node
- The child.public java.util.Map getListing(org.alfresco.repo.avm.Lookup lPath, boolean includeDeleted)
getListing
in interface DirectoryNode
lPath
- The Lookup.
public java.util.Map getListing(org.alfresco.repo.avm.Lookup lPath, java.lang.String childNamePattern, boolean includeDeleted)
getListing
in interface DirectoryNode
lPath
- The Lookup.
public java.util.Map getListingDirect(org.alfresco.repo.avm.Lookup lPath, boolean includeDeleted)
getListingDirect
in interface DirectoryNode
lPath
- The Lookup to this directory.
public java.util.SortedMap getListingDirect(AVMNodeDescriptor dir, boolean includeDeleted)
getListingDirect
in interface DirectoryNode
dir
- The descriptor that describes us.includeDeleted
- Whether to inlude deleted nodes.
public java.util.SortedMap getListing(AVMNodeDescriptor dir, boolean includeDeleted)
getListing
in interface DirectoryNode
dir
- The directory node descriptor.includeDeleted
- Should DeletedNodes be shown.
public java.util.SortedMap getListing(AVMNodeDescriptor dir, java.lang.String childNamePattern, boolean includeDeleted)
getListing
in interface DirectoryNode
dir
- The directory node descriptor.childNamePattern
- Pattern to match for child names - may be nullincludeDeleted
- Should DeletedNodes be shown.
public java.util.List getDeletedNames()
getDeletedNames
in interface DirectoryNode
public org.alfresco.util.Pair lookupChildEntry(org.alfresco.repo.avm.Lookup lPath, java.lang.String name, boolean includeDeleted)
lookupChildEntry
in interface DirectoryNode
lPath
- The Lookup.name
- The name we are looking.version
- The version in which we are looking.write
- Whether this lookup is occurring in a write context.
public AVMNodeDescriptor lookupChild(AVMNodeDescriptor mine, java.lang.String name, boolean includeDeleted)
lookupChild
in interface DirectoryNode
mine
- The node descriptor for this,name
- The name to lookup,
public void removeChild(org.alfresco.repo.avm.Lookup lPath, java.lang.String name)
removeChild
in interface DirectoryNode
lPath
- The lookup that arrived at this.name
- The name of the child to remove.public int getType()
getType
in interface AVMNode
public java.lang.String toString(org.alfresco.repo.avm.Lookup lPath)
toString
in interface AVMNode
lPath
- The Lookup.
public void rawSetPrimary(org.alfresco.repo.avm.Lookup lPath, java.lang.String path)
rawSetPrimary
in interface LayeredDirectoryNode
path
- The indirection path.public void setAclAndInherit(LayeredDirectoryNode layeredDirectory, DbAccessControlList acl, java.lang.String name)
setAclAndInherit
in interface LayeredDirectoryNode
public void turnPrimary(org.alfresco.repo.avm.Lookup lPath)
turnPrimary
in interface DirectoryNode
turnPrimary
in interface LayeredDirectoryNode
lPath
- The Lookup.public void retarget(org.alfresco.repo.avm.Lookup lPath, java.lang.String target)
retarget
in interface DirectoryNode
retarget
in interface LayeredDirectoryNode
lPath
- The Lookup.target
- The target path.public void uncover(org.alfresco.repo.avm.Lookup lPath, java.lang.String name)
uncover
in interface LayeredDirectoryNode
lPath
- The Lookup.name
- The name to uncover.public AVMNodeDescriptor getDescriptor(org.alfresco.repo.avm.Lookup lPath, java.lang.String name)
getDescriptor
in interface AVMNode
lPath
- The Lookup.name
- The name of this in the current context.
public AVMNodeDescriptor getDescriptor(org.alfresco.repo.avm.Lookup lPath)
getDescriptor
in interface AVMNode
lPath
- The Lookup.
public AVMNodeDescriptor getDescriptor(java.lang.String parentPath, java.lang.String name, java.lang.String parentIndirection, int parentIndirectionVersion)
getDescriptor
in interface AVMNode
parentPath
- The parent path.name
- The name this was looked up with.parentIndirection
- The indirection of the parent.parentIndirectionVersion
- The indirection version of the parent.
public void setIndirection(java.lang.String indirection)
setIndirection
in interface LayeredDirectoryNode
indirection
- public void setIsRoot(boolean isRoot)
setIsRoot
in interface AVMNode
setIsRoot
in interface DirectoryNode
setIsRoot
in class AVMNodeImpl
isRoot
- public boolean getOpacity()
getOpacity
in interface LayeredDirectoryNode
public void setOpacity(boolean opacity)
setOpacity
in interface LayeredDirectoryNode
opacity
- public void link(org.alfresco.repo.avm.Lookup lPath, java.lang.String name, AVMNodeDescriptor toLink)
link
in interface DirectoryNode
lPath
- The Lookup for this.name
- The name to give the node.toLink
- The node to link in.public void flatten(java.lang.String name)
flatten
in interface LayeredDirectoryNode
name
- The name of the child to flatten.public void setIndirectionVersion(java.lang.Integer version)
Layered
setIndirectionVersion
in interface Layered
version
- The indirection version to set.public java.lang.Integer getIndirectionVersion()
getIndirectionVersion
in interface LayeredDirectoryNode
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |