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

129779 gjames: SEARCH-118: Adding search.score to node response


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@130171 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gethin James
2016-09-06 14:17:56 +00:00
parent b18f433fca
commit 67c21ad600
4 changed files with 45 additions and 5 deletions

View File

@@ -34,6 +34,7 @@ import java.util.Map;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
import org.alfresco.repo.security.permissions.AccessDeniedException;
import org.alfresco.rest.api.search.model.SearchEntry;
import org.alfresco.rest.framework.resource.UniqueId;
import org.alfresco.service.ServiceRegistry;
import org.alfresco.service.cmr.repository.NodeRef;
@@ -91,6 +92,9 @@ public class Node implements Comparable<Node>
protected List<String> allowableOperations;
//optional SearchEntry (only ever returned from a search)
protected SearchEntry search = null;
public Node(NodeRef nodeRef, NodeRef parentNodeRef, Map<QName, Serializable> nodeProps, Map<String, UserInfo> mapUserInfo, ServiceRegistry sr)
{
if(nodeRef == null)
@@ -464,6 +468,10 @@ public class Node implements Comparable<Node>
{
sb.append(", allowableOperations=").append(getAllowableOperations());
}
if (getSearch() != null)
{
sb.append(", search=").append(getSearch());
}
sb.append("]");
return sb.toString();
}
@@ -498,7 +506,15 @@ public class Node implements Comparable<Node>
this.association = association;
}
public SearchEntry getSearch()
{
return search;
}
public void setSearch(SearchEntry search)
{
this.search = search;
}
// TODO for backwards compat' - set explicitly when needed (ie. favourites) (note: we could choose to have separate old Node/NodeImpl etc)
protected String title;