Added getDirectoryListingDirect() and getDeleted() to AVMService

interface.  These return respectively those nodes directly
contained by a directory and the names of those nodes that
have been deleted in a directory.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3383 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Britt Park
2006-07-24 00:35:18 +00:00
parent 9e560d2d38
commit 55c4d49fbf
9 changed files with 300 additions and 2 deletions

View File

@@ -17,6 +17,8 @@
package org.alfresco.repo.avm;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.SortedMap;
@@ -90,7 +92,7 @@ class PlainDirectoryNodeImpl extends DirectoryNodeImpl implements PlainDirectory
@SuppressWarnings("unchecked")
public Map<String, AVMNode> getListing(Lookup lPath)
{
TreeMap<String, AVMNode> result = new TreeMap<String, AVMNode>();
Map<String, AVMNode> result = new HashMap<String, AVMNode>();
List<ChildEntry> children = AVMContext.fgInstance.fChildEntryDAO.getByParent(this);
for (ChildEntry child : children)
{
@@ -99,6 +101,16 @@ class PlainDirectoryNodeImpl extends DirectoryNodeImpl implements PlainDirectory
return result;
}
/**
* Get a listing of the nodes directly contained by a directory.
* @param lPath The Lookup to this directory.
* @return A Map of names to nodes.
*/
public Map<String, AVMNode> getListingDirect(Lookup lPath)
{
return getListing(lPath);
}
/**
* Get a listing of from a directory node descriptor.
* @param dir The directory node descriptor.
@@ -120,6 +132,15 @@ class PlainDirectoryNodeImpl extends DirectoryNodeImpl implements PlainDirectory
return result;
}
/**
* Get the names of nodes deleted in this directory.
* @return A List of names.
*/
public List<String> getDeletedNames()
{
return new ArrayList<String>();
}
/**
* Lookup a child by name.
* @param lPath The lookup path so far.