From 63bb6a86ef97494fbe191f1390ade9b7d3014327 Mon Sep 17 00:00:00 2001 From: Martin Muller Date: Fri, 5 Aug 2016 13:49:59 +0000 Subject: [PATCH] Merged RETURN-OF-THE-API (5.2.0) to 5.2.N (5.2.1) 129054 adavis: REPO-232,REPO-883 V1 REST API: Sites Live Search (/queries/live-search-sites) - Moved getSite() into the class that uses it. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@129197 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../alfresco/rest/api/impl/QueriesImpl.java | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/source/java/org/alfresco/rest/api/impl/QueriesImpl.java b/source/java/org/alfresco/rest/api/impl/QueriesImpl.java index bc8a5f79bb..2866920f71 100644 --- a/source/java/org/alfresco/rest/api/impl/QueriesImpl.java +++ b/source/java/org/alfresco/rest/api/impl/QueriesImpl.java @@ -367,22 +367,21 @@ public class QueriesImpl implements Queries, InitializingBean return getSite(siteService.getSite(nodeRef), true); } + // note: see also Sites.getSite + private Site getSite(SiteInfo siteInfo, boolean includeRole) + { + // set the site id to the short name (to deal with case sensitivity issues with using the siteId from the url) + String siteId = siteInfo.getShortName(); + String role = null; + if(includeRole) + { + role = sites.getSiteRole(siteId); + } + return new Site(siteInfo, role); + } }.find(parameters, PARAM_TERM, MIN_TERM_LENGTH_SITES, "_SITE", sortType, SITE_SORT_PARAMS_TO_QNAMES, new SortColumn(PARAM_SITE_TITLE, true)); } - // note: see also Sites.getSite - private Site getSite(SiteInfo siteInfo, boolean includeRole) - { - // set the site id to the short name (to deal with case sensitivity issues with using the siteId from the url) - String siteId = siteInfo.getShortName(); - String role = null; - if(includeRole) - { - role = sites.getSiteRole(siteId); - } - return new Site(siteInfo, role); - } - public abstract static class AbstractQuery { public enum Sort