Added a new findSites() method for use by live-search and Site Finder (sites.get.js) for ACE-1513

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@68092 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gethin James
2014-04-26 16:20:13 +00:00
parent 28060c9cdf
commit e6e3814951
4 changed files with 241 additions and 3 deletions

View File

@@ -261,7 +261,25 @@ public class ScriptSiteService extends BaseScopableProcessorExtension
List<SiteInfo> siteInfos = this.siteService.findSites(filter, sitePresetFilter, size);
return makeSitesArray(siteInfos);
}
/**
* Find (search) the sites available in the repository. The returned list can optionally be filtered by name
* <p/>
*
* @param filter inclusion filter for returned sites. Only sites whose cm:name OR cm:title
* OR cm:description CONTAIN the filter string will be returned.
* @param size max results size crop if >0
*
* @return Site[] a list of the site filtered as appropriate
*
* @see SiteService#findSites(String, int) for a description of the limitations of this method.
* @since 5.0
*/
public Site[] findSites(String filter, int size)
{
List<SiteInfo> siteInfos = this.siteService.findSites(filter, size);
return makeSitesArray(siteInfos);
}
/**
* Converts the given List of SiteInfo objects to a JavaScript friendly array
* of Site objects.