search-files
com.arsdigita.web.ApplicationFileServlet
diff --git a/ccm-ldn-search/application.xml b/ccm-ldn-search/application.xml
index 7f435b427..d3efa9ddc 100755
--- a/ccm-ldn-search/application.xml
+++ b/ccm-ldn-search/application.xml
@@ -2,7 +2,7 @@
@@ -15,7 +15,7 @@
- The Red Hat Web Application Framework is a platform for writing
- database-backed web applications in Java.
+ Adds capability to include remote CCM instances into search and combine the
+ results into one integrated list.
diff --git a/ccm-ldn-search/pdl/com/arsdigita/london/search/Search.pdl b/ccm-ldn-search/pdl/com/arsdigita/london/search/Search.pdl
index a4cfb667a..71af8b548 100755
--- a/ccm-ldn-search/pdl/com/arsdigita/london/search/Search.pdl
+++ b/ccm-ldn-search/pdl/com/arsdigita/london/search/Search.pdl
@@ -20,5 +20,6 @@ model com.arsdigita.london.search;
import com.arsdigita.web.Application;
object type Search extends Application {
- reference key (search_app.application_id);
+ // reference key (search_app.application_id);
+ // nothing really to store here
}
diff --git a/ccm-ldn-search/sql/ccm-ldn-search/upgrade/default/6.6.0-6.6.1/drop_app_table.sql b/ccm-ldn-search/sql/ccm-ldn-search/upgrade/default/6.6.0-6.6.1/drop_app_table.sql
new file mode 100644
index 000000000..08218229f
--- /dev/null
+++ b/ccm-ldn-search/sql/ccm-ldn-search/upgrade/default/6.6.0-6.6.1/drop_app_table.sql
@@ -0,0 +1,23 @@
+--
+-- Copyright (C) 2011 Peter Boy All Rights Reserved.
+--
+-- This library 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 2.1 of
+-- the License, or (at your option) any later version.
+--
+-- This library 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 this library; if not, write to the Free Software
+-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+--
+-- $Id: drop_app_table.sql pboy $
+
+-- drops table subsite_app which just contained application type id and is
+-- never used for any action.
+
+drop table search_app ;
diff --git a/ccm-ldn-search/sql/ccm-ldn-search/upgrade/default/6.6.0-6.6.1/remove_legacy_entries.sql b/ccm-ldn-search/sql/ccm-ldn-search/upgrade/default/6.6.0-6.6.1/remove_legacy_entries.sql
new file mode 100644
index 000000000..5f9b91847
--- /dev/null
+++ b/ccm-ldn-search/sql/ccm-ldn-search/upgrade/default/6.6.0-6.6.1/remove_legacy_entries.sql
@@ -0,0 +1,131 @@
+--
+-- Copyright (C) 2012 Peter Boy. All Rights Reserved.
+--
+-- This library 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 2.1 of
+-- the License, or (at your option) any later version.
+--
+-- This library 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 this library; if not, write to the Free Software
+-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+--
+-- $Id: remove_legacy_entries.sql $
+
+-- Search is now initialized as a legacy free type of application so
+-- entries in tables apm_package_types are no longer needed.
+
+
+-- in case there may be several application instances!
+
+-- delete from object_context all entries referring to node_id in site_nodes
+delete from object_context
+ where object_id in
+ (select node_id from site_nodes object_id where object_id in
+ ( select package_id from applications where application_type_id =
+ (select application_type_id from application_types
+ where object_type
+ like '%search.Search%')
+ )
+ );
+
+-- delete from acs_objects all entries referring to node_id in site_nodes
+alter table site_nodes drop constraint site_nodes_node_id_f_n1m2y ;
+delete from acs_objects
+ where object_id in
+ (select node_id from site_nodes where object_id in
+ ( select package_id from applications where application_type_id =
+ (select application_type_id from application_types
+ where object_type
+ like '%search.Search%')
+ )
+ );
+
+-- delete all entries in site_nodes referring to a subsite instance
+delete from site_nodes
+ where object_id in
+ (select package_id from applications where application_type_id =
+ (select application_type_id from application_types
+ where object_type
+ like '%search.Search%')
+ );
+alter table site_nodes add constraint site_nodes_node_id_f_n1m2y
+ FOREIGN KEY (node_id)
+ REFERENCES acs_objects (object_id) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE NO ACTION ;
+
+
+
+-- delete from object_context all entries referring to package_id in apm_packages
+delete from object_context
+ where object_id in
+ (select package_id from apm_packages where package_type_id =
+ (select package_type_id from application_types
+ where object_type
+ like '%search.Search%')
+ );
+
+-- delete from acs_objects all entries referring to package_id in apm_packages
+alter table apm_packages drop constraint apm_package_package_id_f_46may ;
+alter table applications drop constraint application_package_id_f_cdaho ;
+delete from acs_objects
+ where object_id in
+ (select package_id from apm_packages where package_type_id =
+ (select package_type_id from application_types
+ where object_type
+ like '%search.Search%')
+ );
+
+-- delete all entries for subsite instances in apm_packages
+-- identified by package_type_id in application_types
+delete from apm_packages
+ where package_type_id =
+ (select package_type_id from application_types
+ where object_type
+ like '%search.Search%') ;
+
+-- there seem to be no intries for a apm_packages_types entry (row) in
+-- acs_objects or object_context!
+
+-- delete all entries for subsite in apm_package_types identified by
+-- package_type_id in application_types
+alter table application_types drop constraint applica_typ_pac_typ_id_f_v80ma ;
+delete from apm_package_types
+ where package_type_id =
+ (select package_type_id from application_types
+ where object_type
+ like '%search.Search%') ;
+
+
+-- set package_id to null for all entries referring to a subsite instance
+-- (indicating a new legacy free application)
+update applications
+ set package_id = null
+ where application_type_id =
+ (select application_type_id from application_types
+ where object_type
+ like '%search.Search%') ;
+
+-- set package_id to null for all entries referring to a subsite instance
+-- (indicating a new legacy free application)
+update application_types
+ set package_type_id = null
+ where object_type like '%search.Search%' ;
+
+alter table application_types add constraint applica_typ_pac_typ_id_f_v80ma
+ FOREIGN KEY (package_type_id)
+ REFERENCES apm_package_types (package_type_id)
+ MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION ;
+alter table applications add constraint application_package_id_f_cdaho
+ FOREIGN KEY (package_id)
+ REFERENCES apm_packages (package_id) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE NO ACTION ;
+alter table apm_packages add constraint apm_package_package_id_f_46may
+ FOREIGN KEY (package_id)
+ REFERENCES acs_objects (object_id) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE NO ACTION ;
diff --git a/ccm-ldn-search/sql/ccm-ldn-search/upgrade/default/6.6.0-6.6.1/upd_cms_tables.sql b/ccm-ldn-search/sql/ccm-ldn-search/upgrade/default/6.6.0-6.6.1/upd_cms_tables.sql
new file mode 100644
index 000000000..72bd0bf5a
--- /dev/null
+++ b/ccm-ldn-search/sql/ccm-ldn-search/upgrade/default/6.6.0-6.6.1/upd_cms_tables.sql
@@ -0,0 +1,26 @@
+--
+-- Copyright (C) 2011 Peter Boy All Rights Reserved.
+--
+-- This library 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 2.1 of
+-- the License, or (at your option) any later version.
+--
+-- This library 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 this library; if not, write to the Free Software
+-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+--
+-- $Id: upd_cms_tables.sql pboy $
+
+-- adjust cms tables to the new name of application subsite
+
+
+update content_sections
+ set template_resolver_class = replace(template_resolver_class,
+ 'london.subsite', 'subsite');
+
diff --git a/ccm-ldn-search/sql/ccm-ldn-search/upgrade/default/6.6.0-6.6.1/upd_system_tables.sql b/ccm-ldn-search/sql/ccm-ldn-search/upgrade/default/6.6.0-6.6.1/upd_system_tables.sql
new file mode 100644
index 000000000..36a629564
--- /dev/null
+++ b/ccm-ldn-search/sql/ccm-ldn-search/upgrade/default/6.6.0-6.6.1/upd_system_tables.sql
@@ -0,0 +1,66 @@
+--
+-- Copyright (C) 2011 Peter Boy All Rights Reserved.
+--
+-- This library 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 2.1 of
+-- the License, or (at your option) any later version.
+--
+-- This library 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 this library; if not, write to the Free Software
+-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+--
+-- $Id: upd_system_tables.sql pboy $
+
+-- adjust various system tables to the new name of application subsite
+
+alter table init_requirements drop constraint init_requirements_init_f_cmmdn ;
+
+alter table init_requirements drop constraint init_require_requ_init_f_i6rgg ;
+
+update inits
+ set class_name=replace(class_name,'london.subsite', 'subsite')
+ where class_name like '%london.subsite%' ;
+
+update init_requirements
+ set init=replace(init,'london.subsite', 'subsite')
+ where init like '%london.subsite%' ;
+
+update init_requirements
+ set required_init=replace(required_init,'london.subsite', 'subsite')
+ where required_init like '%london.subsite%' ;
+
+ALTER TABLE ONLY init_requirements
+ ADD CONSTRAINT init_requirements_init_f_cmmdn FOREIGN KEY (init)
+ REFERENCES inits (class_name) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE NO ACTION;
+
+ALTER TABLE init_requirements
+ ADD CONSTRAINT init_require_requ_init_f_i6rgg FOREIGN KEY (required_init)
+ REFERENCES inits (class_name) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE NO ACTION;
+
+
+update application_types
+ set object_type=replace(object_type,'london.subsite', 'subsite')
+ where object_type like '%london.subsite%' ;
+
+-- table applications doesn't require an update
+
+-- table apm_package_types doesn't require an update
+
+-- table apm_packages doesn't require an update either
+-- table site_nodes doesn't require an update either
+
+
+-- update application type in acs_objects
+update acs_objects
+ set (object_type,default_domain_class) =
+ (replace(object_type,'london.subsite', 'subsite') ,
+ replace(default_domain_class,'london.subsite', 'subsite') )
+ where object_type like '%london.subsite%' ;
diff --git a/ccm-ldn-search/sql/ccm-ldn-search/upgrade/oracle-se-6.6.0-6.6.1.sql b/ccm-ldn-search/sql/ccm-ldn-search/upgrade/oracle-se-6.6.0-6.6.1.sql
new file mode 100644
index 000000000..82d96785b
--- /dev/null
+++ b/ccm-ldn-search/sql/ccm-ldn-search/upgrade/oracle-se-6.6.0-6.6.1.sql
@@ -0,0 +1,31 @@
+--
+-- Copyright (C) 2012 Peter Boy All Rights Reserved.
+--
+-- This library 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 2.1 of
+-- the License, or (at your option) any later version.
+--
+-- This library 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 this library; if not, write to the Free Software
+-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+--
+-- $DateTime: 2011/03/27 23:15:09 $
+-- $Id: oracle-se-6.6.0-6.6.1 pboy $
+
+-- drop table search_app - not needed anyway
+@@ default/6.6.0-6.6.1/drop_app_table.sql
+
+-- remove legacy compatible bits
+@@ default/6.6.0-6.6.1/remove_legacy_entries.sql
+
+-- rename application from london.subsite to subsite
+-- @@ default/6.6.0-6.6.1/upd_system_tables.sql
+
+-- adjust class name in content_sections table
+-- @@ default/6.6.0-6.6.1/upd_cms_tables.sql
diff --git a/ccm-ldn-search/sql/ccm-ldn-search/upgrade/postgres-6.6.0-6.6.1.sql b/ccm-ldn-search/sql/ccm-ldn-search/upgrade/postgres-6.6.0-6.6.1.sql
new file mode 100644
index 000000000..6e5a5773e
--- /dev/null
+++ b/ccm-ldn-search/sql/ccm-ldn-search/upgrade/postgres-6.6.0-6.6.1.sql
@@ -0,0 +1,36 @@
+--
+-- Copyright (C) 2012 Peter Boy All Rights Reserved.
+--
+-- This library 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 2.1 of
+-- the License, or (at your option) any later version.
+--
+-- This library 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 this library; if not, write to the Free Software
+-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+--
+-- $DateTime: 2010/11/10 23:15:09 $
+
+\echo Red Hat Enterprise ccm-ldn-search 6.6.0 -> 6.6.1 Upgrade Script (PostgreSQL)
+
+begin;
+
+-- drop table search_app - not needed anyway
+\i default/6.6.0-6.6.1/drop_app_table.sql
+
+-- remove legacy compatible bits
+\i default/6.6.0-6.6.1/remove_legacy_entries.sql
+
+-- rename application from london.subsite to subsite
+-- \i default/6.6.0-6.6.1/upd_system_tables.sql
+
+-- adjust class name in content_sections table
+-- \i default/6.6.0-6.6.1/upd_cms_tables.sql
+
+commit;
diff --git a/ccm-ldn-search/src/ccm-ldn-search.upgrade b/ccm-ldn-search/src/ccm-ldn-search.upgrade
new file mode 100755
index 000000000..dbb051d0c
--- /dev/null
+++ b/ccm-ldn-search/src/ccm-ldn-search.upgrade
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/ccm-ldn-search/src/com/arsdigita/london/search/Initializer.java b/ccm-ldn-search/src/com/arsdigita/london/search/Initializer.java
index e705c446a..fa9c0bd79 100755
--- a/ccm-ldn-search/src/com/arsdigita/london/search/Initializer.java
+++ b/ccm-ldn-search/src/com/arsdigita/london/search/Initializer.java
@@ -21,9 +21,14 @@ package com.arsdigita.london.search;
import com.arsdigita.cms.search.VersionFilterType;
import com.arsdigita.cms.search.LuceneQueryEngine;
import com.arsdigita.db.DbHelper;
+import com.arsdigita.domain.DomainObject;
+import com.arsdigita.kernel.ACSObjectInstantiator;
+import com.arsdigita.persistence.DataObject;
import com.arsdigita.persistence.pdl.ManifestSource;
import com.arsdigita.persistence.pdl.NameFilter;
import com.arsdigita.runtime.CompoundInitializer;
+import com.arsdigita.runtime.ContextCloseEvent;
+import com.arsdigita.runtime.ContextInitEvent;
import com.arsdigita.runtime.DomainInitEvent;
import com.arsdigita.runtime.PDLInitializer;
import com.arsdigita.runtime.RuntimeConfig;
@@ -32,6 +37,8 @@ import com.arsdigita.search.FilterType;
import com.arsdigita.search.QueryEngineRegistry;
import com.arsdigita.search.filters.ObjectTypeFilterType;
+import org.apache.log4j.Logger;
+
/**
* The Search initializer.
*
@@ -40,6 +47,10 @@ import com.arsdigita.search.filters.ObjectTypeFilterType;
*/
public class Initializer extends CompoundInitializer {
+ private static final Logger s_log = Logger.getLogger(Initializer.class);
+
+ private Thread[] m_workers;
+
public Initializer() {
final String url = RuntimeConfig.getConfig().getJDBCURL();
final int database = DbHelper.getDatabaseFromURL(url);
@@ -62,6 +73,16 @@ public class Initializer extends CompoundInitializer {
public void init(DomainInitEvent e) {
super.init(e);
+ /* Register object instantiator for Search */
+ e.getFactory().registerInstantiator(
+ Search.BASE_DATA_OBJECT_TYPE,
+ new ACSObjectInstantiator() {
+ @Override
+ public DomainObject doNewInstance(DataObject dataObject) {
+ return new Search(dataObject);
+ }
+ });
+
SearchGroup.setSearchTimeout
(Search.getConfig().getSearchTimeout().intValue());
@@ -69,6 +90,46 @@ public class Initializer extends CompoundInitializer {
registerRemoteSearch();
}
+ /**
+ *
+ * @param evt
+ */
+ @Override
+ public void init(ContextInitEvent evt) {
+
+ int nWorkers = Search.getConfig().getNumberOfThreads().intValue();
+ if (s_log.isDebugEnabled()) {
+ s_log.debug("Starting " + nWorkers + " worker threads");
+ }
+
+ m_workers = new Thread[nWorkers];
+ for (int i = 0 ; i < nWorkers ; i++) {
+ if (s_log.isDebugEnabled()) {
+ s_log.debug("Starting thread " + i);
+ }
+ m_workers[i] = new RemoteSearcher(SearchJobQueue.getInstance());
+ m_workers[i].start();
+ }
+
+ }
+
+ /**
+ *
+ */
+ @Override
+ public void close(ContextCloseEvent evt) {
+
+ int nWorkers = m_workers.length;
+ for (int i = 0 ; i < nWorkers ; i++) {
+ if (s_log.isDebugEnabled()) {
+ s_log.debug("Starting thread " + i);
+ }
+ m_workers[i].stop();
+ }
+
+ }
+
+
private void registerRemoteSearch() {
QueryEngineRegistry.registerEngine
("remote", new FilterType[] {
@@ -76,6 +137,7 @@ public class Initializer extends CompoundInitializer {
}, new RemoteQueryEngine());
}
+
private void registerLimitedSimpleSearch() {
QueryEngineRegistry.registerEngine
(IndexerType.LUCENE,
diff --git a/ccm-ldn-search/src/com/arsdigita/london/search/Loader.java b/ccm-ldn-search/src/com/arsdigita/london/search/Loader.java
index 59451f180..ea24eb1be 100755
--- a/ccm-ldn-search/src/com/arsdigita/london/search/Loader.java
+++ b/ccm-ldn-search/src/com/arsdigita/london/search/Loader.java
@@ -31,15 +31,21 @@ import com.arsdigita.web.ApplicationType;
import org.apache.log4j.Logger;
/**
- * Loader (initial setup executed once at installation time).
+ * Executes nonrecurring at install time and loads (installs and initializes)
+ * the Remote Search module persistently into database.
*
* @author Justin Ross <jross@redhat.com>
* @version $Id: Loader.java 758 2005-09-02 14:26:56Z sskracic $
*/
public class Loader extends PackageLoader {
+ /** Creates a s_logging category with name = full name of class */
private static final Logger s_log = Logger.getLogger(Loader.class);
+ /**
+ *
+ * @param ctx
+ */
public void run(final ScriptContext ctx) {
new KernelExcursion() {
public void excurse() {
@@ -50,7 +56,12 @@ public class Loader extends PackageLoader {
}
+ /**
+ * Create the Search application type and setup the default application
+ * instance.
+ */
private void setupSearch() {
+/*
ApplicationSetup setup = new ApplicationSetup(s_log);
setup.setApplicationObjectType(Search.BASE_DATA_OBJECT_TYPE);
@@ -65,14 +76,22 @@ public class Loader extends PackageLoader {
});
ApplicationType type = setup.run();
type.save();
+*/
+ /* Try: legacy free */
+ ApplicationType type = new ApplicationType("Search",
+ Search.BASE_DATA_OBJECT_TYPE );
+
+ type.setDescription("Public search");
+ type.save();
+
+
if (!Application.isInstalled(Search.BASE_DATA_OBJECT_TYPE,
"/search/")) {
- Application app =
- Application.createApplication(type,
- "search",
- "Search",
- null);
+ Application app = Application.createApplication(type,
+ "search",
+ "Search",
+ null);
app.save();
}
}
diff --git a/ccm-ldn-search/src/com/arsdigita/london/search/RemoteSearcher.java b/ccm-ldn-search/src/com/arsdigita/london/search/RemoteSearcher.java
index b76b479ea..4213a6cad 100755
--- a/ccm-ldn-search/src/com/arsdigita/london/search/RemoteSearcher.java
+++ b/ccm-ldn-search/src/com/arsdigita/london/search/RemoteSearcher.java
@@ -18,6 +18,8 @@
package com.arsdigita.london.search;
+import com.arsdigita.util.UncheckedWrapperException;
+
import java.net.MalformedURLException;
import java.net.URL;
import java.rmi.RemoteException;
@@ -33,13 +35,16 @@ import org.apache.axis.client.Service;
import org.apache.axis.encoding.ser.BeanSerializerFactory;
import org.apache.axis.encoding.ser.BeanDeserializerFactory;
-import com.arsdigita.util.UncheckedWrapperException;
-
import org.apache.log4j.Logger;
+/**
+ *
+ *
+ */
public class RemoteSearcher extends Thread {
- private static final Logger s_log =
- Logger.getLogger( RemoteSearcher.class );
+
+ /** Logger instance for debugging */
+ private static final Logger s_log = Logger.getLogger( RemoteSearcher.class );
private SearchJobQueue m_queue;
private boolean m_stop = false;
@@ -53,6 +58,10 @@ public class RemoteSearcher extends Thread {
m_queue = queue;
}
+ /**
+ *
+ */
+ @Override
public void run() {
// Initialize the SOAP call
Service service;
diff --git a/ccm-ldn-search/src/com/arsdigita/london/search/Search.java b/ccm-ldn-search/src/com/arsdigita/london/search/Search.java
index d7799de7c..492217762 100755
--- a/ccm-ldn-search/src/com/arsdigita/london/search/Search.java
+++ b/ccm-ldn-search/src/com/arsdigita/london/search/Search.java
@@ -25,31 +25,40 @@ import com.arsdigita.web.Application;
import org.apache.log4j.Logger;
/**
- * Base class for the search application (module)
- *
+ * Base Domain Class for the search application (module).
+ *
+ * Currently there is nothing specific to persist in permanent storage, so the
+ * corresponding pdl is empty an no class specific table created.
*/
public class Search extends Application {
+ /** Logger instance for debugging */
private static final Logger logger = Logger.getLogger(Search.class);
- public static final String BASE_DATA_OBJECT_TYPE
- = "com.arsdigita.london.search.Search";
+
+ /** PDL refernce */
+ public static final String BASE_DATA_OBJECT_TYPE =
+ "com.arsdigita.london.search.Search";
- private static SearchConfig s_config = new SearchConfig();
-
- static {
- logger.debug("Static initalizer starting...");
- s_config.load();
- logger.debug("Static initalizer finished.");
- }
+ /** Config object containing various parameter */
+ private static SearchConfig s_config = SearchConfig.getConfig();
+ /** Provide client classes with access to configuration data */
public static SearchConfig getConfig() {
return s_config;
}
+ /**
+ * Constructor based on DataObject information
+ * @param obj
+ */
public Search(DataObject obj) {
super(obj);
}
+ /**
+ * Constructor retrieves Search application object based on OID
+ * @param oid
+ */
public Search(OID oid) {
super(oid);
}
@@ -89,6 +98,7 @@ public class Search extends Application {
*
* @return path name to the applications servlet/JSP
*/
+ @Override
public String getServletPath() {
//return "/files";
return "/ccm-ldn-search/files";
diff --git a/ccm-ldn-search/src/com/arsdigita/london/search/SearchConfig.java b/ccm-ldn-search/src/com/arsdigita/london/search/SearchConfig.java
index 7f3b56776..a19b1412c 100755
--- a/ccm-ldn-search/src/com/arsdigita/london/search/SearchConfig.java
+++ b/ccm-ldn-search/src/com/arsdigita/london/search/SearchConfig.java
@@ -37,36 +37,78 @@ import org.apache.log4j.Logger;
*/
public final class SearchConfig extends AbstractConfig {
+ /** A logger instance to assist debugging. */
private static final Logger s_log = Logger.getLogger(SearchConfig.class);
- private final Parameter m_numThreads;
- private final Parameter m_searchTimeout;
- private final Parameter m_showSponsoredLinks;
- private final Parameter m_maxRemoteResults;
- private final Parameter m_remoteSearchContentSections;
+ /** Singelton config object. */
+ private static SearchConfig s_conf;
- private final Parameter m_simpleRestrictTo;
+ /**
+ * Gain a SearchConfig object.
+ *
+ * Singelton pattern, don't instantiate a config object using the
+ * constructor directly!
+ * @return
+ */
+ public static synchronized SearchConfig getConfig() {
+ if (s_conf == null) {
+ s_conf = new SearchConfig();
+ s_conf.load();
+ }
+
+ return s_conf;
+ }
+
+
+ // ////////////////////////////////////////////////////////////////////////
+ // Set of configuration parameters
+
+ /**
+ * Sets the number of threads that can respond to remote search queries
+ */
+ private final Parameter m_numThreads = new
+ IntegerParameter("com.arsdigita.london.search.num_threads",
+ Parameter.REQUIRED, new Integer(10));
+ /**
+ * Sets the number of milleseconds to wait for the search to return results
+ * before timing out
+ */
+ private final Parameter m_searchTimeout = new
+ IntegerParameter("com.arsdigita.london.search.timeout",
+ Parameter.REQUIRED, new Integer(4000));
+ /**
+ * Whether or not to display Sponsored Links in addition to search results
+ */
+ private final Parameter m_showSponsoredLinks = new
+ BooleanParameter("com.arsdigita.london.search.show_sponsored_links",
+ Parameter.REQUIRED, Boolean.FALSE);
+ /**
+ * What is the maximum number of remote search results this server should return
+ */
+ private final Parameter m_maxRemoteResults = new
+ IntegerParameter("com.arsdigita.london.search.max_remote_results",
+ Parameter.REQUIRED, new Integer(50));
+ /**
+ * When this host is a target for remote search, filter results to
+ * specified content sections
+ */
+ private final Parameter m_remoteSearchContentSections = new
+ StringArrayParameter("com.arsdigita.london.search.remote_search_content_sections",
+ Parameter.OPTIONAL, null);
+ /**
+ *
+ */
+ private final Parameter m_simpleRestrictTo = new
+ StringParameter("com.arsdigita.london.search.simple_restrict_to",
+ Parameter.OPTIONAL, "");
+
private String[] simpleRestrictToArray;
+ /**
+ * Constructor registers the configuration parameters and reads values from
+ * registry file.
+ */
public SearchConfig() {
- m_numThreads = new IntegerParameter
- ("com.arsdigita.london.search.num_threads",
- Parameter.REQUIRED, new Integer(10));
- m_searchTimeout = new IntegerParameter
- ("com.arsdigita.london.search.timeout",
- Parameter.REQUIRED, new Integer(4000));
- m_showSponsoredLinks = new BooleanParameter
- ("com.arsdigita.london.search.show_sponsored_links",
- Parameter.REQUIRED, Boolean.FALSE);
- m_maxRemoteResults = new IntegerParameter
- ("com.arsdigita.london.search.max_remote_results",
- Parameter.REQUIRED, new Integer(50));
- m_remoteSearchContentSections = new StringArrayParameter
- ("com.arsdigita.london.search.remote_search_content_sections",
- Parameter.OPTIONAL, null);
- m_simpleRestrictTo = new StringParameter
- ("com.arsdigita.london.search.simple_restrict_to",
- Parameter.OPTIONAL, "");
register(m_numThreads);
register(m_searchTimeout);
@@ -74,31 +116,46 @@ public final class SearchConfig extends AbstractConfig {
register(m_maxRemoteResults);
register(m_remoteSearchContentSections);
register(m_simpleRestrictTo);
+
loadInfo();
+
}
+ /**
+ * Get the number of threads that can respond to remote search queries
+ * @return Number of threads to start
+ */
public final Integer getNumberOfThreads() {
return (Integer) get(m_numThreads);
}
+ /**
+ * Get the number of milleseconds to wait for the search to return results
+ * before timing out
+ * @return Milliseconds to wait
+ */
public final Integer getSearchTimeout() {
return (Integer) get(m_searchTimeout);
}
+ /**
+ * Whether or not to display Sponsored Links in addition to search results
+ * @return
+ */
public final Boolean getShowSponsoredLinks() {
return (Boolean) get(m_showSponsoredLinks);
}
+ /**
+ * Get the maximum number of remote search results this server should return
+ * @return No of search results to show
+ */
public final Integer getMaxRemoteResults() {
return (Integer) get(m_maxRemoteResults);
}
- public final String getSimpleRestrictTo() {
- return (String) get(m_simpleRestrictTo);
- }
-
/**
* When this server is the target of a remote search, this
* parameter enables us to filter by content section - so for
@@ -112,6 +169,10 @@ public final class SearchConfig extends AbstractConfig {
return (String[])get(m_remoteSearchContentSections);
}
+ public final String getSimpleRestrictTo() {
+ return (String) get(m_simpleRestrictTo);
+ }
+
public final String[] getSimpleRestrictToArray() {
if (simpleRestrictToArray == null) {
loadSimpleRestrictToArray();
diff --git a/ccm-ldn-search/src/com/arsdigita/london/search/SearchJobQueue.java b/ccm-ldn-search/src/com/arsdigita/london/search/SearchJobQueue.java
index 8bf0fa718..0fc87c15f 100755
--- a/ccm-ldn-search/src/com/arsdigita/london/search/SearchJobQueue.java
+++ b/ccm-ldn-search/src/com/arsdigita/london/search/SearchJobQueue.java
@@ -18,17 +18,33 @@ package com.arsdigita.london.search;
import java.util.LinkedList;
import java.util.NoSuchElementException;
+/**
+ *
+ *
+ */
public class SearchJobQueue extends LinkedList {
private static SearchJobQueue s_jobQueue = new SearchJobQueue();
+ /**
+ *
+ * @return
+ */
public static SearchJobQueue getInstance() {
return s_jobQueue;
}
+ /**
+ *
+ */
private SearchJobQueue() {}
+ /**
+ *
+ * @return
+ */
public synchronized SearchJob getSearchJob() {
+
SearchJob job = null;
while (job == null) {
try {
@@ -45,6 +61,10 @@ public class SearchJobQueue extends LinkedList {
return job;
}
+ /**
+ *
+ * @param job
+ */
public synchronized void addSearchJob( SearchJob job ) {
addLast( job );
diff --git a/ccm-ldn-search/src/com/arsdigita/london/search/SearchWorkerServlet.java b/ccm-ldn-search/src/com/arsdigita/london/search/SearchWorkerServlet.java.nolongerInUse
similarity index 82%
rename from ccm-ldn-search/src/com/arsdigita/london/search/SearchWorkerServlet.java
rename to ccm-ldn-search/src/com/arsdigita/london/search/SearchWorkerServlet.java.nolongerInUse
index fd3a7dc42..3d7e9583e 100755
--- a/ccm-ldn-search/src/com/arsdigita/london/search/SearchWorkerServlet.java
+++ b/ccm-ldn-search/src/com/arsdigita/london/search/SearchWorkerServlet.java.nolongerInUse
@@ -24,11 +24,26 @@ import javax.servlet.ServletException;
import org.apache.log4j.Logger;
+
+// Deactivated!
+// Moved into Initializer.
+
+
+
/**
* This isn't really used as a servlet - its just there
* isn't any other way to ensure that the threads are
* only started with a servlet container - ie not when
* using ccm-run.
+ *
+ * Must be activated by including following lines into web.xml
+ *
+ * worker
+ * com.arsdigita.london.search.SearchWorkerServlet
+ * 4
+ *
+ *
+ *
*/
public class SearchWorkerServlet extends HttpServlet {
@@ -36,9 +51,15 @@ public class SearchWorkerServlet extends HttpServlet {
private Thread[] m_workers;
+ /**
+ *
+ * @param config
+ * @throws ServletException
+ */
+ @Override
public void init(ServletConfig config)
throws ServletException {
-
+/*
int nWorkers = Search.getConfig().getNumberOfThreads().intValue();
if (s_log.isDebugEnabled()) {
s_log.debug("Starting " + nWorkers + " worker threads");
@@ -51,6 +72,8 @@ public class SearchWorkerServlet extends HttpServlet {
m_workers[i] = new RemoteSearcher(SearchJobQueue.getInstance());
m_workers[i].start();
}
+*/
+
}
}
diff --git a/ccm-ldn-search/src/com/arsdigita/london/search/spider/DocumentManager.java b/ccm-ldn-search/src/com/arsdigita/london/search/spider/DocumentManager.java
index 0b6c87996..74b0c4ce0 100755
--- a/ccm-ldn-search/src/com/arsdigita/london/search/spider/DocumentManager.java
+++ b/ccm-ldn-search/src/com/arsdigita/london/search/spider/DocumentManager.java
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2001-2004 Red Hat Inc. All Rights Reserved.
+ *
+ * This library 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 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library 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 this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
package com.arsdigita.london.search.spider;
import com.arsdigita.persistence.PersistenceException;
@@ -16,19 +34,26 @@ import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Vector;
+import org.apache.log4j.Logger;
+
+
/**
* Implementation of JoBo's HttpDocManager interface, the interface
* that is responsible for processing the content retrieved from
* the spider.
* This implementation stores the content as {@link SpideredContent}
- * domain objects.
+ * domain objects.
+ * @see SpideredContent
*
+ *
*@author Michael Hanisch
*@version $Id: DocumentManager.java 287 2005-02-22 00:29:02Z sskracic $
- *@see SpideredContent
*/
public class DocumentManager implements HttpDocManager {
+ /** A logger instance to assist debugging. */
+ private static final Logger s_log = Logger.getLogger(DocumentManager.class);
+
// HTTP headers
private static final String LAST_MODIFIED_HEADER = "Last-Modified";
private static final String CONTENT_TYPE_HEADER = "Content-Type";
@@ -47,9 +72,10 @@ public class DocumentManager implements HttpDocManager {
public static final SimpleDateFormat rfc1123_formatter =
new SimpleDateFormat("EEE, dd MMM yyyy hh:mm:ss z");
- private static final org.apache.log4j.Logger s_log =
- org.apache.log4j.Logger.getLogger(DocumentManager.class);
-
+ /**
+ *
+ * @param doc
+ */
public void processDocument(HttpDoc doc) {
/* TO DO: Create SpideredContent domain object,
* set the properties and save() it
diff --git a/ccm-ldn-search/src/com/arsdigita/london/search/spider/Scheduler.java b/ccm-ldn-search/src/com/arsdigita/london/search/spider/Scheduler.java
index aab0745a6..5abc82d83 100755
--- a/ccm-ldn-search/src/com/arsdigita/london/search/spider/Scheduler.java
+++ b/ccm-ldn-search/src/com/arsdigita/london/search/spider/Scheduler.java
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2001-2004 Red Hat Inc. All Rights Reserved.
+ *
+ * This library 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 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library 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 this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
package com.arsdigita.london.search.spider;
import net.matuschek.http.cookie.MemoryCookieManager;
@@ -52,11 +70,15 @@ public class Scheduler {
return s_URLList;
}
+ /**
+ *
+ */
public static synchronized void startTimer() {
+
if (s_timer != null) {
return; // Timer already exists
}
- else if (getURLs() == null || getURLs().size() == 0) {
+ else if ( getURLs() == null || getURLs().isEmpty() ) {
// No URLs, no spider.
s_log.info("no URLs specified, spider disabled");
return;
@@ -73,6 +95,9 @@ public class Scheduler {
s_timerFrequency);
}
+ /**
+ *
+ */
public static synchronized void stopTimer() {
if (s_timer == null) {
return; // no Timer (?)
diff --git a/ccm-ldn-search/src/com/arsdigita/london/search/ui/SimpleQueryComponent.java b/ccm-ldn-search/src/com/arsdigita/london/search/ui/SimpleQueryComponent.java
index 570882ee5..437e76b8c 100755
--- a/ccm-ldn-search/src/com/arsdigita/london/search/ui/SimpleQueryComponent.java
+++ b/ccm-ldn-search/src/com/arsdigita/london/search/ui/SimpleQueryComponent.java
@@ -34,23 +34,34 @@ import com.arsdigita.search.ui.filters.ObjectTypeFilterComponent;
import com.arsdigita.search.FilterSpecification;
import com.arsdigita.search.filters.ContentSectionFilterSpecification;
-import org.apache.log4j.Logger;
-
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import java.util.StringTokenizer;
+import org.apache.log4j.Logger;
+
+/**
+ *
+ *
+ */
public class SimpleQueryComponent extends BaseQueryComponent {
+ /** Logger instance for debugging */
private static final Logger s_log = Logger.getLogger(SimpleQueryComponent.class);
- private StringParameter m_hiddenAllowedContentSectionsList = new StringParameter("restrictToContentSections");
+
+ private StringParameter m_hiddenAllowedContentSectionsList = new
+ StringParameter("restrictToContentSections");
private String m_paramValue;
private String[] contentSectionTitles;
private boolean is_restricted;
private Form m_form;
+ /**
+ *
+ * @param context
+ */
public SimpleQueryComponent(String context) {
if (Search.getConfig().isIntermediaEnabled() ||
@@ -69,8 +80,15 @@ public class SimpleQueryComponent extends BaseQueryComponent {
}
+ /**
+ *
+ * @param form
+ * @param model
+ */
+ @Override
public void register(Form form, FormModel model) {
- s_log.debug("Adding " + m_hiddenAllowedContentSectionsList.getName() + " to form model");
+ s_log.debug("Adding " + m_hiddenAllowedContentSectionsList.getName()
+ + " to form model");
m_hiddenAllowedContentSectionsList.setPassIn(true);
model.addFormParam(m_hiddenAllowedContentSectionsList);
super.register(form, model);
@@ -79,13 +97,15 @@ public class SimpleQueryComponent extends BaseQueryComponent {
/**
* Gets the hidden restrictToContentSections param.
- * The param is in the form of a comma seperated list of content section names.
- * If present the search will only return content items from these content sections.
- **/
+ * The param is in the form of a comma seperated list of content section
+ * names. If present the search will only return content items from these
+ * content sections.
+ */
protected String getContentSections(PageState state) {
FormData formData = m_form.getFormData(state);
if (formData != null) {
- ParameterData contentSectionListParam = formData.getParameter(m_hiddenAllowedContentSectionsList.getName());
+ ParameterData contentSectionListParam =
+ formData.getParameter(m_hiddenAllowedContentSectionsList.getName());
String paramValue = (String)contentSectionListParam.getValue();
m_paramValue = paramValue;
s_log.debug("content sections list is " + paramValue);
@@ -115,18 +135,21 @@ public class SimpleQueryComponent extends BaseQueryComponent {
/**
* Adds the content section filter to any existing filters.
**/
+ @Override
protected FilterSpecification[] getFilters(PageState state) {
FilterSpecification[] existingfilters = super.getFilters(state);
List n = new ArrayList();
try {
- List filters = Arrays.asList(existingfilters); // this will throw a NullPointerException if there are no existing filters
+ // this will throw a NullPointerException if there are no existing filters!
+ List filters = Arrays.asList(existingfilters);
n.addAll(filters);
} catch (NullPointerException e) {
// do we need to catch it if we're doing nothing with it?
}
String[] contentSections = getContentSectionsArray(state);
if (contentSections == null) { return existingfilters; }
- ContentSectionFilterSpecification csfs = new ContentSectionFilterSpecification(contentSections);
+ ContentSectionFilterSpecification csfs = new
+ ContentSectionFilterSpecification(contentSections);
n.add(csfs);
FilterSpecification[] newFilters = new FilterSpecification[n.size()];
Iterator i = n.iterator();
diff --git a/ccm-ldn-search/src/com/arsdigita/london/search/ui/SimpleSearchPane.java b/ccm-ldn-search/src/com/arsdigita/london/search/ui/SimpleSearchPane.java
index 9585122c5..dbb7c6930 100755
--- a/ccm-ldn-search/src/com/arsdigita/london/search/ui/SimpleSearchPane.java
+++ b/ccm-ldn-search/src/com/arsdigita/london/search/ui/SimpleSearchPane.java
@@ -20,9 +20,17 @@ package com.arsdigita.london.search.ui;
import com.arsdigita.cms.ContentItem;
+/**
+ * Used by the UI JSP to create a main (simple) search pane (index.jsp).
+ *
+ */
public class SimpleSearchPane extends SearchComponent {
+ /**
+ *
+ */
public SimpleSearchPane() {
super(new SimpleQueryComponent(ContentItem.LIVE));
}
+
}
diff --git a/ccm-ldn-search/web/WEB-INF/web.ccm-ldn-search.xml b/ccm-ldn-search/web/WEB-INF/web.ccm-ldn-search.xml
index 3354af5de..ac7d2e14a 100644
--- a/ccm-ldn-search/web/WEB-INF/web.ccm-ldn-search.xml
+++ b/ccm-ldn-search/web/WEB-INF/web.ccm-ldn-search.xml
@@ -5,12 +5,6 @@
version="2.4">
-
- worker
- com.arsdigita.london.search.SearchWorkerServlet
- 4
-
-
search-files
com.arsdigita.web.ApplicationFileServlet
diff --git a/ccm-portalserver/src/com/arsdigita/portalserver/PortalSiteServlet.java b/ccm-portalserver/src/com/arsdigita/portalserver/PortalSiteServlet.java
index d57462dd8..d017596ce 100644
--- a/ccm-portalserver/src/com/arsdigita/portalserver/PortalSiteServlet.java
+++ b/ccm-portalserver/src/com/arsdigita/portalserver/PortalSiteServlet.java
@@ -48,6 +48,7 @@ import org.apache.log4j.Logger;
*/
public class PortalSiteServlet extends BaseApplicationServlet {
+ /** Logger instance for debugging */
private static final Logger s_log = Logger.getLogger(PortalSiteServlet.class);
private static final PresentationManager s_presManager =
diff --git a/ccm-portalserver/src/com/arsdigita/portalserver/personal/PersonalPortalCreatorServlet.java b/ccm-portalserver/src/com/arsdigita/portalserver/personal/PersonalPortalCreatorServlet.java
index b2691db9a..430ddc380 100644
--- a/ccm-portalserver/src/com/arsdigita/portalserver/personal/PersonalPortalCreatorServlet.java
+++ b/ccm-portalserver/src/com/arsdigita/portalserver/personal/PersonalPortalCreatorServlet.java
@@ -20,7 +20,6 @@
package com.arsdigita.portalserver.personal;
import com.arsdigita.bebop.Page;
-import com.arsdigita.bebop.PageFactory;
import com.arsdigita.bebop.SimpleContainer;
import com.arsdigita.dispatcher.DispatcherHelper;
import com.arsdigita.dispatcher.RequestContext;
@@ -31,7 +30,6 @@ import com.arsdigita.kernel.ResourceTypeConfig;
import com.arsdigita.kernel.User;
import com.arsdigita.templating.PresentationManager;
import com.arsdigita.templating.Templating;
-import com.arsdigita.ui.login.UserAuthenticationListener;
import com.arsdigita.util.Assert;
import com.arsdigita.web.Application;
import com.arsdigita.web.BaseApplicationServlet;
diff --git a/ccm-portalserver/src/com/arsdigita/portalserver/personal/PersonalPortalServlet.java b/ccm-portalserver/src/com/arsdigita/portalserver/personal/PersonalPortalServlet.java
index 41a76cecb..85cf1f6fb 100644
--- a/ccm-portalserver/src/com/arsdigita/portalserver/personal/PersonalPortalServlet.java
+++ b/ccm-portalserver/src/com/arsdigita/portalserver/personal/PersonalPortalServlet.java
@@ -50,6 +50,7 @@ import org.apache.log4j.Logger;
*/
public class PersonalPortalServlet extends BaseApplicationServlet {
+ /** Logger instance for debugging */
private static final Logger s_log = Logger.getLogger(PersonalPortalServlet.class);
private static final PresentationManager s_presManager =
diff --git a/ccm-portalserver/web/WEB-INF/web.ccm-portalserver.xml b/ccm-portalserver/web/WEB-INF/web.ccm-portalserver.xml
index b6aba89d4..7bc998a3c 100644
--- a/ccm-portalserver/web/WEB-INF/web.ccm-portalserver.xml
+++ b/ccm-portalserver/web/WEB-INF/web.ccm-portalserver.xml
@@ -4,7 +4,7 @@
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
-
+
portalsite
com.arsdigita.portalserver.PortalSiteServlet
@@ -34,8 +34,10 @@
portal-personalportal
com.arsdigita.portalserver.personal.PersonalPortalCreatorServlet
+
+
portalsite
/templates/servlet/portalsite/*
@@ -65,5 +67,6 @@
portal-personalportal
/templates/servlet/personal-portal-creator/*
+
\ No newline at end of file
diff --git a/ccm-sci-bundle/bundles/demo/cfg/integration.properties b/ccm-sci-bundle/bundles/demo/cfg/integration.properties
index dfcd3df85..10f61fef5 100644
--- a/ccm-sci-bundle/bundles/demo/cfg/integration.properties
+++ b/ccm-sci-bundle/bundles/demo/cfg/integration.properties
@@ -112,6 +112,7 @@ com.arsdigita.london.search.show_sponsored_links=true
# ccm-subsite application
com.arsdigita.subsite.root_category_picker=com.arsdigita.london.terms.ui.RootCategoryPicker
+com.arsdigita.london.search.num_threads=0
# ccm-themedirector application
diff --git a/ccm-sci-bundle/bundles/demo/cfg/web-sci.xml b/ccm-sci-bundle/bundles/demo/cfg/web-sci.xml
index 69abc6f99..9b44b5176 100644
--- a/ccm-sci-bundle/bundles/demo/cfg/web-sci.xml
+++ b/ccm-sci-bundle/bundles/demo/cfg/web-sci.xml
@@ -267,12 +267,6 @@
-
- worker
- com.arsdigita.london.search.SearchWorkerServlet
- 4
-
-
search-files
com.arsdigita.web.ApplicationFileServlet
diff --git a/ccm-sci-bundle/bundles/devel/cfg/integration.properties b/ccm-sci-bundle/bundles/devel/cfg/integration.properties
index 0aad3f8b9..5aee817d9 100644
--- a/ccm-sci-bundle/bundles/devel/cfg/integration.properties
+++ b/ccm-sci-bundle/bundles/devel/cfg/integration.properties
@@ -109,6 +109,8 @@ com.arsdigita.navigation.templates_file=bundle/navigation/sci-templates.txt
# ccm-search application
com.arsdigita.london.search.show_sponsored_links=true
+; Comment this out or increase the num_of_threads iv you really use remote search
+com.arsdigita.london.search.num_threads=0
# ccm-subsite application
diff --git a/ccm-sci-bundle/bundles/devel/cfg/web-sci.xml b/ccm-sci-bundle/bundles/devel/cfg/web-sci.xml
index 69abc6f99..4f53d5d54 100644
--- a/ccm-sci-bundle/bundles/devel/cfg/web-sci.xml
+++ b/ccm-sci-bundle/bundles/devel/cfg/web-sci.xml
@@ -267,12 +267,13 @@
+
search-files
com.arsdigita.web.ApplicationFileServlet
diff --git a/ccm-themedirector/src/com/arsdigita/themedirector/Initializer.java b/ccm-themedirector/src/com/arsdigita/themedirector/Initializer.java
index 84e5e4acb..f4d8021cc 100755
--- a/ccm-themedirector/src/com/arsdigita/themedirector/Initializer.java
+++ b/ccm-themedirector/src/com/arsdigita/themedirector/Initializer.java
@@ -66,6 +66,7 @@ public class Initializer extends CompoundInitializer {
@Override
public void init(DomainInitEvent evt) {
+
PatternStylesheetResolver.registerPatternGenerator(
"theme",
new ThemePatternGenerator()
@@ -101,7 +102,6 @@ public class Initializer extends CompoundInitializer {
}
@Override
- // public void init(LegacyInitEvent evt) {
public void init(ContextInitEvent evt) {
// This sets up the subsite for so that the form will include
// all of the themes already in the database