mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged FILE-FOLDER-API (5.2.0) to HEAD (5.2)
121939 jvonka: Nodes (FileFolder) API - update listChildren 'where' filtering (inc tests) for nodeType + subTypes RA-811, RA-634 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@126443 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -904,7 +904,7 @@ public class NodesImpl implements Nodes
|
||||
boolean includeFiles = true;
|
||||
|
||||
QName filterNodeTypeQName = null;
|
||||
boolean filterIncludeSubTypes = true;
|
||||
boolean filterIncludeSubTypes = false;
|
||||
|
||||
Query q = parameters.getQuery();
|
||||
|
||||
@@ -925,12 +925,20 @@ public class NodesImpl implements Nodes
|
||||
if ((nodeTypeStr != null) && (! nodeTypeStr.isEmpty()))
|
||||
{
|
||||
filterNodeTypeQName = createQName(nodeTypeStr);
|
||||
if (dictionaryService.getType(filterNodeTypeQName) == null)
|
||||
{
|
||||
throw new InvalidArgumentException("Unknown filter nodeType: "+nodeTypeStr);
|
||||
}
|
||||
}
|
||||
|
||||
// optionally used with nodeType filter (default is to include subTypes, if not specified as "subTypes=false")
|
||||
// optionally used with nodeType filter (default is *not* to include sub-types)
|
||||
Boolean subTypes = propertyWalker.getProperty(PARAM_SUBTYPES, WhereClauseParser.EQUALS, Boolean.class);
|
||||
if (subTypes != null)
|
||||
{
|
||||
if (nodeTypeStr == null)
|
||||
{
|
||||
throw new InvalidArgumentException("Expected nodeType and subTypes (not just subTypes) filter: "+parentNodeRef.getId());
|
||||
}
|
||||
filterIncludeSubTypes = subTypes;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user