mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Performance tweaks for AVM Indexing.
Removed calls to getXXXPaths(). Changed mappings of properties and aspects on AVM Nodes to favor get all calls. Added getAspects() and getNodeProperties() which take AVMNodeDescriptors. Used these in AVM Indexing to reduce the number of redundant full lookups. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6121 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -106,7 +106,7 @@ public class AVMRepository
|
||||
private AVMStorePropertyDAO fAVMStorePropertyDAO;
|
||||
|
||||
private ChildEntryDAO fChildEntryDAO;
|
||||
|
||||
|
||||
// A bunch of TransactionListeners that do work for this.
|
||||
|
||||
/**
|
||||
@@ -2677,4 +2677,39 @@ public class AVMRepository
|
||||
components.remove(components.size() - 1);
|
||||
}
|
||||
}
|
||||
|
||||
public Map<QName, PropertyValue> getNodeProperties(AVMNodeDescriptor desc)
|
||||
{
|
||||
AVMNode node = fAVMNodeDAO.getByID(desc.getId());
|
||||
if (node == null)
|
||||
{
|
||||
throw new AVMNotFoundException("Node not found: " + desc);
|
||||
}
|
||||
return node.getProperties();
|
||||
}
|
||||
|
||||
public ContentData getContentDataForRead(AVMNodeDescriptor desc)
|
||||
{
|
||||
AVMNode node = fAVMNodeDAO.getByID(desc.getId());
|
||||
if (node == null)
|
||||
{
|
||||
throw new AVMNotFoundException("Node not found: " + desc);
|
||||
}
|
||||
if (node.getType() == AVMNodeType.PLAIN_FILE)
|
||||
{
|
||||
PlainFileNode file = (PlainFileNode)node;
|
||||
return file.getContentData();
|
||||
}
|
||||
throw new AVMWrongTypeException("Not a Plain File: " + desc);
|
||||
}
|
||||
|
||||
public Set<QName> getAspects(AVMNodeDescriptor desc)
|
||||
{
|
||||
AVMNode node = fAVMNodeDAO.getByID(desc.getId());
|
||||
if (node == null)
|
||||
{
|
||||
throw new AVMNotFoundException("Node not found: " + desc);
|
||||
}
|
||||
return node.getAspects();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user