mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Merged V3.1 to HEAD
13065: SiteService - listSites() "nameFilter" and "sizeFilter" now implemented. Optimization to retrieve the Site Root noderef and cache it within the SiteService. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13556 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -122,14 +122,31 @@ public class ScriptSiteService extends BaseScopableProcessorExtension
|
||||
*/
|
||||
public Site[] listSites(String nameFilter, String sitePresetFilter)
|
||||
{
|
||||
List<SiteInfo> siteInfos = this.siteService.listSites(nameFilter, sitePresetFilter);
|
||||
return listSites(nameFilter, sitePresetFilter, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* List the sites available in the repository. The returned list can optionally be filtered by name and site
|
||||
* preset.
|
||||
* <p>
|
||||
* If no filters are specified then all the available sites are returned.
|
||||
*
|
||||
* @param nameFilter name filter
|
||||
* @param sitePresetFilter site preset filter
|
||||
* @param size max results size crop if >0
|
||||
*
|
||||
* @return Site[] a list of the site filtered as appropriate
|
||||
*/
|
||||
public Site[] listSites(String nameFilter, String sitePresetFilter, int size)
|
||||
{
|
||||
List<SiteInfo> siteInfos = this.siteService.listSites(nameFilter, sitePresetFilter, size);
|
||||
List<Site> sites = new ArrayList<Site>(siteInfos.size());
|
||||
for (SiteInfo siteInfo : siteInfos)
|
||||
{
|
||||
sites.add(new Site(siteInfo, this.serviceRegistry, this.siteService, getScope()));
|
||||
}
|
||||
return (Site[])sites.toArray(new Site[sites.size()]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* List all the sites that the specified user has an explicit membership to.
|
||||
|
Reference in New Issue
Block a user