mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
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:
@@ -972,6 +972,32 @@ public class AVMServiceImpl implements AVMService
|
||||
fTransaction.perform(doit, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get layering information about a path.
|
||||
* @param version The version to look under.
|
||||
* @param path The full AVM path.
|
||||
* @return A LayeringDescriptor.
|
||||
*/
|
||||
public LayeringDescriptor getLayeringInfo(final int version, final String path)
|
||||
{
|
||||
if (path == null)
|
||||
{
|
||||
throw new AVMBadArgumentException("Null path: " + path);
|
||||
}
|
||||
class TxnCallback implements RetryingTransactionCallback
|
||||
{
|
||||
public LayeringDescriptor descriptor;
|
||||
|
||||
public void perform()
|
||||
{
|
||||
descriptor = fAVMRepository.getLayeringInfo(version, path);
|
||||
}
|
||||
}
|
||||
TxnCallback doit = new TxnCallback();
|
||||
fTransaction.perform(doit, false);
|
||||
return doit.descriptor;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the common ancestor of two nodes if one exists.
|
||||
* @param left The first node.
|
||||
|
Reference in New Issue
Block a user