mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Purged two vestigial arguments from DirectoryNode.lookupChild() interface.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3981 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -369,7 +369,7 @@ public class AVMRepository
|
||||
throw new AVMNotFoundException("Path not found.");
|
||||
}
|
||||
DirectoryNode srcDir = (DirectoryNode)sPath.getCurrentNode();
|
||||
AVMNode srcNode = srcDir.lookupChild(sPath, srcName, -1, true, false);
|
||||
AVMNode srcNode = srcDir.lookupChild(sPath, srcName, false);
|
||||
if (srcNode == null)
|
||||
{
|
||||
throw new AVMNotFoundException("Not found: " + srcName);
|
||||
@@ -387,7 +387,7 @@ public class AVMRepository
|
||||
throw new AVMNotFoundException("Path not found.");
|
||||
}
|
||||
DirectoryNode dstDir = (DirectoryNode)dPath.getCurrentNode();
|
||||
AVMNode dstNode = dstDir.lookupChild(dPath, dstName, -1, true, false);
|
||||
AVMNode dstNode = dstDir.lookupChild(dPath, dstName, false);
|
||||
if (dstNode != null)
|
||||
{
|
||||
throw new AVMExistsException("Node exists: " + dstName);
|
||||
|
@@ -186,7 +186,7 @@ public class AVMStoreImpl implements AVMStore, Serializable
|
||||
throw new AVMNotFoundException("Path not found.");
|
||||
}
|
||||
DirectoryNode dir = (DirectoryNode)lPath.getCurrentNode();
|
||||
if (dir.lookupChild(lPath, name, -1, true, false) != null)
|
||||
if (dir.lookupChild(lPath, name, false) != null)
|
||||
{
|
||||
throw new AVMExistsException("Child exists: " + name);
|
||||
}
|
||||
@@ -223,7 +223,7 @@ public class AVMStoreImpl implements AVMStore, Serializable
|
||||
throw new AVMNotFoundException("Path not found.");
|
||||
}
|
||||
DirectoryNode dir = (DirectoryNode)lPath.getCurrentNode();
|
||||
if (dir.lookupChild(lPath, name, -1, true, false) != null)
|
||||
if (dir.lookupChild(lPath, name, false) != null)
|
||||
{
|
||||
throw new AVMExistsException("Child exists: " + name);
|
||||
}
|
||||
@@ -261,7 +261,7 @@ public class AVMStoreImpl implements AVMStore, Serializable
|
||||
throw new AVMNotFoundException("Path not found.");
|
||||
}
|
||||
DirectoryNode dir = (DirectoryNode)lPath.getCurrentNode();
|
||||
if (dir.lookupChild(lPath, name, -1, true, false) != null)
|
||||
if (dir.lookupChild(lPath, name, false) != null)
|
||||
{
|
||||
throw new AVMExistsException("Child exists: " + name);
|
||||
}
|
||||
@@ -291,7 +291,7 @@ public class AVMStoreImpl implements AVMStore, Serializable
|
||||
throw new AVMNotFoundException("Path not found.");
|
||||
}
|
||||
DirectoryNode dir = (DirectoryNode)lPath.getCurrentNode();
|
||||
if (dir.lookupChild(lPath, name, -1, true, false) != null)
|
||||
if (dir.lookupChild(lPath, name, false) != null)
|
||||
{
|
||||
throw new AVMExistsException("Child exists: " + name);
|
||||
}
|
||||
@@ -321,7 +321,7 @@ public class AVMStoreImpl implements AVMStore, Serializable
|
||||
throw new AVMNotFoundException("Path not found.");
|
||||
}
|
||||
DirectoryNode dir = (DirectoryNode)lPath.getCurrentNode();
|
||||
if (dir.lookupChild(lPath, name, -1, true, false) != null)
|
||||
if (dir.lookupChild(lPath, name, false) != null)
|
||||
{
|
||||
throw new AVMExistsException("Child exists: " + name);
|
||||
}
|
||||
@@ -479,7 +479,7 @@ public class AVMStoreImpl implements AVMStore, Serializable
|
||||
throw new AVMNotFoundException("Path not found.");
|
||||
}
|
||||
DirectoryNode dir = (DirectoryNode)lPath.getCurrentNode();
|
||||
if (dir.lookupChild(lPath, name, -1, true, false) == null)
|
||||
if (dir.lookupChild(lPath, name, false) == null)
|
||||
{
|
||||
throw new AVMNotFoundException("Does not exist: " + name);
|
||||
}
|
||||
@@ -612,7 +612,7 @@ public class AVMStoreImpl implements AVMStore, Serializable
|
||||
// before the end.
|
||||
for (int i = 0; i < pathElements.length - 1; i++)
|
||||
{
|
||||
AVMNode child = dir.lookupChild(result, pathElements[i], version, write, includeDeleted);
|
||||
AVMNode child = dir.lookupChild(result, pathElements[i], includeDeleted);
|
||||
if (child == null)
|
||||
{
|
||||
return null;
|
||||
@@ -627,7 +627,7 @@ public class AVMStoreImpl implements AVMStore, Serializable
|
||||
dir = (DirectoryNode)result.getCurrentNode();
|
||||
}
|
||||
// Now look up the last element.
|
||||
AVMNode child = dir.lookupChild(result, pathElements[pathElements.length - 1], version, write,
|
||||
AVMNode child = dir.lookupChild(result, pathElements[pathElements.length - 1],
|
||||
includeDeleted);
|
||||
if (child == null)
|
||||
{
|
||||
|
@@ -46,11 +46,9 @@ public interface DirectoryNode extends AVMNode
|
||||
* Lookup a child node.
|
||||
* @param lPath The Lookup so far.
|
||||
* @param name The name of the child to lookup.
|
||||
* @param version The version to look under.
|
||||
* @param write Whether this is occuring in a write context.
|
||||
* @param includeDeleted Include deleted nodes or not.
|
||||
*/
|
||||
public AVMNode lookupChild(Lookup lPath, String name, int version, boolean write,
|
||||
boolean includeDeleted);
|
||||
public AVMNode lookupChild(Lookup lPath, String name, boolean includeDeleted);
|
||||
|
||||
/**
|
||||
* Lookup a child node using an AVMNodeDescriptor as context.
|
||||
|
@@ -465,8 +465,7 @@ class LayeredDirectoryNodeImpl extends DirectoryNodeImpl implements LayeredDirec
|
||||
* @return The child or null if not found.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public AVMNode lookupChild(Lookup lPath, String name, int version, boolean write,
|
||||
boolean includeDeleted)
|
||||
public AVMNode lookupChild(Lookup lPath, String name, boolean includeDeleted)
|
||||
{
|
||||
ChildEntry entry = AVMDAOs.Instance().fChildEntryDAO.getByNameParent(name, this);
|
||||
if (entry != null)
|
||||
@@ -487,7 +486,7 @@ class LayeredDirectoryNodeImpl extends DirectoryNodeImpl implements LayeredDirec
|
||||
if (lookup != null)
|
||||
{
|
||||
DirectoryNode dir = (DirectoryNode)lookup.getCurrentNode();
|
||||
AVMNode retVal = dir.lookupChild(lookup, name, -1, false, includeDeleted);
|
||||
AVMNode retVal = dir.lookupChild(lookup, name, includeDeleted);
|
||||
lPath.setFinalStore(lookup.getFinalStore());
|
||||
return retVal;
|
||||
}
|
||||
@@ -529,7 +528,7 @@ class LayeredDirectoryNodeImpl extends DirectoryNodeImpl implements LayeredDirec
|
||||
if (lookup != null)
|
||||
{
|
||||
DirectoryNode dir = (DirectoryNode)lookup.getCurrentNode();
|
||||
AVMNode child = dir.lookupChild(lookup, name, -1, false, includeDeleted);
|
||||
AVMNode child = dir.lookupChild(lookup, name, includeDeleted);
|
||||
if (child == null)
|
||||
{
|
||||
return null;
|
||||
@@ -563,7 +562,7 @@ class LayeredDirectoryNodeImpl extends DirectoryNodeImpl implements LayeredDirec
|
||||
}
|
||||
else
|
||||
{
|
||||
child = lookupChild(lPath, name, -1, false, false);
|
||||
child = lookupChild(lPath, name, false);
|
||||
}
|
||||
AVMNode ghost = new DeletedNodeImpl(lPath.getAVMStore().getAVMRepository().issueID(),
|
||||
lPath.getAVMStore());
|
||||
@@ -798,7 +797,7 @@ class LayeredDirectoryNodeImpl extends DirectoryNodeImpl implements LayeredDirec
|
||||
throw new AVMBadArgumentException("Non primary layered directories cannot be linked.");
|
||||
}
|
||||
// Look for an existing child of that name.
|
||||
AVMNode existing = lookupChild(lPath, name, -1, false, true);
|
||||
AVMNode existing = lookupChild(lPath, name, true);
|
||||
if (existing != null)
|
||||
{
|
||||
if (existing.getType() != AVMNodeType.DELETED_NODE)
|
||||
|
@@ -170,13 +170,11 @@ class PlainDirectoryNodeImpl extends DirectoryNodeImpl implements PlainDirectory
|
||||
* Lookup a child by name.
|
||||
* @param lPath The lookup path so far.
|
||||
* @param name The name to lookup.
|
||||
* @param version The version to look under.
|
||||
* @param write Whether this is in a write context.
|
||||
* @param includeDeleted Whether to lookup deleted nodes.
|
||||
* @return The child or null.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public AVMNode lookupChild(Lookup lPath, String name, int version, boolean write,
|
||||
boolean includeDeleted)
|
||||
public AVMNode lookupChild(Lookup lPath, String name, boolean includeDeleted)
|
||||
{
|
||||
ChildEntry entry = AVMDAOs.Instance().fChildEntryDAO.getByNameParent(name, this);
|
||||
if (entry == null ||
|
||||
|
Reference in New Issue
Block a user