ALF-9151. SVC 39: Lucene removal: SiteService.

SiteService.listSites calls have been partially reimplemented to use GetChildrenCannedQueries.
For queries that search with a filter on sitePreset name, the searches are now CannedQueries.
This is because those queries were formerly using string equality comparisons to filter results, which GCCQ supports.
For queries that search with a filter on site cm:name, it is less simple. Searches such as "foo" are converted to (cm:name, "*foo*") comparisons in Lucene. Such 'contains' comparisons are not supported by GCCQ. These searches still use Lucene pending agreement on which approach to take to reimplementation here. Consistency with user &  group searches is required.
This check-in injects the necessary getChildrenCannedQuery beans into the SiteService.
It adds a new method listSites() which returns PagingResults<SiteInfo>. This is used where possible within the old listSites() lucene-based method and is exposed in the public Service for use by third parties.
Also added MethodSecurityInterceptor-based SiteService_security bean to the public-services-security-context.xml



git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@28791 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Neil McErlean
2011-07-04 14:22:47 +00:00
parent 0bcbbccca5
commit 212e229c73
7 changed files with 215 additions and 44 deletions

View File

@@ -22,12 +22,16 @@ import java.io.Serializable;
import java.util.List;
import java.util.Map;
import org.alfresco.query.PagingRequest;
import org.alfresco.query.PagingResults;
import org.alfresco.repo.node.getchildren.FilterProp;
import org.alfresco.repo.security.authority.UnknownAuthorityException;
import org.alfresco.service.Auditable;
import org.alfresco.service.NotAuditable;
import org.alfresco.service.PublicService;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.namespace.QName;
import org.alfresco.util.Pair;
/**
* Site service fundamental API.
@@ -120,6 +124,19 @@ public interface SiteService
@NotAuditable
List<SiteInfo> listSites(String userName);
/**
* This method returns {@link PagingResults paged result sets} of {@link SiteInfo} objects, which should be
* more efficient than the unpaged methods also available on this interface.
*
* @param filterProps property filters
* @param sortProps sorting options
* @param pagingRequest paging options
*
* @return a page of SiteInfo objects.
* @since 4.0
*/
PagingResults<SiteInfo> listSites(List<FilterProp> filterProps, List<Pair<QName, Boolean>> sortProps, PagingRequest pagingRequest);
/**
* Gets site information based on the short name of a site.
* <p>