|
From: <pb...@fe...> - 2013-02-02 18:23:59
|
Author: pboy
Date: 2013-02-02 18:23:47 +0000 (Sat, 02 Feb 2013)
New Revision: 2468
Removed:
trunk/ccm-core/src/com/arsdigita/dispatcher/ParameterProvider.java.nolongerInUse
trunk/ccm-core/src/com/arsdigita/initializer/
trunk/ccm-core/src/com/arsdigita/search/LegacyInitializer.java.nolongerInUse
trunk/ccm-core/src/com/arsdigita/search/SearchDataQuery.java.nolongerInUse
trunk/ccm-core/src/com/arsdigita/search/SearchIndexHelp.java.nolongerInUse
trunk/ccm-core/src/com/arsdigita/search/SearchIndexHelpCustomize.java.nolongerInUse
trunk/ccm-core/src/com/arsdigita/search/SearchSpecification.java.nolongerInUse
trunk/ccm-core/src/com/arsdigita/search/Searchable.java.nolongerInUse
trunk/ccm-core/src/com/arsdigita/search/SearchableACSObject.java.nolongerInUse
trunk/ccm-core/src/com/arsdigita/search/SearchableObserver.java.nolongerInUse
trunk/ccm-core/src/com/arsdigita/search/SimpleSearchSpecification.java.nolongerInUse
trunk/ccm-core/src/com/arsdigita/search/lucene/LegacyInitializer.java.nolongerInUse
trunk/ccm-core/src/com/arsdigita/search/lucene/enterprise.init.nolongerInUse
trunk/ccm-core/src/com/arsdigita/web/ApplicationSetup.java.nolongerInUse
trunk/ccm-core/src/com/arsdigita/web/LegacyAdapterServlet.java.nolongerInUse
trunk/ccm-core/src/com/arsdigita/web/LegacyInitializerServlet.java.nolongerInUse
Modified:
trunk/ccm-cms/src/com/arsdigita/cms/CMSConfig.java
trunk/ccm-cms/src/com/arsdigita/cms/ContentSection.java
trunk/ccm-cms/src/com/arsdigita/cms/Initializer.java
trunk/ccm-cms/src/com/arsdigita/cms/LoaderConfig.java
trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/AbstractContentTypeLoader.java
trunk/ccm-themedirector/src/com/arsdigita/themedirector/Loader.java
Log:
Code clean up, various formatting and documentation.
Modified: trunk/ccm-cms/src/com/arsdigita/cms/CMSConfig.java
===================================================================
--- trunk/ccm-cms/src/com/arsdigita/cms/CMSConfig.java 2013-02-02 18:09:36 UTC (rev 2467)
+++ trunk/ccm-cms/src/com/arsdigita/cms/CMSConfig.java 2013-02-02 18:23:47 UTC (rev 2468)
@@ -73,8 +73,7 @@
* Returns the singleton configuration record for the content section
* environment.
*
- * @return The
- * <code>ContentSectionConfig</code> record; it cannot be null
+ * @return The <code>CMSConfig</code> record; it cannot be null
*/
public static synchronized CMSConfig getInstance() {
if (s_config == null) {
Modified: trunk/ccm-cms/src/com/arsdigita/cms/ContentSection.java
===================================================================
--- trunk/ccm-cms/src/com/arsdigita/cms/ContentSection.java 2013-02-02 18:09:36 UTC (rev 2467)
+++ trunk/ccm-cms/src/com/arsdigita/cms/ContentSection.java 2013-02-02 18:23:47 UTC (rev 2468)
@@ -124,6 +124,9 @@
protected static final String WF_TEMPLATES = "associatedWorkflowTemplates";
private final static String ITEM_QUERY = "com.arsdigita.cms.ItemsInSection";
private final static String SECTION_ID = "sectionId";
+
+ private static final CMSConfig s_config = CMSConfig.getInstance();
+/* DO NOT use CMSConfig constructor to instantiate !
private static final CMSConfig s_config = new CMSConfig();
static {
@@ -131,6 +134,7 @@
s_config.load();
s_log.debug("Static initializer finished...");
}
+*/
// Cached properties
PageResolver m_pageResolver = null;
ItemResolver m_itemResolver = null;
Modified: trunk/ccm-cms/src/com/arsdigita/cms/Initializer.java
===================================================================
--- trunk/ccm-cms/src/com/arsdigita/cms/Initializer.java 2013-02-02 18:09:36 UTC (rev 2467)
+++ trunk/ccm-cms/src/com/arsdigita/cms/Initializer.java 2013-02-02 18:23:47 UTC (rev 2468)
@@ -40,6 +40,7 @@
import com.arsdigita.cms.search.LuceneQueryEngine;
import com.arsdigita.cms.search.VersionFilterType;
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
+import com.arsdigita.cms.util.LanguageUtil;
import com.arsdigita.cms.workflow.CMSEngine;
import com.arsdigita.cms.workflow.CMSTask;
import com.arsdigita.cms.workflow.CMSTaskType;
@@ -51,6 +52,7 @@
import com.arsdigita.domain.DomainObjectInstantiator;
import com.arsdigita.domain.xml.TraversalHandler;
import com.arsdigita.kernel.ACSObjectInstantiator;
+import com.arsdigita.kernel.Kernel;
import com.arsdigita.kernel.NoValidURLException;
import com.arsdigita.kernel.URLFinder;
import com.arsdigita.kernel.URLFinderNotFoundException;
@@ -72,17 +74,13 @@
import com.arsdigita.search.filters.ContentSectionFilterType;
import com.arsdigita.search.filters.ObjectTypeFilterType;
import com.arsdigita.search.filters.PermissionFilterType;
+import com.arsdigita.templating.PatternStylesheetResolver;
import com.arsdigita.util.UncheckedWrapperException;
import com.arsdigita.workflow.simple.Engine;
import com.arsdigita.workflow.simple.Workflow;
import com.arsdigita.workflow.simple.WorkflowTemplate;
-
import com.arsdigita.xml.XML;
-import com.arsdigita.templating.PatternStylesheetResolver;
-import com.arsdigita.cms.util.LanguageUtil;
-import com.arsdigita.kernel.Kernel;
-
import org.apache.log4j.Logger;
Modified: trunk/ccm-cms/src/com/arsdigita/cms/LoaderConfig.java
===================================================================
--- trunk/ccm-cms/src/com/arsdigita/cms/LoaderConfig.java 2013-02-02 18:09:36 UTC (rev 2467)
+++ trunk/ccm-cms/src/com/arsdigita/cms/LoaderConfig.java 2013-02-02 18:23:47 UTC (rev 2468)
@@ -28,9 +28,9 @@
// IMPLEMENTATION NOTE
// Class is a result of migrating the old enterprise.init based
-// initialization process and not yet completed. Functionality is
-// basically OK so far, but code urgently needs cleaning up and a
-// check for useful bits.
+// initialization process. Functionality is basically OK so far, but
+// code urgently needs cleaning up and a check for useful bits.
+
/**
* Container for various configuration parameters for ccm-cms package loader.
*
Modified: trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/AbstractContentTypeLoader.java
===================================================================
--- trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/AbstractContentTypeLoader.java 2013-02-02 18:09:36 UTC (rev 2467)
+++ trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/AbstractContentTypeLoader.java 2013-02-02 18:23:47 UTC (rev 2468)
@@ -36,7 +36,7 @@
import com.arsdigita.runtime.ScriptContext;
import com.arsdigita.util.Assert;
import com.arsdigita.util.UncheckedWrapperException;
-import com.arsdigita.workflow.simple.TaskCollection;
+// import com.arsdigita.workflow.simple.TaskCollection;
import com.arsdigita.workflow.simple.WorkflowTemplate;
import com.arsdigita.xml.XML;
import java.io.BufferedReader;
Deleted: trunk/ccm-core/src/com/arsdigita/dispatcher/ParameterProvider.java.nolongerInUse
===================================================================
--- trunk/ccm-core/src/com/arsdigita/dispatcher/ParameterProvider.java.nolongerInUse 2013-02-02 18:09:36 UTC (rev 2467)
+++ trunk/ccm-core/src/com/arsdigita/dispatcher/ParameterProvider.java.nolongerInUse 2013-02-02 18:23:47 UTC (rev 2468)
@@ -1,26 +0,0 @@
-/*
- * 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.dispatcher;
-/**
- * @deprecated use com.arsdigita.util.ParameterProvider instead
- * @see com.arsdigita.util.ParameterProvider
- */
-public interface ParameterProvider extends com.arsdigita.util.ParameterProvider
-{
-}
Deleted: trunk/ccm-core/src/com/arsdigita/search/LegacyInitializer.java.nolongerInUse
===================================================================
--- trunk/ccm-core/src/com/arsdigita/search/LegacyInitializer.java.nolongerInUse 2013-02-02 18:09:36 UTC (rev 2467)
+++ trunk/ccm-core/src/com/arsdigita/search/LegacyInitializer.java.nolongerInUse 2013-02-02 18:23:47 UTC (rev 2468)
@@ -1,62 +0,0 @@
-/*
- * 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.search;
-
-import com.arsdigita.initializer.Configuration;
-import com.arsdigita.initializer.InitializationException;
-
-import com.arsdigita.domain.GlobalObserverManager;
-
-import org.apache.log4j.Logger;
-
-/**
- * This initializer (which will soon go away) activates
- * the appropriate search engine.
- * There are no APIs intended for public use in this class
- */
-@Deprecated
-public class LegacyInitializer
- implements com.arsdigita.initializer.Initializer {
-
- private Configuration m_conf = new Configuration();
-
- private static final Logger s_log =
- Logger.getLogger(LegacyInitializer.class);
-
- public LegacyInitializer() throws InitializationException {
- }
-
- public Configuration getConfiguration() {
- return m_conf;
- }
-
- public void startup() {
- if (Search.getConfig().getIndexerType().getObserver() != null) {
- s_log.info("registering observer for indexer: " + Search.getConfig().getIndexerType());
- GlobalObserverManager gom = GlobalObserverManager.getManager();
- gom.addObserver(new SearchObserver());
- } else {
- s_log.info("Not registering a search observer");
- }
-
- }
-
- public void shutdown() {}
-
-}
Deleted: trunk/ccm-core/src/com/arsdigita/search/SearchDataQuery.java.nolongerInUse
===================================================================
--- trunk/ccm-core/src/com/arsdigita/search/SearchDataQuery.java.nolongerInUse 2013-02-02 18:09:36 UTC (rev 2467)
+++ trunk/ccm-core/src/com/arsdigita/search/SearchDataQuery.java.nolongerInUse 2013-02-02 18:23:47 UTC (rev 2468)
@@ -1,35 +0,0 @@
-/*
- * 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.search;
-
-import com.arsdigita.persistence.Session;
-
-/**
- * @deprecated moved to com.arsdigita.search.intermedia package
- * @see com.arsdigita.search.intermedia.SearchDataQuery
- **/
-
-public class SearchDataQuery
- extends com.arsdigita.search.intermedia.SearchDataQuery {
-
- public SearchDataQuery(Session s, String sql, String[] columns) {
- super(s, sql, columns);
- }
-
-}
Deleted: trunk/ccm-core/src/com/arsdigita/search/SearchIndexHelp.java.nolongerInUse
===================================================================
--- trunk/ccm-core/src/com/arsdigita/search/SearchIndexHelp.java.nolongerInUse 2013-02-02 18:09:36 UTC (rev 2467)
+++ trunk/ccm-core/src/com/arsdigita/search/SearchIndexHelp.java.nolongerInUse 2013-02-02 18:23:47 UTC (rev 2468)
@@ -1,28 +0,0 @@
-/*
- * 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.search;
-
-/**
- * @deprecated moved to com.arsdigita.search.intermedia package
- * @see com.arsdigita.search.intermedia.SearchIndexHelp
- **/
-
-public class SearchIndexHelp
- extends com.arsdigita.search.intermedia.SearchIndexHelp {
-}
Deleted: trunk/ccm-core/src/com/arsdigita/search/SearchIndexHelpCustomize.java.nolongerInUse
===================================================================
--- trunk/ccm-core/src/com/arsdigita/search/SearchIndexHelpCustomize.java.nolongerInUse 2013-02-02 18:09:36 UTC (rev 2467)
+++ trunk/ccm-core/src/com/arsdigita/search/SearchIndexHelpCustomize.java.nolongerInUse 2013-02-02 18:23:47 UTC (rev 2468)
@@ -1,29 +0,0 @@
-/*
- * 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.search;
-
-/**
- * @deprecated moved to com.arsdigita.search.intermedia package
- * @see com.arsdigita.search.intermedia.SearchIndexHelpCustomize
- **/
-
-public interface SearchIndexHelpCustomize
- extends com.arsdigita.search.intermedia.SearchIndexHelpCustomize {
-
-}
Deleted: trunk/ccm-core/src/com/arsdigita/search/SearchSpecification.java.nolongerInUse
===================================================================
--- trunk/ccm-core/src/com/arsdigita/search/SearchSpecification.java.nolongerInUse 2013-02-02 18:09:36 UTC (rev 2467)
+++ trunk/ccm-core/src/com/arsdigita/search/SearchSpecification.java.nolongerInUse 2013-02-02 18:23:47 UTC (rev 2468)
@@ -1,60 +0,0 @@
-/*
- * 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.search;
-
-
-/**
- * @deprecated moved to com.arsdigita.search.intermedia package
- * @see com.arsdigita.search.intermedia.SearchSpecification
- **/
-
-public class SearchSpecification
- extends com.arsdigita.search.intermedia.SearchSpecification{
-
-
- /**
- * Create a SearchSpecification object.
- * @param sql Sql select statement to perform the search. See
- * example above.
- * @param columns The names of columns returned by the
- * search.
- * @param maxRows The maximum number of result rows retrieved
- * by the search.
- * @param rowsPerPage The maximum number of rows per result
- * page returned by method getPage.
- **/
- public SearchSpecification(String sql, String[] columns,
- int maxRows, int rowsPerPage) {
-
- super(sql, columns, maxRows, rowsPerPage);
- }
-
- /**
- * Create a SearchSpecification object, using the default values
- * for maxRows and rowsPerPage.
- * @param sql Sql select statement to perform the search. See
- * example above.
- * @param columns The names of columns returned by the
- * search.
- **/
- public SearchSpecification(String sql, String[] columns) {
- super(sql, columns);
- }
-
-}
Deleted: trunk/ccm-core/src/com/arsdigita/search/Searchable.java.nolongerInUse
===================================================================
--- trunk/ccm-core/src/com/arsdigita/search/Searchable.java.nolongerInUse 2013-02-02 18:09:36 UTC (rev 2467)
+++ trunk/ccm-core/src/com/arsdigita/search/Searchable.java.nolongerInUse 2013-02-02 18:23:47 UTC (rev 2468)
@@ -1,26 +0,0 @@
-/*
- * 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.search;
-/**
- * @deprecated moved to com.arsdigita.search.intermedia package
- * @see com.arsdigita.search.intermedia.SearchableACSObject
- **/
-
-public interface Searchable extends com.arsdigita.search.intermedia.Searchable {
-}
Deleted: trunk/ccm-core/src/com/arsdigita/search/SearchableACSObject.java.nolongerInUse
===================================================================
--- trunk/ccm-core/src/com/arsdigita/search/SearchableACSObject.java.nolongerInUse 2013-02-02 18:09:36 UTC (rev 2467)
+++ trunk/ccm-core/src/com/arsdigita/search/SearchableACSObject.java.nolongerInUse 2013-02-02 18:23:47 UTC (rev 2468)
@@ -1,49 +0,0 @@
-/*
- * 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.search;
-
-import com.arsdigita.domain.DataObjectNotFoundException;
-
-import com.arsdigita.domain.DataObjectNotFoundException;
-import com.arsdigita.persistence.DataObject;
-import com.arsdigita.persistence.OID;
-import com.arsdigita.persistence.metadata.ObjectType;
-
-
-/**
- * @deprecated moved to com.arsdigita.search.intermedia package
- * @see com.arsdigita.search.intermedia.SearchableACSObject
- **/
-
-public abstract class SearchableACSObject
- extends com.arsdigita.search.intermedia.SearchableACSObject {
-
- public SearchableACSObject(DataObject SearchableACSObjectData) {
- super(SearchableACSObjectData);
- }
- public SearchableACSObject(String typeName) {
- super(typeName);
- }
- public SearchableACSObject(ObjectType type) {
- super(type);
- }
- public SearchableACSObject(OID oid) throws DataObjectNotFoundException {
- super(oid);
- }
-}
Deleted: trunk/ccm-core/src/com/arsdigita/search/SearchableObserver.java.nolongerInUse
===================================================================
--- trunk/ccm-core/src/com/arsdigita/search/SearchableObserver.java.nolongerInUse 2013-02-02 18:09:36 UTC (rev 2467)
+++ trunk/ccm-core/src/com/arsdigita/search/SearchableObserver.java.nolongerInUse 2013-02-02 18:23:47 UTC (rev 2468)
@@ -1,38 +0,0 @@
-/*
- * 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.search;
-
-
-/**
- * @deprecated moved to com.arsdigita.search.intermedia package
- * @see com.arsdigita.search.intermedia.SearchableObserver
- **/
-public class SearchableObserver
- extends com.arsdigita.search.intermedia.SearchableObserver {
-
- /**
- * Constructor. Makes sure that only objects that implement Searchable
- * use this observer.
- **/
-
- public SearchableObserver(Searchable searchableObject) {
- super(searchableObject);
- }
-
-}
Deleted: trunk/ccm-core/src/com/arsdigita/search/SimpleSearchSpecification.java.nolongerInUse
===================================================================
--- trunk/ccm-core/src/com/arsdigita/search/SimpleSearchSpecification.java.nolongerInUse 2013-02-02 18:09:36 UTC (rev 2467)
+++ trunk/ccm-core/src/com/arsdigita/search/SimpleSearchSpecification.java.nolongerInUse 2013-02-02 18:23:47 UTC (rev 2468)
@@ -1,33 +0,0 @@
-/*
- * 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.search;
-
-
-/**
- * @deprecated moved to com.arsdigita.search.intermedia package
- * @see com.arsdigita.search.intermedia.SimpleSearchSpecification
- **/
-public class SimpleSearchSpecification
- extends com.arsdigita.search.intermedia.SimpleSearchSpecification {
-
- public SimpleSearchSpecification(String object_type,
- String searchString) {
- super(object_type, searchString);
- }
-}
Deleted: trunk/ccm-core/src/com/arsdigita/search/lucene/LegacyInitializer.java.nolongerInUse
===================================================================
--- trunk/ccm-core/src/com/arsdigita/search/lucene/LegacyInitializer.java.nolongerInUse 2013-02-02 18:09:36 UTC (rev 2467)
+++ trunk/ccm-core/src/com/arsdigita/search/lucene/LegacyInitializer.java.nolongerInUse 2013-02-02 18:23:47 UTC (rev 2468)
@@ -1,132 +0,0 @@
-/*
- * Copyright (C) 2003-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.search.lucene;
-
-import com.arsdigita.initializer.Configuration;
-import com.arsdigita.initializer.InitializationException;
-import com.arsdigita.search.FilterType;
-import com.arsdigita.search.IndexerType;
-import com.arsdigita.search.QueryEngineRegistry;
-import com.arsdigita.search.Search;
-import com.arsdigita.search.filters.CategoryFilterType;
-import com.arsdigita.search.filters.ObjectTypeFilterType;
-import com.arsdigita.search.filters.PermissionFilterType;
-import java.io.File;
-import java.io.IOException;
-import java.util.Date;
-import org.apache.log4j.Logger;
-import org.apache.lucene.analysis.Analyzer;
-import org.apache.lucene.index.IndexReader;
-import org.apache.lucene.index.IndexWriter;
-import org.apache.lucene.search.BooleanQuery;
-
-/**
- * LegacyInitializer
- *
- * Initializes the Lucene package
- *
- * @author Richard Su (ric...@al...)
- * @version $Id: LegacyInitializer.java 1044 2005-12-09 13:21:16Z sskracic $
- *
- * @deprecated no longer in use, replaced by new Initializer. May be deleted.
- */
-public class LegacyInitializer implements com.arsdigita.initializer.Initializer {
-
- private static final Logger LOG = Logger.getLogger(LegacyInitializer.class);
-
- // public final static Loader LOADER = new IndexId.LoaderImpl();
-
- private Configuration m_conf = new Configuration();
-
- /**
- *
- */
- public LegacyInitializer() {}
-
- /**
- *
- * @return
- */
- public Configuration getConfiguration() {
- return m_conf;
- }
-
- /*
- * Called on startup.
- * @throws InitializationException
- */
- public void startup() {
- if (Search.getConfig().isLuceneEnabled()) {
- LuceneConfig conf = LuceneConfig.getConfig();
- String location = conf.getIndexLocation();
- int interval = conf.getIndexerInterval();
- Analyzer analyzer = conf.getAnalyzer();
- LOG.info("Lucene index location: " + location);
- LOG.info("Lucene Analyzer = " + analyzer.getClass().getName());
- BooleanQuery.setMaxClauseCount(Integer.MAX_VALUE);
-
- try {
- if (!IndexReader.indexExists(location)) {
- File f = new File(location);
- f.mkdirs();
- IndexWriter iw = new IndexWriter
- (location, analyzer, true);
- iw.close();
- LOG.info("Lucene created index directory");
- }
- } catch (IOException ex) {
- throw new InitializationException
- ("lucene index id has not been initialized", ex);
- }
-
- Index.setLocation(location);
- // FIXME: This is a hack. Delay the start of the timer task by 5
- // seconds and keep your fingers crosses in hopes that
- // Index.getIndexerID() will be ready to return a valid value by
- // then. -- va...@re..., 2004-01-07
- Date delayedStart = new Date(System.currentTimeMillis() + 5000L);
- Index.getTimer().schedule
- (new Indexer(Index.getLocation()),
- delayedStart,
- ((long)interval * 1000l));
-
- QueryEngineRegistry.registerEngine
- (IndexerType.LUCENE, new FilterType[] {
- new CategoryFilterType(),
- new ObjectTypeFilterType(),
- new PermissionFilterType()
- },
- new BaseQueryEngine());
- }
- }
-
- /**
- * Called on shutdown. It's probably not a good idea to depend on this
- * being called.
- **/
- public void shutdown() {
- }
-
-// /**
-// * Only used by <code>CoreLoader</code>.
-// **/
-// public interface Loader {
-// void load();
-// }
-}
Deleted: trunk/ccm-core/src/com/arsdigita/search/lucene/enterprise.init.nolongerInUse
===================================================================
--- trunk/ccm-core/src/com/arsdigita/search/lucene/enterprise.init.nolongerInUse 2013-02-02 18:09:36 UTC (rev 2467)
+++ trunk/ccm-core/src/com/arsdigita/search/lucene/enterprise.init.nolongerInUse 2013-02-02 18:23:47 UTC (rev 2468)
@@ -1,7 +0,0 @@
-// file: com.arsdigita.search.lucene.enterprise.init
-
-
-
-// As of version 6.5.x still in use!
-init com.arsdigita.search.lucene.LegacyInitializer {}
-
Deleted: trunk/ccm-core/src/com/arsdigita/web/ApplicationSetup.java.nolongerInUse
===================================================================
--- trunk/ccm-core/src/com/arsdigita/web/ApplicationSetup.java.nolongerInUse 2013-02-02 18:09:36 UTC (rev 2467)
+++ trunk/ccm-core/src/com/arsdigita/web/ApplicationSetup.java.nolongerInUse 2013-02-02 18:23:47 UTC (rev 2468)
@@ -1,342 +0,0 @@
-/*
- * Copyright (C) 2002-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.web;
-
-import com.arsdigita.kernel.PackageType;
-import com.arsdigita.domain.DomainObjectInstantiator;
-import com.arsdigita.domain.DomainObjectFactory;
-import com.arsdigita.domain.DataObjectNotFoundException;
-import com.arsdigita.util.Assert;
-import java.util.List;
-import java.util.Iterator;
-import java.util.ArrayList;
-import org.apache.log4j.Category;
-
-/**
- * Automates the creation and setup of <code>ApplicationType</code>s.
- *
- * <pre><blockquote>
- * ApplicationSetup setup = new ApplicationSetup(s_log);
- * setup.setApplicationObjectType(SomeApp.BASE_DATA_OBJECT_TYPE);
- * setup.setKey("some-app");
- * setup.setTitle("Some App");
- * setup.setInstantiator(new ACSObjectInstantiator() {
- * protected DomainObject doNewInstance(DataObject dataObject) {
- * return new SomeApp(dataObject);
- * }
- * });
- * setup.run();
- * </blockquote></pre>
- *
- * <strong>Important note.</strong> When <code>Application</code>s are used
- * in the context of old-style apps that use <code>SiteNode</code>s and
- * <code>PackageType</code>s, it is important to use the
- * <code>setKey("some-string-key")</code> so that your new applications can
- * interoperate fluidly with the legacy applications.
- * Use of the <code>setKey</code> method ensures that your application will,
- * behind the scenes, use site nodes and package instances, in addition to the
- * <code>Application</code> object, to represent each new mountable application.
- * As a result, legacy code for managing and dispatching applications will work
- * with both your old and your new applications.
- *
- * @see com.arsdigita.web.ApplicationType
- * @author Justin Ross <<a href="mailto:jr...@re...">jr...@re...</a>>
- * @version $Id: ApplicationSetup.java 287 2005-02-22 00:29:02Z sskracic $
- * @deprecated without direct replacement.
- * Class requires ApplicationSetup.setInstantiator( ...) domain initialization
- * code which is only useful in old legacy initialization code. Initialization
- * now differentiates bitween one time loading step and recurring initialization
- * step.
- * Use ApplicationType apptype = new ApplicationType(...) and
- * Application app Application.createApplication(...) instead to create
- * new style legacy free applications.
- */
-public class ApplicationSetup {
-
- /** Appender to enable writing to the löog file. */
- protected Category m_category;
- protected String m_title = null;
- protected String m_description = null;
- protected String m_typeName = null;
- protected DomainObjectInstantiator m_instantiator = null;
-
- // Legacy fields.
-
- protected String m_key = null;
- protected PackageType m_packageType = null;
- protected boolean m_isWorkspaceApplication = true;
- protected boolean m_isSingleton = false;
- protected String m_dispatcherClass = null;
-
- /**
- * Constructor.
- *
- * @param category as appender to the log file.
- */
- public ApplicationSetup(Category category) {
- m_category = category;
- }
-
- /**
- * Sets a key for use in creating a package type and, later, site
- * node objects, as used by older applications, to match the new
- * application type.
- *
- * @param key the <code>String</code> key to use to generate a
- * package type corresponding to the new application type
- */
- public void setKey(String key) {
- m_key = key;
- }
-
- /**
- * Sets the package type to use to represent your application
- * under the older package instance and site node approach.
- *
- * @param packageType a <code>PackageType</code> to use behind the
- * new application type
- */
- public void setPackageType(PackageType packageType) {
- m_packageType = packageType;
- }
-
- /**
- * Sets the title of the installed application type.
- */
- public void setTitle(String title) {
- m_title = title;
- }
-
- /**
- * Sets the description of the installed application type.
- */
- public void setDescription(String description) {
- m_description = description;
- }
-
- /**
- * Sets the object type of the application instances this
- * application type represents.
- */
- public void setApplicationObjectType(String typeName) {
- m_typeName = typeName;
- }
-
- /**
- * Sets the instantiator used by {@link
- * com.arsdigita.domain.DomainObjectFactory} to resurrect specific
- * domain classes from data objects.
- */
- public void setInstantiator(DomainObjectInstantiator instantiator) {
- m_instantiator = instantiator;
- }
-
- /**
- * This method is an alternative to {@link
- * #setPortalApplication(boolean)}. It does the same thing.
- */
- public void setWorkspaceApplication(boolean isWorkspaceApplication) {
- m_isWorkspaceApplication = isWorkspaceApplication;
- }
-
- /**
- * Marks this applications of this type as ones that do or do not belong to
- * a "portal", a special application type that collects child applications
- * together for presentation and navigation purposes.
- *
- * By default, this value is true.
- */
- public void setPortalApplication(boolean isWorkspaceApplication) {
- m_isWorkspaceApplication = isWorkspaceApplication;
- }
-
- /**
- * Sets whether there can be more than one application of this
- * type in the system.
- *
- * The default is false.
- */
- public void setSingleton(boolean isSingleton) {
- m_isSingleton = isSingleton;
- }
-
- /**
- * Sets the dispatcher to use for appliactions of this type.
- */
- public void setDispatcherClass(String dispatcherClass) {
- m_dispatcherClass = dispatcherClass;
- }
-
- protected void notice(String message) {
- m_category.info("ApplicationType '" + m_title + "' - " + message);
- }
-
- /**
- * After all the properties are set, validates and installs the
- * specified application type.
- */
- public ApplicationType run() {
- notice("Validating setup...");
-
- List messages = validate();
-
- if (messages.size() > 0) {
- Iterator iter = messages.iterator();
- String errors = "Validation of ApplicationSetup data failed:\n";
-
- while (iter.hasNext()) {
- String msg = (String)iter.next();
- m_category.error(msg);
- errors += msg + "\n";
- }
-
- throw new RuntimeException(errors);
- }
-
- notice("Done validating.");
-
- ApplicationType applicationType = process();
- Assert.exists(applicationType, "applicationType is not null");
- applicationType.save();
-
- return applicationType;
- }
-
- protected List validate() {
- final ArrayList messages = new ArrayList();
-
- if (m_title == null) {
- messages.add("Title is not set.");
- }
-
- if (m_typeName == null) {
- messages.add("ApplicationObjectType is not set.");
- }
-
- if (m_instantiator == null) {
- messages.add("Instantiator is not set.");
- }
-
- return messages;
- }
-
- protected ApplicationType process() {
- notice("Starting setup...");
-
- ApplicationType applicationType = null;
-
- if (ApplicationType.isInstalled(m_typeName)) {
- // When migrating new code, sometimes an ApplicationType
- // exists but its corresponding PackageType does not.
- // This happens, for instance, when someone changes the
- // package key but not the object type in their app setup
- // script. To treat this case, we need to create the
- // PackageType if it isn't there, even if the
- // ApplicationType exists.
-
- if (m_key != null && !packageTypeIsInstalled(m_key)) {
- Assert.isTrue(m_packageType == null);
-
- m_category.warn
- ("ApplicationType " + m_typeName + " did not have " +
- "its corresponding PackageType " + m_key + ". Adding " +
- "one now.");
-
- PackageType packageType = new PackageType();
-
- packageType.setKey(m_key);
- packageType.setDisplayName(m_title);
- packageType.setURI("http://arsdigita.com/" + m_key);
-
- applicationType =
- ApplicationType.retrieveApplicationTypeForApplication
- (m_typeName);
-
- applicationType.setPackageType(packageType);
- applicationType.setDispatcherClass(m_dispatcherClass);
-
- packageType.save();
- applicationType.save();
- } else {
- applicationType =
- ApplicationType.retrieveApplicationTypeForApplication
- (m_typeName);
- }
- } else {
- // And, likewise, sometimes a package type is present, but
- // the application type does not yet exist.
- // ApplicationType's constructor knows how to handle this.
-
- notice("Not installed. Installing now...");
-
- notice("Using the following properties to perform install.");
- notice(" ApplicationObjectType: " + m_typeName);
- notice(" Title: " + m_title);
- notice(" Description: " + m_description);
- notice(" Instantiator: " + m_instantiator);
- notice(" IsWorkspaceApplication: " + m_isWorkspaceApplication);
- notice(" IsSingleton: " + m_isSingleton);
- notice(" Key: " + m_key);
- notice(" PackageType: " + m_packageType);
- notice(" DispatcherClass: " + m_dispatcherClass);
-
- if (m_key == null && m_packageType == null) {
- // This is a new style / legacy free application
- applicationType = new ApplicationType(m_title, m_typeName);
- } else {
- // This is a legacy application type.
-
- if (m_key == null) {
- applicationType = ApplicationType.createApplicationType
- (m_packageType, m_title, m_typeName);
- } else if (m_packageType == null) {
- applicationType = ApplicationType.createApplicationType
- (m_key, m_title, m_typeName);
-
- if (m_dispatcherClass != null) {
- applicationType.setDispatcherClass(m_dispatcherClass);
- }
- }
-
- applicationType.setWorkspaceApplication
- (m_isWorkspaceApplication);
- applicationType.setSingleton(m_isSingleton);
- }
-
- applicationType.setDescription(m_description);
-
- notice("Done installing.");
- }
-
- DomainObjectFactory.registerInstantiator(m_typeName, m_instantiator);
-
- notice("Done setting up.");
-
- return applicationType;
- }
-
- private boolean packageTypeIsInstalled(String key) {
- try {
- PackageType.findByKey(key);
- return true;
- } catch (DataObjectNotFoundException nfe) {
- return false;
- }
- }
-}
Deleted: trunk/ccm-core/src/com/arsdigita/web/LegacyAdapterServlet.java.nolongerInUse
===================================================================
--- trunk/ccm-core/src/com/arsdigita/web/LegacyAdapterServlet.java.nolongerInUse 2013-02-02 18:09:36 UTC (rev 2467)
+++ trunk/ccm-core/src/com/arsdigita/web/LegacyAdapterServlet.java.nolongerInUse 2013-02-02 18:23:47 UTC (rev 2468)
@@ -1,129 +0,0 @@
-/*
- * Copyright (C) 2002-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.web;
-
-import com.arsdigita.util.Assert;
-import com.arsdigita.util.UncheckedWrapperException;
-import com.arsdigita.web.Application;
-import com.arsdigita.kernel.PackageType;
-import com.arsdigita.dispatcher.RequestContext;
-import com.arsdigita.dispatcher.Dispatcher;
-import com.arsdigita.dispatcher.DispatcherHelper;
-import java.io.File;
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-import javax.servlet.RequestDispatcher;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import org.apache.log4j.Logger;
-
-/**
- * <p>An application servlet that does what SiteNodeDispatcher does
- * but in the context of the newer CCM dispatcher. Gets the package
- * type associated with an application and uses its dispatcher.</p>
- *
- * <p>Use web.xml entries like the following to deploy this
- * servlet:</p>
- *
- * <blockquote><pre>
- * <servlet>
- * <servlet-name>legacy-adapter</servlet-name>
- * <servlet-class>com.arsdigita.web.LegacyAdapterServlet</servlet-class>
- * </servlet>
- *
- * <servlet-mapping>
- * <servlet-name>legacy-adapter</servlet-name>
- * <url-pattern>/themes/servlet/legacy-adapter/*</url-pattern>
- * </servlet-mapping>
- * </pre></blockquote>
- *
- * @see com.arsdigita.web.DispatcherServlet
- * @see com.arsdigita.sitenode.SiteNodeDispatcher
- *
- * @author Justin Ross <<a href="mailto:jr...@re...">jr...@re...</a>>
- * @version $Id: LegacyAdapterServlet.java 287 2005-02-22 00:29:02Z sskracic $
- */
-public class LegacyAdapterServlet extends BaseApplicationServlet {
-
- private static final Logger s_log = Logger.getLogger
- (LegacyAdapterServlet.class);
-
- /**
- * <p>Fetches the dispatcher for the package type of the current
- * application and dispatches to it with the {@link
- * RequestContext} constructed in {@link
- * com.arsdigita.web.BaseApplicationServlet}.</p>
- *
- * @param app The application which is being served.
- */
- public void doService(HttpServletRequest sreq,
- HttpServletResponse sresp,
- Application app)
- throws ServletException, IOException {
- s_log.debug("LegacyAdapterServlet.doService called for request " +
- sreq);
-
- PackageType type = app.getApplicationType().getPackageType();
-
- if (s_log.isDebugEnabled()) {
- s_log.debug("Using package type '" + type.getKey() + "'");
- }
-
- Assert.exists(type, "PackageType type");
-
- String jsp = "/packages/" + type.getKey() + "/www" + sreq.getPathInfo();
- File file = new File(getServletContext().getRealPath(jsp));
-
- if (file.exists() && !file.isDirectory()) {
- // XXX Need to handle welcome files.
-
- RequestDispatcher rd = sreq.getRequestDispatcher(jsp);
-
- Assert.exists(rd, "RequestDispatcher rd");
-
- rd.forward(sreq, sresp);
- } else {
- try {
- RequestContext rc = DispatcherHelper.getRequestContext();
-
- Assert.exists(rc, "RequestContext rc");
-
- Dispatcher dispatcher = type.getDispatcher();
-
- Assert.exists(dispatcher, "Dispatcher dispatcher");
-
- if (s_log.isDebugEnabled()) {
- s_log.debug
- ("Dispatching using dispatcher '" + dispatcher + "'");
- }
-
- dispatcher.dispatch(sreq, sresp, rc);
- } catch (ClassNotFoundException cnfe) {
- throw new UncheckedWrapperException(cnfe);
- } catch (InstantiationException ie) {
- throw new UncheckedWrapperException(ie);
- } catch (IllegalAccessException iae) {
- throw new UncheckedWrapperException(iae);
- } catch (InvocationTargetException ite) {
- throw new UncheckedWrapperException(ite);
- }
- }
- }
-}
Deleted: trunk/ccm-core/src/com/arsdigita/web/LegacyInitializerServlet.java.nolongerInUse
===================================================================
--- trunk/ccm-core/src/com/arsdigita/web/LegacyInitializerServlet.java.nolongerInUse 2013-02-02 18:09:36 UTC (rev 2467)
+++ trunk/ccm-core/src/com/arsdigita/web/LegacyInitializerServlet.java.nolongerInUse 2013-02-02 18:23:47 UTC (rev 2468)
@@ -1,72 +0,0 @@
-/*
- * Copyright (C) 2003-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.web;
-
-
-// //////////////////////////////////////////////////////////////////////////
-//
-// Old initializer system based on enterprise.init scripts is no longer
-// available.
-//
-// //////////////////////////////////////////////////////////////////////////
-
-
-import com.arsdigita.developersupport.Debug;
-import com.arsdigita.initializer.Script;
-import com.arsdigita.util.ResourceManager;
-import java.io.InputStream;
-import javax.servlet.ServletException;
-
-/**
- * @author Justin Ross <jr...@re...>
- * @version $Id: LegacyInitializerServlet.java 287 2005-02-22 00:29:02Z sskracic $
- */
-public final class LegacyInitializerServlet extends BaseServlet {
-
- private Script m_initializer = null;
-
- /**
- * Starts up the web environment for the ACS by loading the specified
- * initializer script.
- */
- @Override
- protected final void doInit() throws ServletException {
- Debug.setLevel("com.arsdigita.initializer.Script", "info");
-
- final String script = getServletConfig().getInitParameter("init");
-
- final ResourceManager rm = ResourceManager.getInstance();
- rm.setServletContext(getServletContext());
-
- final InputStream is = rm.getResourceAsStream(script);
-
- if (is == null) {
- throw new ServletException("Couldn't find " + script);
- }
-
- m_initializer = new Script(is);
- m_initializer.startup();
- }
-
- @Override
- protected final void doDestroy() {
- m_initializer.shutdown();
- m_initializer = null;
- }
-}
Modified: trunk/ccm-themedirector/src/com/arsdigita/themedirector/Loader.java
===================================================================
--- trunk/ccm-themedirector/src/com/arsdigita/themedirector/Loader.java 2013-02-02 18:09:36 UTC (rev 2467)
+++ trunk/ccm-themedirector/src/com/arsdigita/themedirector/Loader.java 2013-02-02 18:23:47 UTC (rev 2468)
@@ -23,8 +23,8 @@
import com.arsdigita.kernel.KernelExcursion;
import com.arsdigita.loader.PackageLoader;
import com.arsdigita.runtime.ScriptContext;
+import com.arsdigita.web.Application;
import com.arsdigita.web.ApplicationType;
-import com.arsdigita.web.Application;
import org.apache.log4j.Logger;
|