org.alfresco.repo.avm
Interface DirectoryNode

All Superinterfaces:
AVMNode
All Known Subinterfaces:
LayeredDirectoryNode, PlainDirectoryNode
All Known Implementing Classes:
DirectoryNodeImpl, LayeredDirectoryNodeImpl, PlainDirectoryNodeImpl

public interface DirectoryNode
extends AVMNode

The interface for Directory Nodes.


Method Summary
 boolean directlyContains(AVMNode node)
          Does this directory directly contain the specified node.
 java.util.List getDeletedNames()
          Get the names of nodes deleted in this directory.
 java.util.SortedMap getListing(AVMNodeDescriptor dir, boolean includeDeleted)
          Get a listing from a directory specified by an AVMNodeDescriptor.
 java.util.SortedMap getListing(AVMNodeDescriptor dir, java.lang.String childNamePattern, boolean includeDeleted)
          Get a listing from a directory specified by an AVMNodeDescriptor.
 java.util.Map getListing(org.alfresco.repo.avm.Lookup lPath, boolean includeDeleted)
          Get a directory listing.
 java.util.Map getListing(org.alfresco.repo.avm.Lookup lPath, java.lang.String childNamePattern, boolean includeDeleted)
          Get a directory listing.
 java.util.SortedMap getListingDirect(AVMNodeDescriptor dir, boolean includeDeleted)
          Get a listing of nodes directly contained by a directory.
 java.util.Map getListingDirect(org.alfresco.repo.avm.Lookup lPath, boolean includeDeleted)
          Get a listing of the nodes directly contained by a directory.
 void link(org.alfresco.repo.avm.Lookup lPath, java.lang.String name, AVMNodeDescriptor toLink)
          Link a node with the given id into this directory.
 void link(java.lang.String name, AVMNodeDescriptor toLink)
          Dangerous version of link that assumes that a child node of the given name does not already exist.
 AVMNodeDescriptor lookupChild(AVMNodeDescriptor mine, java.lang.String name, boolean includeDeleted)
          Lookup a child node using an AVMNodeDescriptor as context.
 org.alfresco.util.Pair lookupChild(org.alfresco.repo.avm.Lookup lPath, java.lang.String name, boolean includeDeleted)
          Lookup a child node.
 org.alfresco.util.Pair lookupChildEntry(org.alfresco.repo.avm.Lookup lPath, java.lang.String name, boolean includeDeleted)
          Lookup a child entry.
 void putChild(java.lang.String name, AVMNode node)
          Put child into this directory directly.
 void removeChild(org.alfresco.repo.avm.Lookup lPath, java.lang.String name)
          Remove a child directly.
 void retarget(org.alfresco.repo.avm.Lookup lPath, java.lang.String target)
          Retarget a layered directory.
 void setIsRoot(boolean isRoot)
          Set whether this node is a root node.
 void turnPrimary(org.alfresco.repo.avm.Lookup lPath)
          Set the directory, which must be in a layer, into a primary indirection taking its indirection from the Lookup.
 
Methods inherited from interface org.alfresco.repo.avm.AVMNode
addAspect, addProperties, changeAncestor, copy, copyACLs, copyACLs, copyMetaDataFrom, deleteProperties, deleteProperty, getAcl, getAncestor, getAspects, getBasicAttributes, getDescriptor, getDescriptor, getDescriptor, getGuid, getId, getIsNew, getIsRoot, getMergedFrom, getProperties, getProperty, getStoreNew, getType, getVersionID, removeAspect, setAcl, setAncestor, setGuid, setMergedFrom, setProperties, setProperty, setStoreNew, setVersionID, toString, updateModTime
 

Method Detail

directlyContains

boolean directlyContains(AVMNode node)
Does this directory directly contain the specified node.

Parameters:
node - The node to check.
Returns:
Whether it does.

putChild

void putChild(java.lang.String name,
              AVMNode node)
Put child into this directory directly. No copy on write.

Parameters:
name - The name to give it.
node - The child.

lookupChild

org.alfresco.util.Pair lookupChild(org.alfresco.repo.avm.Lookup lPath,
                                   java.lang.String name,
                                   boolean includeDeleted)
Lookup a child node.

Parameters:
lPath - The Lookup so far.
name - The name of the child to lookup.
includeDeleted - Include deleted nodes or not.

lookupChildEntry

org.alfresco.util.Pair lookupChildEntry(org.alfresco.repo.avm.Lookup lPath,
                                        java.lang.String name,
                                        boolean includeDeleted)
Lookup a child entry.

Parameters:
lPath - The Lookup so far.
name - The name of the child to lookup.
includeDeleted - Include deleted nodes or not.

lookupChild

AVMNodeDescriptor lookupChild(AVMNodeDescriptor mine,
                              java.lang.String name,
                              boolean includeDeleted)
Lookup a child node using an AVMNodeDescriptor as context.

Parameters:
mine - The node descriptor for this.
name - The name of the child to lookup.
Returns:
The descriptor for the looked up child.

removeChild

void removeChild(org.alfresco.repo.avm.Lookup lPath,
                 java.lang.String name)
Remove a child directly. No copy is possible.

Parameters:
lPath - The lookup through which this node was reached.
name - The name of the child to remove.

getListing

java.util.Map getListing(org.alfresco.repo.avm.Lookup lPath,
                         boolean includeDeleted)
Get a directory listing.

Parameters:
lPath - The lookup context.
Returns:
A SortedMap of names to DirectoryEntries.

getListing

java.util.Map getListing(org.alfresco.repo.avm.Lookup lPath,
                         java.lang.String childNamePattern,
                         boolean includeDeleted)
Get a directory listing.

Parameters:
lPath - The lookup context.
Returns:
A SortedMap of names to DirectoryEntries.

getListingDirect

java.util.Map getListingDirect(org.alfresco.repo.avm.Lookup lPath,
                               boolean includeDeleted)
Get a listing of the nodes directly contained by a directory.

Parameters:
lPath - The Lookup to this directory.
Returns:
A Map of names to nodes.

getListingDirect

java.util.SortedMap getListingDirect(AVMNodeDescriptor dir,
                                     boolean includeDeleted)
Get a listing of nodes directly contained by a directory.

Parameters:
dir - The descriptor for the directory.
includeDeleted - Whether to include deleted nodes.
Returns:
A Map of Strings to descriptors.

getListing

java.util.SortedMap getListing(AVMNodeDescriptor dir,
                               boolean includeDeleted)
Get a listing from a directory specified by an AVMNodeDescriptor.

Parameters:
dir - The directory to list.
Returns:
A Map of names to node descriptors

getListing

java.util.SortedMap getListing(AVMNodeDescriptor dir,
                               java.lang.String childNamePattern,
                               boolean includeDeleted)
Get a listing from a directory specified by an AVMNodeDescriptor.

Parameters:
dir - The directory to list.
childNamePattern - - child name pattern to match
includeDeleted - = include deleted children
Returns:
A Map of names to node descriptors

getDeletedNames

java.util.List getDeletedNames()
Get the names of nodes deleted in this directory.

Returns:
A List of names.

turnPrimary

void turnPrimary(org.alfresco.repo.avm.Lookup lPath)
Set the directory, which must be in a layer, into a primary indirection taking its indirection from the Lookup.

Parameters:
lPath - The Lookup.

retarget

void retarget(org.alfresco.repo.avm.Lookup lPath,
              java.lang.String target)
Retarget a layered directory.

Parameters:
lPath - The Lookup.
target - The target path.

setIsRoot

void setIsRoot(boolean isRoot)
Set whether this node is a root node.

Specified by:
setIsRoot in interface AVMNode
Parameters:
isRoot -

link

void link(org.alfresco.repo.avm.Lookup lPath,
          java.lang.String name,
          AVMNodeDescriptor toLink)
Link a node with the given id into this directory.

Parameters:
lPath - The Lookup for this node.
name - The name to give the node.
toLink - The node to link in.

link

void link(java.lang.String name,
          AVMNodeDescriptor toLink)
Dangerous version of link that assumes that a child node of the given name does not already exist.

Parameters:
name - The name to give the child.
toLink - The child to link in.


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