Merged HEAD (5.2) to 5.2.N (5.2.1)

126595 jkaabimofrad: Merged FILE-FOLDER-API (5.2.0) to HEAD (5.2)
      124828 jvonka: RA-896 - List Node Children filtering - fix build/test fallout


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@126940 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Ancuta Morarasu
2016-05-11 12:14:14 +00:00
parent 8e5bf52024
commit 4fbea2881d

View File

@@ -1172,38 +1172,37 @@ public class NodesImpl implements Nodes
final PagingResults<FileInfo> pagingResults; final PagingResults<FileInfo> pagingResults;
// notes (see also earlier validation checks): // notes (see also earlier validation checks):
// - no filtering means any types/sub-types (well, apart from hidden &/or default ignored types - eg. systemfolder, fm types)
// - node type filtering is mutually exclusive from isFile/isFolder, can optionally also include sub-types // - node type filtering is mutually exclusive from isFile/isFolder, can optionally also include sub-types
// - isFile & isFolder cannot both be true // - isFile & isFolder cannot both be true
// - (isFile=false) means any other types/sub-types (other than files) // - (isFile=false) means any other types/sub-types (other than files)
// - (isFolder=false) means any other types/sub-types (other than folders) // - (isFolder=false) means any other types/sub-types (other than folders)
// - (isFile=false and isFolder=false) means any types/sub-types (other than files or folders) // - (isFile=false and isFolder=false) means any other types/sub-types (other than files or folders)
if (filterNodeTypeQName == null) if (filterNodeTypeQName == null)
{ {
if (Boolean.FALSE.equals(includeFiles) && Boolean.FALSE.equals(includeFolders)) if ((includeFiles == null) && (includeFolders == null))
{ {
includeFiles = false; // no additional filtering
includeFolders = false;
filterNodeTypeQName = ContentModel.TYPE_CMOBJECT; filterNodeTypeQName = ContentModel.TYPE_CMOBJECT;
} }
else if ((includeFiles != null) && (includeFolders != null))
if (includeFiles != null)
{ {
if ((! includeFiles) && (includeFolders == null)) if ((! includeFiles) && (! includeFolders))
{ {
// isFile=false // no files or folders
filterNodeTypeQName = ContentModel.TYPE_CMOBJECT; filterNodeTypeQName = ContentModel.TYPE_CMOBJECT;
} }
} }
else if ((includeFiles != null) && (! includeFiles))
if (includeFolders != null)
{ {
if ((! includeFolders) && (includeFiles == null)) // no files
{ filterNodeTypeQName = ContentModel.TYPE_CMOBJECT;
// isFolder=false }
filterNodeTypeQName = ContentModel.TYPE_CMOBJECT; else if ((includeFolders != null) && (! includeFolders))
} {
// no folders
filterNodeTypeQName = ContentModel.TYPE_CMOBJECT;
} }
} }