Introducing a new API call into AVMService:

LayeringDescriptor getLayeringInfo(version, path);

LayeringDescriptor has three methods:

isBackground() Is the looked up node a background node.
getPathAVMStore() Gets a descriptor for the store the path was looked up in.
getNativeAVMStore() Gets the store that the actual node was found in.



git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3348 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Britt Park
2006-07-18 19:08:21 +00:00
parent fff2fb6b05
commit e5eb45da0f
8 changed files with 224 additions and 6 deletions

View File

@@ -43,6 +43,11 @@ class Lookup
*/
private List<LookupComponent> fComponents;
/**
* The final store in resolving layers.
*/
private AVMStore fFinalStore;
/**
* Whether, at this point, a layered node has been hit.
* Used while building a Lookup.
@@ -96,6 +101,7 @@ class Lookup
fLowestLayerIndex = -1;
fNeedsCopying = false;
fDirectlyContained = true;
fFinalStore = store;
}
/**
@@ -110,6 +116,11 @@ class Lookup
LookupComponent comp = new LookupComponent();
comp.setName(name);
comp.setNode(node);
if (fPosition >= 0 && fDirectlyContained &&
fComponents.get(fPosition).getNode().getType() == AVMNodeType.LAYERED_DIRECTORY)
{
fDirectlyContained = ((DirectoryNode)fComponents.get(fPosition).getNode()).directlyContains(node);
}
if (!write)
{
if (node.getType() == AVMNodeType.LAYERED_DIRECTORY)
@@ -128,11 +139,6 @@ class Lookup
fPosition++;
return;
}
if (fPosition >= 0 && fDirectlyContained &&
fComponents.get(fPosition).getNode().getType() == AVMNodeType.LAYERED_DIRECTORY)
{
fDirectlyContained = ((DirectoryNode)fComponents.get(fPosition).getNode()).directlyContains(node);
}
if (!node.getIsNew())
{
fNeedsCopying = true;
@@ -331,8 +337,40 @@ class Lookup
return builder.toString();
}
/**
* Gets the final name in the lookup.
* @return The final name in the lookup.
*/
public String getBaseName()
{
return fComponents.get(fPosition).getName();
}
/**
* Set the final store the lookup occurred in.
* @param store The store to set.
*/
public void setFinalStore(AVMStore store)
{
fFinalStore = store;
}
/**
* Get the final store traversed during lookup.
* @return The final store traversed.
*/
public AVMStore getFinalStore()
{
return fFinalStore;
}
/**
* Get whether the node looked up is directly contained from the
* original root.
* @return Whether the node looked up is directly contained.
*/
public boolean getDirectlyContained()
{
return fDirectlyContained;
}
}