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

126600 jkaabimofrad: Merged FILE-FOLDER-API (5.2.0) to HEAD (5.2)
      124911 jvonka: RA-767: Queries API - additional tests & fixes (re: tag hits & also optional "include" info in results)


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@126945 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Ancuta Morarasu
2016-05-11 12:15:00 +00:00
parent cb22f40e35
commit f8d4813192
3 changed files with 279 additions and 73 deletions

View File

@@ -1223,7 +1223,7 @@ public class NodesImpl implements Nodes
{
FileInfo fInfo = page.get(index);
// minimal info by default (unless "select"ed otherwise)
// minimal info by default (unless "include"d otherwise)
return getFolderOrDocument(fInfo.getNodeRef(), parentNodeRef, fInfo.getType(), includeParam, mapUserInfo);
}

View File

@@ -24,6 +24,7 @@ import org.alfresco.query.PagingRequest;
import org.alfresco.rest.api.Nodes;
import org.alfresco.rest.api.Queries;
import org.alfresco.rest.api.model.Node;
import org.alfresco.rest.api.model.UserInfo;
import org.alfresco.rest.framework.core.exceptions.EntityNotFoundException;
import org.alfresco.rest.framework.core.exceptions.InvalidArgumentException;
import org.alfresco.rest.framework.core.exceptions.NotFoundException;
@@ -221,10 +222,16 @@ public class QueriesImpl implements Queries, InitializingBean
List<Node> nodeList = new ArrayList<>(results.length());
final Map<String, UserInfo> mapUserInfo = new HashMap<>(10);
List<String> includeParam = parameters.getInclude();
for (ResultSetRow row : results)
{
NodeRef nodeRef = row.getNodeRef();
nodeList.add(nodes.getFolderOrDocument(nodeRef.getId(), parameters));
// minimal info by default (unless "include"d otherwise)
nodeList.add(nodes.getFolderOrDocument(nodeRef, null, null, includeParam, mapUserInfo));
}
results.close();