From c56000ccc255fa72055d0d58a0f339c3f3658361 Mon Sep 17 00:00:00 2001 From: Neil McErlean Date: Mon, 4 Jul 2011 14:22:47 +0000 Subject: [PATCH] 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. 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 --- .../repo/web/scripts/site/AllSiteTests.java | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 source/java/org/alfresco/repo/web/scripts/site/AllSiteTests.java diff --git a/source/java/org/alfresco/repo/web/scripts/site/AllSiteTests.java b/source/java/org/alfresco/repo/web/scripts/site/AllSiteTests.java new file mode 100644 index 0000000000..6c8630f0ff --- /dev/null +++ b/source/java/org/alfresco/repo/web/scripts/site/AllSiteTests.java @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2005-2011 Alfresco Software Limited. + * + * This file is part of Alfresco + * + * Alfresco is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Alfresco is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . + */ +package org.alfresco.repo.web.scripts.site; + +import org.alfresco.repo.activities.SiteActivityTest; +import org.alfresco.repo.site.SiteServiceImplTest; +import org.alfresco.service.cmr.site.SiteService; +import org.junit.runner.RunWith; +import org.junit.runners.Suite; + +/** + * This class is a holder for the various test classes associated with the {@link SiteService}. + * It is not (at the time of writing) intended to be incorporated into the automatic build + * which will find the various test classes and run them individually. + * + * @author Neil Mc Erlean + * @since 4.0 + */ +@RunWith(Suite.class) +@Suite.SuiteClasses({ + SiteServiceImplTest.class, + SiteServiceTest.class, + SiteActivityTest.class +}) +public class AllSiteTests +{ + // Intentionally empty +}