diff --git a/ccm-atoz/src/ccm-atoz.config b/ccm-atoz/src/ccm-atoz.config
new file mode 100755
index 000000000..1c35d0e33
--- /dev/null
+++ b/ccm-atoz/src/ccm-atoz.config
@@ -0,0 +1,5 @@
+
+
+
+
diff --git a/ccm-atoz/src/ccm-ldn-atoz.load b/ccm-atoz/src/ccm-atoz.load
similarity index 70%
rename from ccm-atoz/src/ccm-ldn-atoz.load
rename to ccm-atoz/src/ccm-atoz.load
index 5a5c61b25..3d3de4fbc 100755
--- a/ccm-atoz/src/ccm-ldn-atoz.load
+++ b/ccm-atoz/src/ccm-atoz.load
@@ -1,4 +1,5 @@
+
@@ -6,12 +7,15 @@
+
-
+
+
-
-
+
+
+
diff --git a/ccm-atoz/src/ccm-atoz.upgrade b/ccm-atoz/src/ccm-atoz.upgrade
new file mode 100755
index 000000000..71f6dc794
--- /dev/null
+++ b/ccm-atoz/src/ccm-atoz.upgrade
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ccm-atoz/src/ccm-ldn-atoz.config b/ccm-atoz/src/ccm-ldn-atoz.config
deleted file mode 100755
index 9e66eec0f..000000000
--- a/ccm-atoz/src/ccm-ldn-atoz.config
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
diff --git a/ccm-atoz/src/ccm-ldn-atoz.upgrade b/ccm-atoz/src/ccm-ldn-atoz.upgrade
deleted file mode 100755
index 13f0a5294..000000000
--- a/ccm-atoz/src/ccm-ldn-atoz.upgrade
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ccm-atoz/src/com/arsdigita/atoz/AddAtoZ.java b/ccm-atoz/src/com/arsdigita/atoz/AddAtoZ.java
index 0a63ac698..1b29e9380 100755
--- a/ccm-atoz/src/com/arsdigita/atoz/AddAtoZ.java
+++ b/ccm-atoz/src/com/arsdigita/atoz/AddAtoZ.java
@@ -1,7 +1,22 @@
-package com.arsdigita.atoz;
+/*
+ * 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
+ */
-import org.apache.commons.cli.CommandLine;
-import org.apache.log4j.Logger;
+package com.arsdigita.atoz;
import com.arsdigita.domain.DomainObject;
import com.arsdigita.domain.DomainObjectFactory;
@@ -13,17 +28,31 @@ import com.arsdigita.london.util.Transaction;
import com.arsdigita.persistence.DataObject;
import com.arsdigita.web.Application;
+import org.apache.commons.cli.CommandLine;
+import org.apache.log4j.Logger;
+
+/**
+ * Command line utility to create an application instance of AtoZ.
+ *
+ * Usually Loader creates a (default) application instance.
+ *
+ */
public class AddAtoZ extends Program {
private static final Logger LOG = Logger.getLogger(AddAtoZ.class);
+ /**
+ * Default Constructor
+ */
public AddAtoZ() {
super("Add AtoZ instance", "1.0.0", "URL-FRAGMENT TITLE");
}
private void addAtoZ(String atozURL, String atozTitle) {
+
if (!Application.isInstalled(AtoZ.BASE_DATA_OBJECT_TYPE, "/"+atozURL+"/")) {
+
DomainObjectFactory.registerInstantiator(
AtoZ.BASE_DATA_OBJECT_TYPE, new DomainObjectInstantiator() {
public DomainObject doNewInstance(DataObject dataObject) {
@@ -33,10 +62,13 @@ public class AddAtoZ extends Program {
Application app = Application.createApplication(
AtoZ.BASE_DATA_OBJECT_TYPE, atozURL, atozTitle, null);
app.save();
+
} else {
+
System.err.println(AtoZ.BASE_DATA_OBJECT_TYPE
+ " already installed at " + atozURL);
System.exit(1);
+
}
}
@@ -46,6 +78,7 @@ public class AddAtoZ extends Program {
new KernelExcursion() {
public void excurse() {
setEffectiveParty(Kernel.getSystemParty());
+
String[] args = cmdLine.getArgs();
if (args.length == 2) {
String atozURL = args[0];
diff --git a/ccm-atoz/src/com/arsdigita/atoz/AtoZ.java b/ccm-atoz/src/com/arsdigita/atoz/AtoZ.java
index cd2877a09..82b72fe16 100755
--- a/ccm-atoz/src/com/arsdigita/atoz/AtoZ.java
+++ b/ccm-atoz/src/com/arsdigita/atoz/AtoZ.java
@@ -18,25 +18,33 @@
package com.arsdigita.atoz;
+import com.arsdigita.domain.DomainObjectFactory;
+import com.arsdigita.domain.DomainCollection;
import com.arsdigita.persistence.DataObject;
import com.arsdigita.persistence.DataCollection;
import com.arsdigita.persistence.OID;
-
-import com.arsdigita.domain.DomainObjectFactory;
-import com.arsdigita.domain.DomainCollection;
-
-import com.arsdigita.web.Application;
-
-import com.arsdigita.xml.Element;
-
import com.arsdigita.util.Assert;
+import com.arsdigita.web.Application;
+import com.arsdigita.xml.Element;
import java.util.List;
import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Set;
+
import org.apache.log4j.Logger;
/**
- * Base class of the AtoZ application (module)
+ * Application domain class and main entry ponit of AtoZ application (package).
+ *
+ * The package enables a site to present content in alphabetical oder as an
+ * additional service to it's users. The content tp present is retrieved from
+ * the storage by 'providers'. A generic provider for content items is part
+ * of the package, additional specialized providers may provide specific kind
+ * of content.
+ *
+ * It manages an registry of available providers which generate the content for
+ * specific content types and provides an entry point for the UI.
*
*/
public class AtoZ extends Application {
@@ -49,6 +57,10 @@ public class AtoZ extends Application {
/* Convenient Strings */
public static final String PROVIDERS = "atozProviders";
public static final String SORT_KEY = "sortKey";
+
+ /** Internal registry of available providers. A provider delivers for a
+ * specific content type the title to include in AtoZ list. */
+ private static Set s_types = new HashSet();
/** Config object containing various parameter */
private static final AtoZConfig s_config = AtoZConfig.getConfig();
@@ -115,6 +127,21 @@ public class AtoZ extends Application {
"http://xmlns.redhat.com/atoz/1.0");
}
+ /**
+ * Adds a provider type to the internal list of providers (provider registry).
+ * Specifically used by Initializer(s) to incorporate additional providers.
+ *
+ * @param type
+ */
+ public static void registerProviderType(AtoZProviderType type) {
+ s_types.add(type);
+ }
+
+ public static AtoZProviderType[] getProviderTypes() {
+ return (AtoZProviderType[])s_types
+ .toArray(new AtoZProviderType[s_types.size()]);
+ }
+
// /*
// * Application specific method only required if installed in its own
// * web application context
@@ -139,13 +166,13 @@ public class AtoZ extends Application {
* com.arsdigita.web.ApplicationFileServlet
*
* template-path
- * /templates/ccm-ldn-atoz
+ * /templates/ccm-atoz
*
*
*
*
* atoz-files
- * /ccm-ldn-atoz/files/*
+ * /ccm-atoz/files/*
*
*
* @return path name to the applications servlet/JSP
diff --git a/ccm-atoz/src/com/arsdigita/atoz/AtoZAtomicEntry.java b/ccm-atoz/src/com/arsdigita/atoz/AtoZAtomicEntry.java
index 445a28444..eb8e5d28a 100755
--- a/ccm-atoz/src/com/arsdigita/atoz/AtoZAtomicEntry.java
+++ b/ccm-atoz/src/com/arsdigita/atoz/AtoZAtomicEntry.java
@@ -21,6 +21,10 @@ package com.arsdigita.atoz;
import com.arsdigita.xml.Element;
+/**
+ *
+ *
+ */
public interface AtoZAtomicEntry extends AtoZEntry {
String getLink();
Element getContent();
diff --git a/ccm-atoz/src/com/arsdigita/atoz/AtoZCategoryAlias.java b/ccm-atoz/src/com/arsdigita/atoz/AtoZCategoryAlias.java
index 0957b6afa..5ab867e1f 100644
--- a/ccm-atoz/src/com/arsdigita/atoz/AtoZCategoryAlias.java
+++ b/ccm-atoz/src/com/arsdigita/atoz/AtoZCategoryAlias.java
@@ -38,7 +38,7 @@ public class AtoZCategoryAlias extends DomainObject {
private static final Logger s_log = Logger.getLogger(AtoZCategoryAlias.class);
public static final String BASE_DATA_OBJECT_TYPE =
- "com.arsdigita.london.atoz.AtoZCategoryAlias";
+ "com.arsdigita.atoz.AtoZCategoryAlias";
public static final String ID = "id";
public static final String PROVIDER = "provider";
@@ -111,7 +111,7 @@ public class AtoZCategoryAlias extends DomainObject {
return Sequences.getNextValue();
} catch (SQLException e) {
final String errorMsg = "Unable to generate a unique " +
- "ACSObject id.";
+ "ACSObject id.";
s_log.error(errorMsg);
throw PersistenceException.newInstance(errorMsg, e);
}
diff --git a/ccm-atoz/src/com/arsdigita/atoz/AtoZCategoryGenerator.java b/ccm-atoz/src/com/arsdigita/atoz/AtoZCategoryGenerator.java
index f3dbc8db5..c72f4f701 100755
--- a/ccm-atoz/src/com/arsdigita/atoz/AtoZCategoryGenerator.java
+++ b/ccm-atoz/src/com/arsdigita/atoz/AtoZCategoryGenerator.java
@@ -21,7 +21,6 @@ package com.arsdigita.atoz;
import com.arsdigita.persistence.DataQuery;
import com.arsdigita.persistence.OID;
import com.arsdigita.persistence.Filter;
-
import com.arsdigita.web.ParameterMap;
import com.arsdigita.web.URL;
import com.arsdigita.web.Web;
@@ -32,10 +31,15 @@ import java.util.ArrayList;
/**
*
- * @author pb
+ *
*/
-public class AtoZCategoryGenerator extends AbstractAtoZGenerator {
+public class AtoZCategoryGenerator extends AtoZGeneratorAbstractImpl {
+ /**
+ * Constructor
+ *
+ * @param provider
+ */
public AtoZCategoryGenerator(AtoZCategoryProvider provider) {
super(provider);
}
diff --git a/ccm-atoz/src/com/arsdigita/atoz/AtoZCategoryProvider.java b/ccm-atoz/src/com/arsdigita/atoz/AtoZCategoryProvider.java
index e39b7a362..56a4fdf46 100755
--- a/ccm-atoz/src/com/arsdigita/atoz/AtoZCategoryProvider.java
+++ b/ccm-atoz/src/com/arsdigita/atoz/AtoZCategoryProvider.java
@@ -18,8 +18,6 @@
package com.arsdigita.atoz;
-import org.apache.log4j.Logger;
-
import com.arsdigita.categorization.Category;
import com.arsdigita.cms.ContentType;
import com.arsdigita.domain.DomainCollection;
@@ -34,12 +32,20 @@ import com.arsdigita.persistence.DataQuery;
import com.arsdigita.persistence.OID;
import com.arsdigita.persistence.SessionManager;
+import org.apache.log4j.Logger;
+
+/**
+ *
+ *
+ */
public class AtoZCategoryProvider extends AtoZProvider {
- private static final Logger s_log = Logger.getLogger(AtoZCategoryProvider.class);
+ /** Private logger instance to assist debugging. */
+ private static final Logger s_log =
+ Logger.getLogger(AtoZCategoryProvider.class);
public static final String BASE_DATA_OBJECT_TYPE =
- "com.arsdigita.london.atoz.AtoZCategoryProvider";
+ "com.arsdigita.atoz.AtoZCategoryProvider";
public static final String IS_COMPOUND = "isCompound";
@@ -53,20 +59,32 @@ public class AtoZCategoryProvider extends AtoZProvider {
public static final String CT_TYPE_ID = "type_id";
- public static final String ATOMIC_ENTRIES = "com.arsdigita.london.atoz.getAtomicCategoryEntries";
+ public static final String ATOMIC_ENTRIES =
+ "com.arsdigita.atoz.getAtomicCategoryEntries";
- public static final String ATOMIC_ENTRIES_FOR_ROOT_CATEGORY = "com.arsdigita.london.atoz.getAtomicCategoryEntriesForRootCategory";
+ public static final String ATOMIC_ENTRIES_FOR_ROOT_CATEGORY =
+ "com.arsdigita.atoz.getAtomicCategoryEntriesForRootCategory";
- public static final String FILTERED_ATOMIC_ENTRIES = "com.arsdigita.london.atoz.getAtomicFilteredCategoryEntries";
+ public static final String FILTERED_ATOMIC_ENTRIES =
+ "com.arsdigita.atoz.getAtomicFilteredCategoryEntries";
- public static final String FILTERED_ATOMIC_ENTRIES_FOR_ROOT_CATEGORY = "com.arsdigita.london.atoz.getAtomicFilteredCategoryEntriesForRootCategory";
+ public static final String FILTERED_ATOMIC_ENTRIES_FOR_ROOT_CATEGORY =
+ "com.arsdigita.atoz.getAtomicFilteredCategoryEntriesForRootCategory";
- public static final String ALL_BLACK_LIST_TYPES = "com.arsdigita.london.atoz.getAllBlackListTypes";
+ public static final String ALL_BLACK_LIST_TYPES =
+ "com.arsdigita.atoz.getAllBlackListTypes";
+ /**
+ *
+ */
public AtoZCategoryProvider() {
this(BASE_DATA_OBJECT_TYPE);
}
+ /**
+ * Constructor
+ * @param type
+ */
protected AtoZCategoryProvider(String type) {
super(type);
}
@@ -145,7 +163,8 @@ public class AtoZCategoryProvider extends AtoZProvider {
while (types.next()) {
String objectType = (String)types.get("objectType");
- s_log.debug("Excluding object type from DataCollection: " + objectType);
+ s_log.debug("Excluding object type from DataCollection: "
+ + objectType);
definition.excludeSpecificObjectType(objectType);
}
types.close();
@@ -174,7 +193,8 @@ public class AtoZCategoryProvider extends AtoZProvider {
cats.setParameter("rootCategoryID", root.getID());
} else {
if(filterCats){
- cats = SessionManager.getSession().retrieveQuery(FILTERED_ATOMIC_ENTRIES);
+ cats = SessionManager.getSession()
+ .retrieveQuery(FILTERED_ATOMIC_ENTRIES);
}else{
cats = SessionManager.getSession().retrieveQuery(ATOMIC_ENTRIES);
}
diff --git a/ccm-atoz/src/com/arsdigita/atoz/AtoZConfig.java b/ccm-atoz/src/com/arsdigita/atoz/AtoZConfig.java
index 395d09bdf..f7c069ac1 100755
--- a/ccm-atoz/src/com/arsdigita/atoz/AtoZConfig.java
+++ b/ccm-atoz/src/com/arsdigita/atoz/AtoZConfig.java
@@ -58,9 +58,6 @@ public class AtoZConfig extends AbstractConfig {
return s_conf;
}
-
- /** */
- private Set m_types;
// ///////////////////////////////////////////////////////////////////////
@@ -69,32 +66,30 @@ public class AtoZConfig extends AbstractConfig {
/** Rules for configuring information in generated XML */
private Parameter m_adapters = new ResourceParameter
- ("com.arsdigita.london.atoz.traversal_adapters",
+ ("com.arsdigita.atoz.traversal_adapters",
Parameter.REQUIRED,
"/WEB-INF/resources/atoz-adapters.xml");
/** The UI widget for the Root Category Picker */
private Parameter m_rootCategoryPicker = new ClassParameter(
- "com.arsdigita.london.atoz.root_category_picker",
+ "com.arsdigita.atoz.root_category_picker",
Parameter.REQUIRED,
ApplicationCategoryPicker.class);
/** Make AtoZ use subsite-specific navigation categories. Set to true,
* and the AtoZ will use the subsite-specific navigation categories
* if you define *any* CategoryProvider */
private BooleanParameter m_useSubsiteSpecificNavigationCategory = new BooleanParameter
- ("com.arsdigita.london.atoz.use_subsite_specific_navigation_category",
+ ("com.arsdigita.atoz.use_subsite_specific_navigation_category",
Parameter.OPTIONAL,
Boolean.FALSE);
/** To filter out category without published items. If TRUE, the AtoZ
* category providers will only return Categories with published items */
private BooleanParameter m_filterCategoryProdiver = new BooleanParameter (
- "com.arsdigita.london.atoz.filterCategoryProviders",
+ "com.arsdigita.atoz.filterCategoryProviders",
Parameter.OPTIONAL,
Boolean.FALSE);
public AtoZConfig() {
- m_types = new HashSet();
-
register(m_adapters);
register(m_rootCategoryPicker);
register(m_useSubsiteSpecificNavigationCategory);
@@ -104,6 +99,10 @@ public class AtoZConfig extends AbstractConfig {
}
+ /**
+ * Provides access to the traversal adapter as stream.
+ * @return
+ */
InputStream getTraversalAdapters() {
return (InputStream)get(m_adapters);
}
@@ -112,15 +111,6 @@ public class AtoZConfig extends AbstractConfig {
return (Class)get(m_rootCategoryPicker);
}
- public void registerProviderType(AtoZProviderType type) {
- m_types.add(type);
- }
-
- public AtoZProviderType[] getProviderTypes() {
- return (AtoZProviderType[])m_types
- .toArray(new AtoZProviderType[m_types.size()]);
- }
-
public boolean useSubsiteSpecificNavigationCategory() {
return ((Boolean) get(m_useSubsiteSpecificNavigationCategory)).booleanValue();
}
diff --git a/ccm-atoz/src/com/arsdigita/atoz/AtoZEntry.java b/ccm-atoz/src/com/arsdigita/atoz/AtoZEntry.java
index d0301dbf6..ec86da6d1 100755
--- a/ccm-atoz/src/com/arsdigita/atoz/AtoZEntry.java
+++ b/ccm-atoz/src/com/arsdigita/atoz/AtoZEntry.java
@@ -18,8 +18,6 @@
package com.arsdigita.atoz;
-
-
public interface AtoZEntry {
String getTitle();
String getDescription();
diff --git a/ccm-atoz/src/com/arsdigita/atoz/AbstractAtoZGenerator.java b/ccm-atoz/src/com/arsdigita/atoz/AtoZGeneratorAbstractImpl.java
similarity index 89%
rename from ccm-atoz/src/com/arsdigita/atoz/AbstractAtoZGenerator.java
rename to ccm-atoz/src/com/arsdigita/atoz/AtoZGeneratorAbstractImpl.java
index d9af0fafd..8b6573ce1 100755
--- a/ccm-atoz/src/com/arsdigita/atoz/AbstractAtoZGenerator.java
+++ b/ccm-atoz/src/com/arsdigita/atoz/AtoZGeneratorAbstractImpl.java
@@ -20,11 +20,11 @@ package com.arsdigita.atoz;
-public abstract class AbstractAtoZGenerator implements AtoZGenerator {
+public abstract class AtoZGeneratorAbstractImpl implements AtoZGenerator {
private AtoZProvider m_provider;
- public AbstractAtoZGenerator(AtoZProvider provider) {
+ public AtoZGeneratorAbstractImpl(AtoZProvider provider) {
m_provider = provider;
}
diff --git a/ccm-atoz/src/com/arsdigita/atoz/AtoZItemGenerator.java b/ccm-atoz/src/com/arsdigita/atoz/AtoZItemGenerator.java
index 66f606a6d..bdd3df771 100755
--- a/ccm-atoz/src/com/arsdigita/atoz/AtoZItemGenerator.java
+++ b/ccm-atoz/src/com/arsdigita/atoz/AtoZItemGenerator.java
@@ -34,7 +34,7 @@ import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
-public class AtoZItemGenerator extends AbstractAtoZGenerator {
+public class AtoZItemGenerator extends AtoZGeneratorAbstractImpl {
public AtoZItemGenerator(AtoZItemProvider provider) {
super(provider);
@@ -72,9 +72,9 @@ public class AtoZItemGenerator extends AbstractAtoZGenerator {
live = item.getLiveVersion();
if (live != null) {
// should always be a ContentPage
- description = (live instanceof ContentPage) ? ((ContentPage) live)
- .getSearchSummary()
- : live.getName();
+ description = (live instanceof ContentPage)
+ ? ((ContentPage) live).getSearchSummary()
+ : live.getName();
title = "";
if (entries.get("aliasTitle") != null) {
title = entries.get("aliasTitle").toString();
diff --git a/ccm-atoz/src/com/arsdigita/atoz/AtoZItemProvider.java b/ccm-atoz/src/com/arsdigita/atoz/AtoZItemProvider.java
index cab3f0dc0..33f7cb14c 100755
--- a/ccm-atoz/src/com/arsdigita/atoz/AtoZItemProvider.java
+++ b/ccm-atoz/src/com/arsdigita/atoz/AtoZItemProvider.java
@@ -30,13 +30,14 @@ import com.arsdigita.categorization.Category;
public class AtoZItemProvider extends AtoZProvider {
- public static final String BASE_DATA_OBJECT_TYPE
- = "com.arsdigita.london.atoz.AtoZItemProvider";
+ public static final String BASE_DATA_OBJECT_TYPE =
+ "com.arsdigita.atoz.AtoZItemProvider";
public static final String CATEGORY = "category";
public static final String LOAD_PATHS = "loadPaths";
- public static final String ATOMIC_ENTRIES = "com.arsdigita.london.atoz.getAtomicItemEntries";
+ public static final String ATOMIC_ENTRIES =
+ "com.arsdigita.atoz.getAtomicItemEntries";
public AtoZItemProvider() {
this(BASE_DATA_OBJECT_TYPE);
@@ -87,7 +88,8 @@ public class AtoZItemProvider extends AtoZProvider {
}
public DomainCollection getAliases() {
- DomainCollection aliases = new DomainCollection(SessionManager.getSession().retrieve(AtoZItemAlias.BASE_DATA_OBJECT_TYPE));
+ DomainCollection aliases = new DomainCollection(SessionManager.getSession()
+ .retrieve(AtoZItemAlias.BASE_DATA_OBJECT_TYPE));
aliases.addFilter("atozItemProvider = :providerId").set("providerId", getID());
aliases.addOrder("title");
return aliases;
diff --git a/ccm-atoz/src/com/arsdigita/atoz/AtoZProvider.java b/ccm-atoz/src/com/arsdigita/atoz/AtoZProvider.java
index 9766b27f1..f6a68d7ae 100755
--- a/ccm-atoz/src/com/arsdigita/atoz/AtoZProvider.java
+++ b/ccm-atoz/src/com/arsdigita/atoz/AtoZProvider.java
@@ -31,10 +31,11 @@ import org.apache.log4j.Logger;
public abstract class AtoZProvider extends ACSObject {
+ /** Private logger instace to assist debugging */
private static final Logger s_log = Logger.getLogger(AtoZProvider.class);
- public static final String BASE_DATA_OBJECT_TYPE
- = "com.arsdigita.london.atoz.AtoZProvider";
+ public static final String BASE_DATA_OBJECT_TYPE =
+ "com.arsdigita.atoz.AtoZProvider";
public static final String TITLE = "title";
public static final String DESCRIPTION = "description";
diff --git a/ccm-atoz/src/com/arsdigita/atoz/AtoZProviderType.java b/ccm-atoz/src/com/arsdigita/atoz/AtoZProviderType.java
index d29843eb3..e23471b1c 100755
--- a/ccm-atoz/src/com/arsdigita/atoz/AtoZProviderType.java
+++ b/ccm-atoz/src/com/arsdigita/atoz/AtoZProviderType.java
@@ -26,6 +26,10 @@ import com.arsdigita.kernel.ui.ACSObjectSelectionModel;
import com.arsdigita.util.Assert;
import com.arsdigita.util.Classes;
+/**
+ *
+ * @author pb
+ */
public class AtoZProviderType {
private String m_title;
diff --git a/ccm-atoz/src/com/arsdigita/atoz/Initializer.java b/ccm-atoz/src/com/arsdigita/atoz/Initializer.java
index f9af6006a..dd7bffea2 100755
--- a/ccm-atoz/src/com/arsdigita/atoz/Initializer.java
+++ b/ccm-atoz/src/com/arsdigita/atoz/Initializer.java
@@ -18,22 +18,20 @@
package com.arsdigita.atoz;
-import com.arsdigita.atoz.siteproxy.AtoZSiteProxyProvider;
+// import com.arsdigita.atoz.siteproxy.AtoZSiteProxyProvider;
+// import com.arsdigita.atoz.siteproxy.ui.admin.SiteProxyProviderAdmin;
+// import com.arsdigita.atoz.siteproxy.ui.admin.SiteProxyProviderForm;
+
+import com.arsdigita.atoz.ui.admin.CategoryProviderAdmin;
+import com.arsdigita.atoz.ui.admin.CategoryProviderForm;
+import com.arsdigita.atoz.ui.admin.ItemProviderAdmin;
+import com.arsdigita.atoz.ui.admin.ItemProviderForm;
import com.arsdigita.db.DbHelper;
import com.arsdigita.domain.DomainObject;
import com.arsdigita.domain.DomainObjectFactory;
import com.arsdigita.domain.DomainObjectInstantiator;
import com.arsdigita.domain.xml.TraversalHandler;
import com.arsdigita.kernel.ACSObjectInstantiator;
-import com.arsdigita.london.atoz.terms.DomainProvider;
-import com.arsdigita.atoz.ui.admin.CategoryProviderAdmin;
-import com.arsdigita.atoz.ui.admin.CategoryProviderForm;
-import com.arsdigita.atoz.ui.admin.ItemProviderAdmin;
-import com.arsdigita.atoz.ui.admin.ItemProviderForm;
-import com.arsdigita.atoz.siteproxy.ui.admin.SiteProxyProviderAdmin;
-import com.arsdigita.atoz.siteproxy.ui.admin.SiteProxyProviderForm;
-import com.arsdigita.london.atoz.ui.terms.DomainProviderAdmin;
-import com.arsdigita.london.atoz.ui.terms.DomainProviderForm;
import com.arsdigita.navigation.ApplicationNavigationModel;
import com.arsdigita.navigation.DefaultNavigationModel;
import com.arsdigita.persistence.DataObject;
@@ -93,42 +91,45 @@ public class Initializer extends CompoundInitializer {
XML.parse(AtoZ.getConfig().getTraversalAdapters(),
new TraversalHandler());
+
- AtoZ.getConfig().registerProviderType(
- new AtoZProviderType("Category Provider",
- "Provides a category A-Z",
- AtoZCategoryProvider.class,
- CategoryProviderForm.class,
- CategoryProviderAdmin.class));
-
- AtoZ.getConfig().registerProviderType(
+ AtoZ.registerProviderType(
new AtoZProviderType("Item Provider",
"Provides an item A-Z",
AtoZItemProvider.class,
ItemProviderForm.class,
ItemProviderAdmin.class));
+ AtoZ.registerProviderType(
+ new AtoZProviderType("Category Provider",
+ "Provides a category A-Z",
+ AtoZCategoryProvider.class,
+ CategoryProviderForm.class,
+ CategoryProviderAdmin.class));
+
// Introduces a dependency on ccm-types-siteproxy
// Must be refactored into its own package.
- AtoZ.getConfig().registerProviderType(
+/* MOVED to ccm-atoz-siteproxy
+ AtoZ.registerProviderType(
new AtoZProviderType("SiteProxy Provider",
"Provides a SiteProxy A-Z",
AtoZSiteProxyProvider.class,
SiteProxyProviderForm.class,
SiteProxyProviderAdmin.class));
-
+*/
// Introduces dependenciy on navigation package
+ // Function / purpose ??
ApplicationNavigationModel.register(AtoZ.class.getName(),
- new DefaultNavigationModel());
+ new DefaultNavigationModel());
// Introduces dependency on ccm-ldn-typesesdervise ??
- AtoZ.getConfig().registerProviderType(
+/* AtoZ.registerProviderType(
new AtoZProviderType("ESD Toolkit Domain Provider",
"Provides a ESD Toolkit A-Z",
DomainProvider.class,
DomainProviderForm.class,
DomainProviderAdmin.class));
-
+*/
}
}
diff --git a/ccm-atoz/src/com/arsdigita/atoz/Loader.java b/ccm-atoz/src/com/arsdigita/atoz/Loader.java
index 8c31c9df6..30531f286 100755
--- a/ccm-atoz/src/com/arsdigita/atoz/Loader.java
+++ b/ccm-atoz/src/com/arsdigita/atoz/Loader.java
@@ -41,6 +41,7 @@ public class Loader extends PackageLoader {
new KernelExcursion() {
public void excurse() {
setEffectiveParty(Kernel.getSystemParty());
+
setupAtoZ();
}
}.run();
@@ -71,6 +72,7 @@ public class Loader extends PackageLoader {
ApplicationType type = setup.run();
type.save();
*/
+
/* Create new type legacy free application type
* NOTE: The wording in the title parameter of ApplicationType
* determines the name of the subdirectory for the XSL stylesheets.
@@ -81,7 +83,7 @@ public class Loader extends PackageLoader {
ApplicationType type = new ApplicationType("AtoZ",
AtoZ.BASE_DATA_OBJECT_TYPE );
type.setDescription("A-Z of content.");
- // type.setSingleton(true);
+ // type.setSingleton(true); // For later use
type.save();
if (!Application.isInstalled(AtoZ.BASE_DATA_OBJECT_TYPE,
diff --git a/ccm-atoz/src/com/arsdigita/atoz/ui/AtoZPane.java b/ccm-atoz/src/com/arsdigita/atoz/ui/AtoZPane.java
index 3a1739bb9..6b2851f56 100755
--- a/ccm-atoz/src/com/arsdigita/atoz/ui/AtoZPane.java
+++ b/ccm-atoz/src/com/arsdigita/atoz/ui/AtoZPane.java
@@ -21,7 +21,7 @@ package com.arsdigita.atoz.ui;
import com.arsdigita.bebop.PageState;
import com.arsdigita.bebop.SimpleContainer;
import com.arsdigita.bebop.parameters.StringParameter;
-import com.arsdigita.cms.dispatcher.SiteProxyPanel;
+// import com.arsdigita.cms.dispatcher.SiteProxyPanel;
import com.arsdigita.kernel.Kernel;
@@ -43,6 +43,7 @@ public class AtoZPane extends SimpleContainer {
m_letter = letter;
}
+ @Override
public void generateXML(PageState state, Element parent) {
AtoZ atoz = (AtoZ) Kernel.getContext().getResource();
AtoZGenerator[] generators = atoz.getGenerators();
@@ -74,8 +75,16 @@ public class AtoZPane extends SimpleContainer {
}
}
- private void generateAtoZ(AtoZGenerator generator, String letter,
- Element parent) {
+ /**
+ *
+ * @param generator
+ * @param letter
+ * @param parent
+ */
+ private void generateAtoZ(AtoZGenerator generator,
+ String letter,
+ Element parent) {
+
AtoZEntry[] entries = generator.getEntries(letter);
Element content = AtoZ.newElement("provider");
content.addAttribute("title", generator.getTitle());
@@ -84,6 +93,7 @@ public class AtoZPane extends SimpleContainer {
generateAtoZEntries(entries, content);
parent.addContent(content);
+
}
public void generateAtoZEntries(AtoZEntry[] entries, Element parent) {
diff --git a/ccm-atoz/src/com/arsdigita/atoz/ui/admin/AdminPane.java b/ccm-atoz/src/com/arsdigita/atoz/ui/admin/AdminPane.java
index 4390b3f24..24265ee74 100755
--- a/ccm-atoz/src/com/arsdigita/atoz/ui/admin/AdminPane.java
+++ b/ccm-atoz/src/com/arsdigita/atoz/ui/admin/AdminPane.java
@@ -66,7 +66,7 @@ public class AdminPane extends SimpleContainer {
m_createForm.addCompletionListener(new ProviderCreateComplete());
add(m_createForm);
- AtoZProviderType[] providers = AtoZ.getConfig().getProviderTypes();
+ AtoZProviderType[] providers = AtoZ.getProviderTypes();
m_providerCreateMap = new HashMap();
m_providerAdminMap = new HashMap();
@@ -85,6 +85,7 @@ public class AdminPane extends SimpleContainer {
}
}
+ @Override
public void register(Page p) {
super.register(p);
diff --git a/ccm-atoz/src/com/arsdigita/atoz/ui/admin/CategoryProviderAdmin.java b/ccm-atoz/src/com/arsdigita/atoz/ui/admin/CategoryProviderAdmin.java
index 2d333da13..415789cfc 100755
--- a/ccm-atoz/src/com/arsdigita/atoz/ui/admin/CategoryProviderAdmin.java
+++ b/ccm-atoz/src/com/arsdigita/atoz/ui/admin/CategoryProviderAdmin.java
@@ -26,6 +26,10 @@ import com.arsdigita.bebop.ActionLink;
import com.arsdigita.bebop.Page;
import com.arsdigita.bebop.Component;
+/**
+ *
+ *
+ */
public class CategoryProviderAdmin extends ProviderAdmin {
private CategoryProviderForm m_detailsForm;
diff --git a/ccm-atoz/src/com/arsdigita/atoz/ui/admin/CategoryProviderAliasForm.java b/ccm-atoz/src/com/arsdigita/atoz/ui/admin/CategoryProviderAliasForm.java
index f8c614c87..45e8f889a 100755
--- a/ccm-atoz/src/com/arsdigita/atoz/ui/admin/CategoryProviderAliasForm.java
+++ b/ccm-atoz/src/com/arsdigita/atoz/ui/admin/CategoryProviderAliasForm.java
@@ -37,6 +37,10 @@ import com.arsdigita.categorization.Category;
import com.arsdigita.kernel.ui.ACSObjectSelectionModel;
import com.arsdigita.atoz.AtoZCategoryProvider;
+/**
+ *
+ *
+ */
public class CategoryProviderAliasForm extends Form {
private ACSObjectSelectionModel m_provider;
@@ -47,6 +51,10 @@ public class CategoryProviderAliasForm extends Form {
private SingleSelect m_letter;
private SaveCancelSection m_buttons;
+ /**
+ *
+ * @param provider
+ */
public CategoryProviderAliasForm(ACSObjectSelectionModel provider) {
super("categoryAliasForm", new SimpleContainer());
setRedirecting(true);
@@ -80,6 +88,9 @@ public class CategoryProviderAliasForm extends Form {
addSubmissionListener(new ProviderSubmissionListener());
}
+ /**
+ *
+ */
private class ProviderSubmissionListener implements FormSubmissionListener {
public void submitted(FormSectionEvent e)
throws FormProcessException {
@@ -92,6 +103,9 @@ public class CategoryProviderAliasForm extends Form {
}
}
+ /**
+ *
+ */
private class ProviderProcessListener implements FormProcessListener {
public void process(FormSectionEvent e)
throws FormProcessException {
diff --git a/ccm-atoz/src/com/arsdigita/atoz/ui/admin/CategoryProviderAliasList.java b/ccm-atoz/src/com/arsdigita/atoz/ui/admin/CategoryProviderAliasList.java
index e722a6edf..3ec0e1746 100755
--- a/ccm-atoz/src/com/arsdigita/atoz/ui/admin/CategoryProviderAliasList.java
+++ b/ccm-atoz/src/com/arsdigita/atoz/ui/admin/CategoryProviderAliasList.java
@@ -31,7 +31,7 @@ import com.arsdigita.domain.DomainObjectXMLRenderer;
import com.arsdigita.domain.DomainCollection;
import com.arsdigita.domain.DomainObjectFactory;
import com.arsdigita.persistence.OID;
-import com.arsdigita.categorization.Category;
+// import com.arsdigita.categorization.Category;
import com.arsdigita.xml.Element;
import com.arsdigita.xml.XML;
@@ -49,6 +49,7 @@ public class CategoryProviderAliasList extends SimpleContainer {
m_provider = provider;
}
+ @Override
public void respond(PageState state) {
String key = state.getControlEventName();
String value = state.getControlEventValue();
@@ -63,6 +64,7 @@ public class CategoryProviderAliasList extends SimpleContainer {
}
}
+ @Override
public void generateXML(PageState state,
Element parent) {
Element content = AtoZ.newElement("categoryProviderAliasList");
diff --git a/ccm-atoz/src/com/arsdigita/atoz/ui/admin/CategoryProviderBlackList.java b/ccm-atoz/src/com/arsdigita/atoz/ui/admin/CategoryProviderBlackList.java
index 2808b9f46..c8a436805 100755
--- a/ccm-atoz/src/com/arsdigita/atoz/ui/admin/CategoryProviderBlackList.java
+++ b/ccm-atoz/src/com/arsdigita/atoz/ui/admin/CategoryProviderBlackList.java
@@ -37,6 +37,10 @@ import com.arsdigita.xml.Element;
import com.arsdigita.util.UncheckedWrapperException;
import java.io.IOException;
+/**
+ *
+ *
+ */
public class CategoryProviderBlackList extends SimpleContainer {
private ACSObjectSelectionModel m_provider;
@@ -46,6 +50,7 @@ public class CategoryProviderBlackList extends SimpleContainer {
m_provider = provider;
}
+ @Override
public void respond(PageState state) {
String key = state.getControlEventName();
String value = state.getControlEventValue();
@@ -61,6 +66,7 @@ public class CategoryProviderBlackList extends SimpleContainer {
}
+ @Override
public void generateXML(PageState state,
Element parent) {
Element content = AtoZ.newElement("categoryProviderBlackList");
diff --git a/ccm-atoz/src/com/arsdigita/atoz/ui/admin/CategoryProviderBlockForm.java b/ccm-atoz/src/com/arsdigita/atoz/ui/admin/CategoryProviderBlockForm.java
index 0a771fe75..35fd423d0 100755
--- a/ccm-atoz/src/com/arsdigita/atoz/ui/admin/CategoryProviderBlockForm.java
+++ b/ccm-atoz/src/com/arsdigita/atoz/ui/admin/CategoryProviderBlockForm.java
@@ -36,6 +36,10 @@ import com.arsdigita.categorization.Category;
import com.arsdigita.kernel.ui.ACSObjectSelectionModel;
import com.arsdigita.kernel.ACSObject;
+/**
+ *
+ *
+ */
public class CategoryProviderBlockForm extends Form {
private ACSObjectSelectionModel m_provider;
@@ -43,6 +47,10 @@ public class CategoryProviderBlockForm extends Form {
private ObjectCategoryPicker m_category;
private SaveCancelSection m_buttons;
+ /**
+ *
+ * @param provider
+ */
public CategoryProviderBlockForm(ACSObjectSelectionModel provider) {
super("categoryBlockForm", new SimpleContainer());
setRedirecting(true);
@@ -66,6 +74,9 @@ public class CategoryProviderBlockForm extends Form {
addSubmissionListener(new ProviderSubmissionListener());
}
+ /**
+ *
+ */
private class ProviderSubmissionListener implements FormSubmissionListener {
public void submitted(FormSectionEvent e)
throws FormProcessException {
@@ -78,6 +89,9 @@ public class CategoryProviderBlockForm extends Form {
}
}
+ /**
+ *
+ */
private class ProviderProcessListener implements FormProcessListener {
public void process(FormSectionEvent e)
throws FormProcessException {
diff --git a/ccm-atoz/src/com/arsdigita/atoz/ui/admin/ProviderCreateForm.java b/ccm-atoz/src/com/arsdigita/atoz/ui/admin/ProviderCreateForm.java
index 49dc5450a..2db265868 100755
--- a/ccm-atoz/src/com/arsdigita/atoz/ui/admin/ProviderCreateForm.java
+++ b/ccm-atoz/src/com/arsdigita/atoz/ui/admin/ProviderCreateForm.java
@@ -52,7 +52,7 @@ public class ProviderCreateForm extends Form {
m_providerType.addValidationListener(new NotNullValidationListener());
m_providerType.addOption(new Option(null, "--Select one--"));
- AtoZProviderType[] providers = AtoZ.getConfig().getProviderTypes();
+ AtoZProviderType[] providers = AtoZ.getProviderTypes();
for (int i = 0 ; i < providers.length ; i++) {
m_providerType.addOption(
new Option(providers[i].getProvider().getName(),
diff --git a/ccm-atoz/src/overview.html b/ccm-atoz/src/overview.html
index 4313f219c..2194b497b 100755
--- a/ccm-atoz/src/overview.html
+++ b/ccm-atoz/src/overview.html
@@ -9,7 +9,7 @@ the front page of the HTML documentation it produces.
Purpose
- The ccm-ldn-atoz package enables a site to present all it's content
+ The ccm-atoz package enables a site to present all it's content
in alphabetical order as an additional service to it's users. Usually
the theme provides a link to the page as part of its static elements.
@@ -28,7 +28,10 @@ the front page of the HTML documentation it produces.
Additional Application Details
-
+ The content to present is retrieved from the storage by 'providers'.
+ A generic provider for content items is part of the package, additional
+ specialized providers may provide specific kind of content.
+
Usage
@@ -43,11 +46,15 @@ the front page of the HTML documentation it produces.
Currently available providers are:
- - ESD Toolkit Domain Provider
- Item Provider
+ - Catgegory Provider
+
+
+ Extension packages make available:
+
+
+ - ESD Toolkit Domain Provider
- SiteProxy Provider
- - Catgegory Provider
-
diff --git a/ccm-ldn-atoz/web/WEB-INF/web.ccm-ldn-atoz.xml b/ccm-atoz/web/WEB-INF/web.ccm-atoz.xml
similarity index 75%
rename from ccm-ldn-atoz/web/WEB-INF/web.ccm-ldn-atoz.xml
rename to ccm-atoz/web/WEB-INF/web.ccm-atoz.xml
index 8e6ee0ba8..0a690a1bc 100644
--- a/ccm-ldn-atoz/web/WEB-INF/web.ccm-ldn-atoz.xml
+++ b/ccm-atoz/web/WEB-INF/web.ccm-atoz.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">
-
+
atoz-files
com.arsdigita.web.ApplicationFileServlet
@@ -13,13 +13,13 @@
/templates/ccm-atoz
-
+
-
+
atoz-files
/ccm-atoz/files/*
-
+
diff --git a/ccm-ldn-atoz/web/templates/ccm-atoz/admin/index.jsp b/ccm-atoz/web/templates/ccm-atoz/admin/index.jsp
similarity index 100%
rename from ccm-ldn-atoz/web/templates/ccm-atoz/admin/index.jsp
rename to ccm-atoz/web/templates/ccm-atoz/admin/index.jsp
diff --git a/ccm-ldn-atoz/web/templates/ccm-atoz/admin/load-cat.jsp b/ccm-atoz/web/templates/ccm-atoz/admin/load-cat.jsp
similarity index 100%
rename from ccm-ldn-atoz/web/templates/ccm-atoz/admin/load-cat.jsp
rename to ccm-atoz/web/templates/ccm-atoz/admin/load-cat.jsp
diff --git a/ccm-ldn-atoz/web/templates/ccm-atoz/index.jsp b/ccm-atoz/web/templates/ccm-atoz/index.jsp
similarity index 100%
rename from ccm-ldn-atoz/web/templates/ccm-atoz/index.jsp
rename to ccm-atoz/web/templates/ccm-atoz/index.jsp
diff --git a/ccm-ldn-atoz/web/themes/heirloom/apps/atoz/lib/atoz.css b/ccm-atoz/web/themes/heirloom/apps/atoz/lib/atoz.css
similarity index 100%
rename from ccm-ldn-atoz/web/themes/heirloom/apps/atoz/lib/atoz.css
rename to ccm-atoz/web/themes/heirloom/apps/atoz/lib/atoz.css
diff --git a/ccm-ldn-atoz/web/themes/heirloom/apps/atoz/lib/category-widget.js b/ccm-atoz/web/themes/heirloom/apps/atoz/lib/category-widget.js
similarity index 100%
rename from ccm-ldn-atoz/web/themes/heirloom/apps/atoz/lib/category-widget.js
rename to ccm-atoz/web/themes/heirloom/apps/atoz/lib/category-widget.js
diff --git a/ccm-ldn-atoz/web/themes/heirloom/apps/atoz/lib/table.css b/ccm-atoz/web/themes/heirloom/apps/atoz/lib/table.css
similarity index 100%
rename from ccm-ldn-atoz/web/themes/heirloom/apps/atoz/lib/table.css
rename to ccm-atoz/web/themes/heirloom/apps/atoz/lib/table.css
diff --git a/ccm-ldn-atoz/web/themes/heirloom/apps/atoz/xsl/index.xsl b/ccm-atoz/web/themes/heirloom/apps/atoz/xsl/index.xsl
similarity index 100%
rename from ccm-ldn-atoz/web/themes/heirloom/apps/atoz/xsl/index.xsl
rename to ccm-atoz/web/themes/heirloom/apps/atoz/xsl/index.xsl
diff --git a/ccm-atoz/pdl/com/arsdigita/atoz/terms/DomainProvider.pdl b/ccm-ldn-atoz/pdl/com/arsdigita/london/atoz/terms/DomainProvider.pdl
similarity index 95%
rename from ccm-atoz/pdl/com/arsdigita/atoz/terms/DomainProvider.pdl
rename to ccm-ldn-atoz/pdl/com/arsdigita/london/atoz/terms/DomainProvider.pdl
index 9191a4a27..ac1cc55e6 100755
--- a/ccm-atoz/pdl/com/arsdigita/atoz/terms/DomainProvider.pdl
+++ b/ccm-ldn-atoz/pdl/com/arsdigita/london/atoz/terms/DomainProvider.pdl
@@ -17,7 +17,7 @@
model com.arsdigita.london.atoz.terms;
-import com.arsdigita.london.atoz.AtoZProvider;
+import com.arsdigita.atoz.AtoZProvider;
import com.arsdigita.london.terms.Domain;
object type DomainProvider extends AtoZProvider {
diff --git a/ccm-ldn-atoz/src/com/arsdigita/london/atoz/terms/DomainGenerator.java b/ccm-ldn-atoz/src/com/arsdigita/london/atoz/terms/DomainGenerator.java
index 3f0de29b5..39058c35f 100755
--- a/ccm-ldn-atoz/src/com/arsdigita/london/atoz/terms/DomainGenerator.java
+++ b/ccm-ldn-atoz/src/com/arsdigita/london/atoz/terms/DomainGenerator.java
@@ -18,7 +18,7 @@
package com.arsdigita.london.atoz.terms;
-import com.arsdigita.atoz.AbstractAtoZGenerator;
+import com.arsdigita.atoz.AtoZGeneratorAbstractImpl;
import com.arsdigita.atoz.AtoZAtomicEntry;
import com.arsdigita.atoz.AtoZEntry;
import com.arsdigita.london.terms.Domain;
@@ -37,12 +37,22 @@ import com.arsdigita.xml.Element;
import java.util.List;
import java.util.ArrayList;
-public class DomainGenerator extends AbstractAtoZGenerator {
+/**
+ *
+ *
+ */
+public class DomainGenerator extends AtoZGeneratorAbstractImpl {
public DomainGenerator(DomainProvider provider) {
super(provider);
}
+ /**
+ *
+ * @param letter
+ * @return
+ */
public AtoZEntry[] getEntries(String letter) {
+
DomainProvider provider = (DomainProvider) getProvider();
Domain domain = provider.getDomain();
@@ -68,15 +78,24 @@ public class DomainGenerator extends AbstractAtoZGenerator {
}
return (AtoZEntry[]) l.toArray(new AtoZEntry[l.size()]);
+
}
+ /**
+ *
+ */
private class DomainAtomicEntry implements AtoZAtomicEntry {
+
private OID m_oid;
-
private String m_title;
-
private String m_description;
+ /**
+ *
+ * @param oid
+ * @param title
+ * @param description
+ */
public DomainAtomicEntry(OID oid, String title, String description) {
m_oid = oid;
m_title = title;
diff --git a/ccm-ldn-atoz/src/com/arsdigita/london/atoz/terms/DomainProvider.java b/ccm-ldn-atoz/src/com/arsdigita/london/atoz/terms/DomainProvider.java
index 7fc6ca80a..13d10a136 100755
--- a/ccm-ldn-atoz/src/com/arsdigita/london/atoz/terms/DomainProvider.java
+++ b/ccm-ldn-atoz/src/com/arsdigita/london/atoz/terms/DomainProvider.java
@@ -26,10 +26,14 @@ import com.arsdigita.domain.DomainObjectFactory;
import com.arsdigita.persistence.DataObject;
import com.arsdigita.persistence.OID;
+/**
+ *
+ *
+ */
public class DomainProvider extends AtoZProvider {
- public static final String BASE_DATA_OBJECT_TYPE
- = "com.arsdigita.london.atoz.terms.DomainProvider";
+ public static final String BASE_DATA_OBJECT_TYPE =
+ "com.arsdigita.london.atoz.terms.DomainProvider";
public static final String DOMAIN = "domain";
diff --git a/ccm-ldn-atoz/src/com/arsdigita/london/atoz/terms/Initializer.java b/ccm-ldn-atoz/src/com/arsdigita/london/atoz/terms/Initializer.java
new file mode 100644
index 000000000..308ca515e
--- /dev/null
+++ b/ccm-ldn-atoz/src/com/arsdigita/london/atoz/terms/Initializer.java
@@ -0,0 +1,53 @@
+/*
+ * 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
+ */
+
+package com.arsdigita.london.atoz.terms;
+
+import com.arsdigita.atoz.AtoZ;
+import com.arsdigita.atoz.AtoZProviderType;
+// import com.arsdigita.london.atoz.terms.DomainProvider; //same package
+import com.arsdigita.london.atoz.ui.terms.DomainProviderAdmin;
+import com.arsdigita.london.atoz.ui.terms.DomainProviderForm;
+import com.arsdigita.runtime.CompoundInitializer;
+import com.arsdigita.runtime.DomainInitEvent;
+
+/**
+ *
+ * @author pb
+ */
+public class Initializer extends CompoundInitializer {
+
+ /**
+ *
+ * @param evt
+ */
+ @Override
+ public void init(DomainInitEvent evt) {
+ super.init(evt);
+
+ // Introduces dependency on ccm-ldn-typesesdervise ??
+ AtoZ.registerProviderType(
+ new AtoZProviderType("ESD Toolkit Domain Provider",
+ "Provides a ESD Toolkit A-Z",
+ DomainProvider.class,
+ DomainProviderForm.class,
+ DomainProviderAdmin.class));
+
+ }
+
+}
diff --git a/ccm-ldn-atoz/src/com/arsdigita/london/atoz/ui/terms/DomainProviderAdmin.java b/ccm-ldn-atoz/src/com/arsdigita/london/atoz/ui/terms/DomainProviderAdmin.java
index f7f9c0a04..3dbf9cfcf 100755
--- a/ccm-ldn-atoz/src/com/arsdigita/london/atoz/ui/terms/DomainProviderAdmin.java
+++ b/ccm-ldn-atoz/src/com/arsdigita/london/atoz/ui/terms/DomainProviderAdmin.java
@@ -29,12 +29,18 @@ import com.arsdigita.bebop.event.ActionEvent;
import com.arsdigita.bebop.event.ActionListener;
import com.arsdigita.kernel.ui.ACSObjectSelectionModel;
+/**
+ *
+ */
public class DomainProviderAdmin extends ProviderAdmin {
private DomainProviderForm m_detailsForm;
private ActionLink m_editDetails;
private ProviderDetails m_details;
+ /**
+ * Constructor
+ */
public DomainProviderAdmin(ACSObjectSelectionModel provider) {
super("domainProviderAdmin",
provider);
diff --git a/ccm-ldn-atoz/src/com/arsdigita/london/atoz/ui/terms/DomainProviderForm.java b/ccm-ldn-atoz/src/com/arsdigita/london/atoz/ui/terms/DomainProviderForm.java
index 85e37827f..b755bc2a8 100755
--- a/ccm-ldn-atoz/src/com/arsdigita/london/atoz/ui/terms/DomainProviderForm.java
+++ b/ccm-ldn-atoz/src/com/arsdigita/london/atoz/ui/terms/DomainProviderForm.java
@@ -37,10 +37,16 @@ import com.arsdigita.persistence.SessionManager;
import java.util.TooManyListenersException;
+/**
+ *
+ */
public class DomainProviderForm extends ProviderForm {
private SingleSelect m_domain;
+ /**
+ * Constructor
+ */
public DomainProviderForm(ACSObjectSelectionModel provider) {
super("domainProvider",
DomainProvider.class, provider);
@@ -48,6 +54,10 @@ public class DomainProviderForm extends ProviderForm {
setMetaDataAttribute("title", "Domain provider properties");
}
+ /**
+ *
+ */
+ @Override
protected void addWidgets() {
super.addWidgets();
@@ -76,6 +86,12 @@ public class DomainProviderForm extends ProviderForm {
add(m_domain);
}
+ /**
+ *
+ * @param state
+ * @param provider
+ */
+ @Override
protected void processWidgets(PageState state,
AtoZProvider provider) {
super.processWidgets(state, provider);
@@ -88,6 +104,12 @@ public class DomainProviderForm extends ProviderForm {
OID.valueOf(oid)));
}
+ /**
+ *
+ * @param state
+ * @param provider
+ */
+ @Override
protected void initWidgets(PageState state,
AtoZProvider provider) {
super.initWidgets(state, provider);