From b1dc3863281d9b261aa811c8329b1f1d22533c2a Mon Sep 17 00:00:00 2001 From: pb Date: Sat, 17 Oct 2009 19:54:25 +0000 Subject: [PATCH] Verschiedenes an Dokumentation git-svn-id: https://svn.libreccm.org/ccm/trunk@280 8810af33-2d31-482b-a856-94f89814c4df --- ...ise.init => enterprise.init.nolongerInUse} | 0 .../bookmarks/installer/Initializer.java | 22 +- .../cms/contenttypes/ArticleInitializer.java | 4 - .../contenttypes/SiteProxyInitializer.java | 4 - .../arsdigita/cms/ContentSectionConfig.java | 8 +- .../src/com/arsdigita/cms/Initializer.java | 6 +- ccm-cms/src/com/arsdigita/cms/Template.java | 10 +- .../arsdigita/cms/installer/Installer.java | 4 +- ccm-cms/src/com/arsdigita/cms/package.html | 11 +- .../cms/publishToFile/PublishToFile.java | 21 +- .../publishToFile/PublishToFileException.java | 4 +- .../arsdigita/bebop/portal/PortalModel.java | 7 +- .../arsdigita/categorization/Category.java | 7 +- .../src/com/arsdigita/core/Initializer.java | 4 +- ...on.java => Application.java.nolongerInUse} | 0 ... => ApplicationVersion.java.nolongerInUse} | 0 ...> DataModelInitializer.java.nolongerInUse} | 0 ...roduct.java => Product.java.nolongerInUse} | 0 ...java => ProductVersion.java.nolongerInUse} | 0 ... ProductXMLInterpreter.java.nolongerInUse} | 0 ccm-core/src/com/arsdigita/dmi/package.html | 3 + .../domain/ObservableDomainObject.java | 6 +- .../arsdigita/initializer/Initializer.java | 2 + .../com/arsdigita/initializer/package.html | 2 + .../com/arsdigita/loader/PackageLoader.java | 10 +- .../src/com/arsdigita/packaging/Command.java | 17 +- .../src/com/arsdigita/packaging/Load.java | 23 +- .../com/arsdigita/portal/AgentPortlet.java | 13 +- .../arsdigita/portal/DefaultPortalModel.java | 20 +- .../src/com/arsdigita/portal/Initializer.java | 3 +- ccm-core/src/com/arsdigita/portal/Portal.java | 38 ++- .../arsdigita/portal/PortalCollection.java | 31 +-- .../src/com/arsdigita/portal/Portlet.java | 5 +- .../arsdigita/portal/PortletCollection.java | 9 +- .../com/arsdigita/portal/PortletSetup.java | 5 +- .../src/com/arsdigita/portal/PortletType.java | 27 ++- .../portal/apportlet/AppPortlet.java | 2 +- .../portal/apportlet/AppPortletSetup.java | 5 +- .../src/com/arsdigita/portal/package.html | 17 +- .../com/arsdigita/runtime/RegistryConfig.java | 8 +- .../src/com/arsdigita/runtime/Startup.java | 227 +++++++++--------- .../src/com/arsdigita/ui/admin/package.html | 7 +- .../util/parameter/MapParameter.java | 4 - .../com/arsdigita/web/ApplicationType.java | 23 +- ...it.in => enterprise.init.in.nolongerInUse} | 0 ...ise.init => enterprise.init.nolongerInUse} | 0 .../cms/docmgr/installer/Initializer.java | 4 +- .../aplaws/ui/ACSObjectCategoryPicker.java | 10 +- .../ccm-ldn-portal/portal/README.txt | 6 + .../london/navigation/Initializer.java | 11 +- .../arsdigita/london/navigation/Loader.java | 11 +- .../navigation/portlet/ItemListPortlet.java | 8 + .../navigation/portlet/ObjectListPortlet.java | 8 + .../arsdigita/london/portal/Initializer.java | 8 +- .../com/arsdigita/london/portal/Loader.java | 58 ++++- .../arsdigita/london/portal/Workspace.java | 75 +++++- .../london/portal/WorkspacePage.java | 3 +- .../com/arsdigita/london/portal/package.html | 15 ++ .../portlet/ContentDirectoryPortlet.java | 13 +- .../portlet/WorkspaceDirectoryPortlet.java | 9 +- .../london/portal/ui/PersistentPortal.java | 8 + .../templates/ccm-ldn-portal/workspaces.jsp | 11 +- .../com/arsdigita/london/rss/Initializer.java | 1 - .../src/com/arsdigita/aplaws/Loader.java | 15 +- .../ccm-ldn-portal/portal/README.txt | 6 + .../arsdigita/simplesurvey/Initializer.java | 4 - ....init => enterprise.init.in.nolongerInUse} | 0 ....init.in => enterprise.init.nolongerInUse} | 0 ...ise.init => enterprise.init.nolongerInUse} | 0 .../ccm-ldn-portal/portal/README.txt | 6 + 70 files changed, 570 insertions(+), 339 deletions(-) rename ccm-bookmarks/etc/{enterprise.init => enterprise.init.nolongerInUse} (100%) rename ccm-core/src/com/arsdigita/dmi/{Application.java => Application.java.nolongerInUse} (100%) rename ccm-core/src/com/arsdigita/dmi/{ApplicationVersion.java => ApplicationVersion.java.nolongerInUse} (100%) rename ccm-core/src/com/arsdigita/dmi/{DataModelInitializer.java => DataModelInitializer.java.nolongerInUse} (100%) rename ccm-core/src/com/arsdigita/dmi/{Product.java => Product.java.nolongerInUse} (100%) rename ccm-core/src/com/arsdigita/dmi/{ProductVersion.java => ProductVersion.java.nolongerInUse} (100%) rename ccm-core/src/com/arsdigita/dmi/{ProductXMLInterpreter.java => ProductXMLInterpreter.java.nolongerInUse} (100%) rename ccm-docmgr/etc/{enterprise.init.in => enterprise.init.in.nolongerInUse} (100%) rename ccm-docmgr/etc/{enterprise.init => enterprise.init.nolongerInUse} (100%) create mode 100644 ccm-ldn-aplaws/web/templates/ccm-ldn-portal/portal/README.txt create mode 100644 ccm-ldn-portal/src/com/arsdigita/london/portal/package.html create mode 100644 ccm-shp-aplaws/web/templates/ccm-ldn-portal/portal/README.txt rename ccm-weblog/etc/{enterprise.init => enterprise.init.in.nolongerInUse} (100%) rename ccm-weblog/etc/{enterprise.init.in => enterprise.init.nolongerInUse} (100%) rename ccm-webpage/etc/{enterprise.init => enterprise.init.nolongerInUse} (100%) create mode 100644 ccm-zes-aplaws/web/templates/ccm-ldn-portal/portal/README.txt diff --git a/ccm-bookmarks/etc/enterprise.init b/ccm-bookmarks/etc/enterprise.init.nolongerInUse similarity index 100% rename from ccm-bookmarks/etc/enterprise.init rename to ccm-bookmarks/etc/enterprise.init.nolongerInUse diff --git a/ccm-bookmarks/src/com/arsdigita/bookmarks/installer/Initializer.java b/ccm-bookmarks/src/com/arsdigita/bookmarks/installer/Initializer.java index 34cc6570a..a00a6e99c 100755 --- a/ccm-bookmarks/src/com/arsdigita/bookmarks/installer/Initializer.java +++ b/ccm-bookmarks/src/com/arsdigita/bookmarks/installer/Initializer.java @@ -19,27 +19,27 @@ import com.arsdigita.db.DbHelper; import com.arsdigita.persistence.DataObject; import com.arsdigita.persistence.TransactionContext; import com.arsdigita.persistence.SessionManager; -import com.arsdigita.persistence.OID; +// unused import com.arsdigita.persistence.OID; import com.arsdigita.web.*; import com.arsdigita.kernel.*; -import com.arsdigita.sitenode.*; +// unused import com.arsdigita.sitenode.*; import com.arsdigita.bookmarks.*; import com.arsdigita.bookmarks.ui.*; -import com.arsdigita.domain.DomainObjectFactory; +// unused import com.arsdigita.domain.DomainObjectFactory; import com.arsdigita.domain.DomainObject; import com.arsdigita.initializer.Configuration; -import com.arsdigita.initializer.InitializationException; -import com.arsdigita.domain.DataObjectNotFoundException; +// unused import com.arsdigita.initializer.InitializationException; +// unused import com.arsdigita.domain.DataObjectNotFoundException; import com.arsdigita.persistence.pdl.ManifestSource; import com.arsdigita.persistence.pdl.NameFilter; import com.arsdigita.portal.PortletType; import com.arsdigita.portal.apportlet.AppPortletSetup; import com.arsdigita.runtime.CompoundInitializer; -import com.arsdigita.runtime.DataInitEvent; +// unused import com.arsdigita.runtime.DataInitEvent; import com.arsdigita.runtime.DomainInitEvent; import com.arsdigita.runtime.PDLInitializer; import com.arsdigita.runtime.RuntimeConfig; -import com.arsdigita.util.Assert; +// unusd import com.arsdigita.util.Assert; import org.apache.log4j.Logger; @@ -48,7 +48,6 @@ import org.apache.log4j.Logger; * * @author Jim Parsons */ -// public class Initializer extends BaseInitializer { public class Initializer extends CompoundInitializer { private static final Logger s_log = Logger.getLogger @@ -56,11 +55,6 @@ public class Initializer extends CompoundInitializer { private Configuration m_conf = new Configuration(); -// public Initializer() throws InitializationException { -// super(); - -// } - public Initializer() { final String url = RuntimeConfig.getConfig().getJDBCURL(); final int database = DbHelper.getDatabaseFromURL(url); @@ -84,7 +78,7 @@ public class Initializer extends CompoundInitializer { TransactionContext txn = SessionManager.getSession() .getTransactionContext(); txn.beginTxn(); - setupBookmarks(); + setupBookmarks(); txn.commitTxn(); s_log.info("Bookamrks Initializer completed."); } diff --git a/ccm-cms-types-article/src/com/arsdigita/cms/contenttypes/ArticleInitializer.java b/ccm-cms-types-article/src/com/arsdigita/cms/contenttypes/ArticleInitializer.java index f01c23534..24cd20d1b 100755 --- a/ccm-cms-types-article/src/com/arsdigita/cms/contenttypes/ArticleInitializer.java +++ b/ccm-cms-types-article/src/com/arsdigita/cms/contenttypes/ArticleInitializer.java @@ -27,10 +27,6 @@ import org.apache.log4j.Logger; * @version $Id: ArticleInitializer.java 757 2005-09-02 14:12:21Z sskracic $ */ public class ArticleInitializer extends ContentTypeInitializer { - public final static String versionId = - "$Id: ArticleInitializer.java 757 2005-09-02 14:12:21Z sskracic $" + - "$Author: sskracic $" + - "$DateTime: 2004/08/17 23:15:09 $"; private static final Logger s_log = Logger.getLogger(ArticleInitializer.class); diff --git a/ccm-cms-types-siteproxy/src/com/arsdigita/cms/contenttypes/SiteProxyInitializer.java b/ccm-cms-types-siteproxy/src/com/arsdigita/cms/contenttypes/SiteProxyInitializer.java index 4f747549e..ff9efa9d3 100755 --- a/ccm-cms-types-siteproxy/src/com/arsdigita/cms/contenttypes/SiteProxyInitializer.java +++ b/ccm-cms-types-siteproxy/src/com/arsdigita/cms/contenttypes/SiteProxyInitializer.java @@ -27,10 +27,6 @@ import org.apache.log4j.Logger; * @version $Id: SiteProxyInitializer.java 757 2005-09-02 14:12:21Z sskracic $ */ public class SiteProxyInitializer extends ContentTypeInitializer { - public final static String versionId = - "$Id: SiteProxyInitializer.java 757 2005-09-02 14:12:21Z sskracic $" + - "$Author: sskracic $" + - "$DateTime: 2004/08/17 23:15:09 $"; private static final Logger s_log = Logger.getLogger(SiteProxyInitializer.class); diff --git a/ccm-cms/src/com/arsdigita/cms/ContentSectionConfig.java b/ccm-cms/src/com/arsdigita/cms/ContentSectionConfig.java index 68a13a90e..dc8434a12 100755 --- a/ccm-cms/src/com/arsdigita/cms/ContentSectionConfig.java +++ b/ccm-cms/src/com/arsdigita/cms/ContentSectionConfig.java @@ -105,17 +105,16 @@ public final class ContentSectionConfig extends AbstractConfig { private static Map s_skipAssetSteps = null; private final Parameter m_templateRootPath; + private final Parameter m_categoryAuthoringAddForm; private final Parameter m_defaultItemTemplatePath; private final Parameter m_defaultFolderTemplatePath; + private final Parameter m_defaultSection; private final Parameter m_languages; - private final Parameter m_publishToFileClass; - private final Parameter m_disableItemPfs; private final Parameter m_defaultItemResolverClass; private final Parameter m_defaultTemplateResolverClass; - private final Parameter m_categoryAuthoringAddForm; + private final Parameter m_disableItemPfs; private final Parameter m_useSectionCategories; private final Parameter m_itemAdapters; - private final Parameter m_defaultSection; private final Parameter m_useStreamlinedCreation; private final Parameter m_dhtmlEditorConfig; private final Parameter m_dhtmlEditorPlugins; @@ -129,6 +128,7 @@ public final class ContentSectionConfig extends AbstractConfig { private final Parameter m_hideFolderIndexCheckbox; private final Parameter m_defaultNotificationTime; private final Parameter m_publishLifecycleListenerClass; + private final Parameter m_publishToFileClass; private final Parameter m_notifyAuthorOnLifecycle; private final Parameter m_saveTextCleansWordTags; private final Parameter m_hideAdditionalResourceFields; diff --git a/ccm-cms/src/com/arsdigita/cms/Initializer.java b/ccm-cms/src/com/arsdigita/cms/Initializer.java index 24a21869e..03def664b 100755 --- a/ccm-cms/src/com/arsdigita/cms/Initializer.java +++ b/ccm-cms/src/com/arsdigita/cms/Initializer.java @@ -86,10 +86,6 @@ import com.arsdigita.cms.util.LanguageUtil; * @version $Id: Initializer.java 1428 2007-01-24 12:39:56Z sskracic $ */ public class Initializer extends CompoundInitializer { - public final static String versionId = - "$Id: Initializer.java 1428 2007-01-24 12:39:56Z sskracic $" + - "$Author: sskracic $" + - "$DateTime: $"; public Initializer() { final String url = RuntimeConfig.getConfig().getJDBCURL(); @@ -173,6 +169,8 @@ public class Initializer extends CompoundInitializer { new TraversalHandler()); + // Just set the class implementing methods run when for publishing + // or unpublishing to file. No initialisation of the class here. try { QueueManager.setListener((PublishToFileListener) ContentSection.getConfig() diff --git a/ccm-cms/src/com/arsdigita/cms/Template.java b/ccm-cms/src/com/arsdigita/cms/Template.java index 006d48e6b..5a05bc551 100755 --- a/ccm-cms/src/com/arsdigita/cms/Template.java +++ b/ccm-cms/src/com/arsdigita/cms/Template.java @@ -37,10 +37,6 @@ import java.util.Map; * @version $Id: Template.java 754 2005-09-02 13:26:17Z sskracic $ */ public class Template extends TextAsset { - public static final String versionId = - "$Id: Template.java 754 2005-09-02 13:26:17Z sskracic $" + - "$Author: sskracic $" + - "$DateTime: 2004/08/17 23:15:09 $"; private static Logger s_log = Logger.getLogger(Template.class); @@ -175,9 +171,9 @@ public class Template extends TextAsset { * Set whether it is possible to write the items with this template * to the filesystem (as static HTML files). * - * @param isPublishable true if the items may be written to the filesystem, false if the - * template is designed for highly dynamic items which should always be - * served from the database. + * @param isPublishable true if the items may be written to the filesystem, + * false if the template is designed for highly dynamic items which should + * always be served from the database. */ public void setPublishable(Boolean isPublishable) { set(IS_PUBLISHABLE, isPublishable); diff --git a/ccm-cms/src/com/arsdigita/cms/installer/Installer.java b/ccm-cms/src/com/arsdigita/cms/installer/Installer.java index c44242513..e3a5cb3dd 100755 --- a/ccm-cms/src/com/arsdigita/cms/installer/Installer.java +++ b/ccm-cms/src/com/arsdigita/cms/installer/Installer.java @@ -51,13 +51,11 @@ import com.arsdigita.persistence.SessionManager; * * @author Michael Pih (pihman@arsdigita.com) * @author Jack Chung (flattop@arsdigita.com) - * @version $Revision: #21 $ $DateTime: 2004/08/17 23:15:09 $ + * @version $Id: Installer.java 287 2005-02-22 00:29:02Z sskracic $ */ public class Installer implements PackageEventListener { //public class Installer { - public static final String versionId = "$Id: Installer.java 287 2005-02-22 00:29:02Z sskracic $ by $Author: sskracic $, $DateTime: 2004/08/17 23:15:09 $"; - public final static String PACKAGE_KEY = "content-section"; public final static String DISPATCHER_CLASS = diff --git a/ccm-cms/src/com/arsdigita/cms/package.html b/ccm-cms/src/com/arsdigita/cms/package.html index d92fcd045..b394fe74c 100755 --- a/ccm-cms/src/com/arsdigita/cms/package.html +++ b/ccm-cms/src/com/arsdigita/cms/package.html @@ -7,10 +7,13 @@

Contains the core classes for the Red Hat Content Management System (CMS), classes that persist the fundamental objects for CMS - such as {@link com.arsdigita.cms.ContentItem content items}, {@link - com.arsdigita.cms.Template templates}, {@link - com.arsdigita.cms.ContentSection content sections}, and {@link - com.arsdigita.cms.ContentType content types}.

+ such as

+ diff --git a/ccm-cms/src/com/arsdigita/cms/publishToFile/PublishToFile.java b/ccm-cms/src/com/arsdigita/cms/publishToFile/PublishToFile.java index 27046c536..940e8169a 100755 --- a/ccm-cms/src/com/arsdigita/cms/publishToFile/PublishToFile.java +++ b/ccm-cms/src/com/arsdigita/cms/publishToFile/PublishToFile.java @@ -232,7 +232,8 @@ public class PublishToFile implements PublishToFileListener { else if ( qe.isMoveTask() ) return move(qe); else { - throw new PublishToFileException("Unsupported " + qe + " task passed to the queue"); + throw new PublishToFileException("Unsupported " + qe + + " task passed to the queue"); } } @@ -257,7 +258,8 @@ public class PublishToFile implements PublishToFileListener { ***/ protected boolean move(QueueEntry qe) { ContentItem liveItem = qe.getItem(); - ContentItem dstFolder= Utilities.getContentItemOrNull(new BigDecimal(qe.getDestination()) ) ; + ContentItem dstFolder= Utilities.getContentItemOrNull( + new BigDecimal(qe.getDestination()) ) ; if ( liveItem == null || dstFolder == null ) return false; // there is nothing to do @@ -291,11 +293,12 @@ public class PublishToFile implements PublishToFileListener { fileName = resolver.getTemplatePath(template); } - // The 'templateRoot' bit is specified in enterprise.init as the 'destination' - // for the Template object type, so we must strip it off here, otherwise it - // gets double appended + // The 'templateRoot' bit is specified in enterprise.init as the + // 'destination' for the Template object type, so we must + // strip it off here, otherwise it gets double appended String templateRoot = ContentSection.getConfig().getTemplateRoot(); - Assert.truth(fileName.startsWith(templateRoot), "filename starts with templateRoot"); + Assert.truth(fileName.startsWith(templateRoot), + "filename starts with templateRoot"); PublishedFile f = PublishedFile.loadOrCreate( template, @@ -417,11 +420,13 @@ public class PublishToFile implements PublishToFileListener { * @param item - actuall ContentItem to be published * @param where - destination folder to be published */ - private void publishOtherTemplates(String url, ContentItem item, Folder where, Host host) { + private void publishOtherTemplates(String url, ContentItem item, Folder where, + Host host) { if (s_log.isDebugEnabled()) { s_log.debug("publishAllTemplates url " + url); s_log.debug("item is " + item.getName() + " with id " + item.getID()); - s_log.debug("folder where is " + where.getName() + " with id " + where.getID()); + s_log.debug("folder where is " + where.getName() + + " with id " + where.getID()); } ContentItem draft = item.getWorkingVersion(); diff --git a/ccm-cms/src/com/arsdigita/cms/publishToFile/PublishToFileException.java b/ccm-cms/src/com/arsdigita/cms/publishToFile/PublishToFileException.java index 4aeabde70..7f71049f4 100755 --- a/ccm-cms/src/com/arsdigita/cms/publishToFile/PublishToFileException.java +++ b/ccm-cms/src/com/arsdigita/cms/publishToFile/PublishToFileException.java @@ -24,12 +24,10 @@ import com.arsdigita.util.UncheckedWrapperException; * Publish to file exception. * * @author Jeff Teeters (teeters@arsdigita.com) - * @version $Revision: #8 $ $Date: 2004/08/17 $ + * @version $Id: PublishToFileException.java 287 2005-02-22 00:29:02Z sskracic $ */ public class PublishToFileException extends UncheckedWrapperException { - public static final String versionId = "$Id: PublishToFileException.java 287 2005-02-22 00:29:02Z sskracic $ by $Author: sskracic $, $DateTime: 2004/08/17 23:15:09 $"; - public PublishToFileException(String message) { super("woohoo: " + message); } diff --git a/ccm-core/src/com/arsdigita/bebop/portal/PortalModel.java b/ccm-core/src/com/arsdigita/bebop/portal/PortalModel.java index 64b6b65d7..27833ea85 100755 --- a/ccm-core/src/com/arsdigita/bebop/portal/PortalModel.java +++ b/ccm-core/src/com/arsdigita/bebop/portal/PortalModel.java @@ -21,9 +21,10 @@ package com.arsdigita.bebop.portal; import java.util.Iterator; /** - *

Defines a model for - * use by Portal. Portal builds and uses a PortalModel inside its - * {@link Portal#generateXML} method.

+ *

Defines a model for use by Portal.

+ *

+ * Portal builds and uses a PortalModel inside its {@link Portal#generateXML} method. + *

* * @see Portal * @see PortalModelBuilder diff --git a/ccm-core/src/com/arsdigita/categorization/Category.java b/ccm-core/src/com/arsdigita/categorization/Category.java index ac1b208e6..76abda186 100755 --- a/ccm-core/src/com/arsdigita/categorization/Category.java +++ b/ccm-core/src/com/arsdigita/categorization/Category.java @@ -592,7 +592,12 @@ public class Category extends ACSObject { } /** - * returns a string repesenting the default ancestors of the category + * Returns a string repesenting the default ancestors of the category + * + * It can be useful and more efficient then working with the + * CategoryCollection returned by @see getDefaultAscendants() when comparing + * ids whose position in the path is known. + * (Added by Chris Gilbert) */ public String getDefaultAncestors () { return (String)get(DEFAULT_ANCESTORS); diff --git a/ccm-core/src/com/arsdigita/core/Initializer.java b/ccm-core/src/com/arsdigita/core/Initializer.java index ffaae0598..7bf2503eb 100755 --- a/ccm-core/src/com/arsdigita/core/Initializer.java +++ b/ccm-core/src/com/arsdigita/core/Initializer.java @@ -57,13 +57,11 @@ import com.arsdigita.search.converter.TextConverter; * CoreInitializer * * @author Rafael H. Schloming <rhs@mit.edu> - * @version $Revision: #15 $ $Date: 2004/08/16 $ + * @version $Id: Initializer.java 1547 2007-03-29 14:24:57Z chrisgilbert23 $ **/ public class Initializer extends CompoundInitializer { - public final static String versionId = "$Id: Initializer.java 1547 2007-03-29 14:24:57Z chrisgilbert23 $ by $Author: chrisgilbert23 $, $DateTime: 2004/08/16 18:10:38 $"; - public Initializer() { final String url = RuntimeConfig.getConfig().getJDBCURL(); final int database = DbHelper.getDatabaseFromURL(url); diff --git a/ccm-core/src/com/arsdigita/dmi/Application.java b/ccm-core/src/com/arsdigita/dmi/Application.java.nolongerInUse similarity index 100% rename from ccm-core/src/com/arsdigita/dmi/Application.java rename to ccm-core/src/com/arsdigita/dmi/Application.java.nolongerInUse diff --git a/ccm-core/src/com/arsdigita/dmi/ApplicationVersion.java b/ccm-core/src/com/arsdigita/dmi/ApplicationVersion.java.nolongerInUse similarity index 100% rename from ccm-core/src/com/arsdigita/dmi/ApplicationVersion.java rename to ccm-core/src/com/arsdigita/dmi/ApplicationVersion.java.nolongerInUse diff --git a/ccm-core/src/com/arsdigita/dmi/DataModelInitializer.java b/ccm-core/src/com/arsdigita/dmi/DataModelInitializer.java.nolongerInUse similarity index 100% rename from ccm-core/src/com/arsdigita/dmi/DataModelInitializer.java rename to ccm-core/src/com/arsdigita/dmi/DataModelInitializer.java.nolongerInUse diff --git a/ccm-core/src/com/arsdigita/dmi/Product.java b/ccm-core/src/com/arsdigita/dmi/Product.java.nolongerInUse similarity index 100% rename from ccm-core/src/com/arsdigita/dmi/Product.java rename to ccm-core/src/com/arsdigita/dmi/Product.java.nolongerInUse diff --git a/ccm-core/src/com/arsdigita/dmi/ProductVersion.java b/ccm-core/src/com/arsdigita/dmi/ProductVersion.java.nolongerInUse similarity index 100% rename from ccm-core/src/com/arsdigita/dmi/ProductVersion.java rename to ccm-core/src/com/arsdigita/dmi/ProductVersion.java.nolongerInUse diff --git a/ccm-core/src/com/arsdigita/dmi/ProductXMLInterpreter.java b/ccm-core/src/com/arsdigita/dmi/ProductXMLInterpreter.java.nolongerInUse similarity index 100% rename from ccm-core/src/com/arsdigita/dmi/ProductXMLInterpreter.java rename to ccm-core/src/com/arsdigita/dmi/ProductXMLInterpreter.java.nolongerInUse diff --git a/ccm-core/src/com/arsdigita/dmi/package.html b/ccm-core/src/com/arsdigita/dmi/package.html index 261695a79..b89ad25e8 100755 --- a/ccm-core/src/com/arsdigita/dmi/package.html +++ b/ccm-core/src/com/arsdigita/dmi/package.html @@ -10,6 +10,9 @@ Automatically manage data model upgrade process.

+

+As of APLAWS 1.0.5 / CCM 6.5 seems to no loner in use. +

diff --git a/ccm-core/src/com/arsdigita/domain/ObservableDomainObject.java b/ccm-core/src/com/arsdigita/domain/ObservableDomainObject.java index 08caefc57..094cb2760 100755 --- a/ccm-core/src/com/arsdigita/domain/ObservableDomainObject.java +++ b/ccm-core/src/com/arsdigita/domain/ObservableDomainObject.java @@ -36,11 +36,13 @@ import java.util.ArrayList; * operations. * * @author Joseph Bank - * @version 1.0 + * @version $Id: ObservableDomainObject.java 287 2005-02-22 00:29:02Z sskracic $ **/ public abstract class ObservableDomainObject extends DomainObject { - public static final String versionId = "$Id: ObservableDomainObject.java 287 2005-02-22 00:29:02Z sskracic $ by $Author: sskracic $, $DateTime: 2004/08/16 18:10:38 $"; + public static final String versionId = + "$Id: ObservableDomainObject.java 287 2005-02-22 00:29:02Z sskracic $" + + "by $Author: sskracic $, $DateTime: 2004/08/16 18:10:38 $"; private static final org.apache.log4j.Logger s_log = org.apache.log4j.Logger.getLogger(ObservableDomainObject.class); diff --git a/ccm-core/src/com/arsdigita/initializer/Initializer.java b/ccm-core/src/com/arsdigita/initializer/Initializer.java index dddcc08d5..3efcdcab5 100755 --- a/ccm-core/src/com/arsdigita/initializer/Initializer.java +++ b/ccm-core/src/com/arsdigita/initializer/Initializer.java @@ -19,6 +19,8 @@ package com.arsdigita.initializer; /** + * OLD INITIALIZATION SYSTEM - DEPRECATED + * * Any class implementing this interface may appear in an initialization * script read in by the Script class. A class that does this should construct * its own configuration object and initialize the parameters with the diff --git a/ccm-core/src/com/arsdigita/initializer/package.html b/ccm-core/src/com/arsdigita/initializer/package.html index ef83085ff..3e175b5e0 100755 --- a/ccm-core/src/com/arsdigita/initializer/package.html +++ b/ccm-core/src/com/arsdigita/initializer/package.html @@ -9,6 +9,8 @@ Provides a simple framework for initializing components at system startup time. + + Old Initialization System - deprecated!

diff --git a/ccm-core/src/com/arsdigita/loader/PackageLoader.java b/ccm-core/src/com/arsdigita/loader/PackageLoader.java index e1517abcf..aea0e2ece 100755 --- a/ccm-core/src/com/arsdigita/loader/PackageLoader.java +++ b/ccm-core/src/com/arsdigita/loader/PackageLoader.java @@ -48,17 +48,17 @@ import com.arsdigita.util.parameter.ParameterReader; * PackageLoader * * @author Rafael H. Schloming <rhs@mit.edu> - * @version $Revision: #6 $ $Date: 2004/08/16 $ + * @version $Id: PackageLoader.java 1840 2009-03-05 07:51:20Z terry $ **/ public abstract class PackageLoader extends AbstractScript { public final static Logger s_log = Logger.getLogger(PackageLoader.class); - public final static String versionId = - "$Id: PackageLoader.java 1840 2009-03-05 07:51:20Z terry $" + - " by $Author: terry $, " + - "$DateTime: 2004/08/16 18:10:38 $"; + // public final static String versionId = + // "$Id: PackageLoader.java 1840 2009-03-05 07:51:20Z terry $" + + // " by $Author: terry $, " + + // "$DateTime: 2004/08/16 18:10:38 $"; public static boolean exists(Connection conn, String table) { try { diff --git a/ccm-core/src/com/arsdigita/packaging/Command.java b/ccm-core/src/com/arsdigita/packaging/Command.java index f36b4f4fa..b8cd870cc 100755 --- a/ccm-core/src/com/arsdigita/packaging/Command.java +++ b/ccm-core/src/com/arsdigita/packaging/Command.java @@ -25,23 +25,26 @@ import org.apache.commons.cli.OptionBuilder; import org.apache.commons.cli.Options; /** - * Command + * Helper class to provide basic functions all commands need to have. + * + * Provides name, short description, usage and help information. * * @author Rafael H. Schloming <rhs@mit.edu> - * @version $Revision: #7 $ $Date: 2004/08/16 $ + * @version $Id: Command.java 1324 2006-09-21 22:13:16Z apevec $ **/ abstract class Command { - public final static String versionId = - "$Id: Command.java 1324 2006-09-21 22:13:16Z apevec $" + - " by $Author: apevec $, " + - "$DateTime: 2004/08/16 18:10:38 $"; - private String m_name; private String m_summary; private boolean m_verbose; + /** + * Represetents basic components of a command (command line interface). + * + * @param name Name of the command to execute as string + * @param summary Short Description of the command as string + */ protected Command(String name, String summary) { m_name = name; m_summary = summary; diff --git a/ccm-core/src/com/arsdigita/packaging/Load.java b/ccm-core/src/com/arsdigita/packaging/Load.java index 6f71af562..035fabaa7 100755 --- a/ccm-core/src/com/arsdigita/packaging/Load.java +++ b/ccm-core/src/com/arsdigita/packaging/Load.java @@ -80,16 +80,11 @@ import org.apache.commons.cli.PosixParser; * Called by PackageTool * * @author Rafael H. Schloming <rhs@mit.edu> - * @version $Revision: #29 $ $Date: 2004/08/16 $ + * @version $Id: Load.java 736 2005-09-01 10:46:05Z sskracic $ **/ class Load extends Command { - public final static String versionId = - "$Id: Load.java 736 2005-09-01 10:46:05Z sskracic $" + - " by $Author: sskracic $, " + - "$DateTime: 2004/08/16 18:10:38 $"; - private static final Options OPTIONS = getOptions(); static { @@ -153,10 +148,21 @@ class Load extends Command { .create());*/ } + /** + * Standard constructor, super class provides basic functions as name, + * short description, usage and help message. + * + */ public Load() { super("load", "Load a CCM package"); } + /** + * Invoked from the central tool "MasterTool" to execute the load process. + * + * @param args + * @return + */ public boolean run(String[] args) { CommandLine line; @@ -167,6 +173,8 @@ class Load extends Command { return false; } + // fill with command line arguments which is a list of packages by their + // package-keys to load. List packages = line.getArgList(); if (packages.isEmpty()) { usage(OPTIONS, System.err, "PACKAGE-KEYS"); @@ -183,6 +191,9 @@ class Load extends Command { || line.hasOption("data") || line.hasOption("init")); + // RegistryConfig contains a list of package-keys of packages to be + // installed. + // Constructs a new and empty config object. RegistryConfig rc = new RegistryConfig(); rc.load(); List loaded = Arrays.asList(rc.getPackages()); diff --git a/ccm-core/src/com/arsdigita/portal/AgentPortlet.java b/ccm-core/src/com/arsdigita/portal/AgentPortlet.java index b0491260a..4e3e979e5 100755 --- a/ccm-core/src/com/arsdigita/portal/AgentPortlet.java +++ b/ccm-core/src/com/arsdigita/portal/AgentPortlet.java @@ -21,9 +21,10 @@ package com.arsdigita.portal; import com.arsdigita.bebop.portal.AbstractPortletRenderer; import com.arsdigita.bebop.portal.PortletRenderer; import com.arsdigita.domain.DataObjectNotFoundException; -import com.arsdigita.portal.Portlet; -import com.arsdigita.portal.Portal; -import com.arsdigita.portal.PortletType; +// same package +// import com.arsdigita.portal.Portlet; +// import com.arsdigita.portal.Portal; +// import com.arsdigita.portal.PortletType; import com.arsdigita.kernel.Resource; import com.arsdigita.persistence.DataObject; import com.arsdigita.persistence.OID; @@ -59,7 +60,7 @@ public class AgentPortlet extends Portlet { createAgentPortlet(Portlet p, Resource parent, Portal portal) { PortletType ptype = PortletType.retrievePortletTypeForPortlet(BASE_DATA_OBJECT_TYPE); - Assert.assertNotNull(ptype, "PortletType"); + Assert.exists(ptype, "PortletType"); AgentPortlet aportlet = (AgentPortlet) Resource.createResource (ptype, p.getTitle(), parent); aportlet.setCellNumber(p.getCellNumber()); @@ -77,7 +78,7 @@ public class AgentPortlet extends Portlet { // To make this role accessible to the Portal domain object. public void setSuperPortlet(final Portlet portlet) { - Assert.assertNotNull(portlet); + Assert.exists(portlet); setAssociation("superportlet", portlet); @@ -89,7 +90,7 @@ public class AgentPortlet extends Portlet { Portlet portlet = Portlet.retrievePortlet(dataObject); - Assert.assertNotNull(portlet); + Assert.exists(portlet); return portlet; } diff --git a/ccm-core/src/com/arsdigita/portal/DefaultPortalModel.java b/ccm-core/src/com/arsdigita/portal/DefaultPortalModel.java index 092560b45..26fa7a00b 100755 --- a/ccm-core/src/com/arsdigita/portal/DefaultPortalModel.java +++ b/ccm-core/src/com/arsdigita/portal/DefaultPortalModel.java @@ -29,11 +29,8 @@ import java.util.ArrayList; import java.math.BigDecimal; /** - * - * - *

A default implementation of {@link - * com.arsdigita.bebop.portal.PortalModel} that provides a stateful - * backing to the Bebop portal classes.

+ *

A default implementation of {@link com.arsdigita.bebop.portal.PortalModel} + * that provides a stateful backing to the Bebop portal classes.

* * @see com.arsdigita.bebop.portal.PortalModel * @see Portal @@ -43,7 +40,6 @@ import java.math.BigDecimal; * @version $Id: DefaultPortalModel.java 287 2005-02-22 00:29:02Z sskracic $ */ public class DefaultPortalModel implements PortalModel { - public static final String versionId = "$Id: DefaultPortalModel.java 287 2005-02-22 00:29:02Z sskracic $ by $Author: sskracic $, $DateTime: 2004/08/16 18:10:38 $"; private static Category s_cat = Category.getInstance (DefaultPortalModel.class.getName()); @@ -62,15 +58,15 @@ public class DefaultPortalModel implements PortalModel { public DefaultPortalModel (PageState pageState, BigDecimalParameter portalIDParam) { - Assert.assertNotNull(pageState); - Assert.assertNotNull(portalIDParam); + Assert.exists(pageState); + Assert.exists(portalIDParam); BigDecimal portalID = (BigDecimal)pageState.getValue (portalIDParam); m_portal = Portal.retrieve(portalID); - Assert.assertNotNull(m_portal); + Assert.exists(m_portal); } /** @@ -81,11 +77,11 @@ public class DefaultPortalModel implements PortalModel { * @pre portalID != null */ public DefaultPortalModel(BigDecimal portalID) { - Assert.assertNotNull(portalID); + Assert.exists(portalID); m_portal = Portal.retrieve(portalID); - Assert.assertNotNull(m_portal); + Assert.exists(m_portal); } /** @@ -95,7 +91,7 @@ public class DefaultPortalModel implements PortalModel { * @pre portal != null */ public DefaultPortalModel(Portal portal) { - Assert.assertNotNull(portal); + Assert.exists(portal); m_portal = portal; } diff --git a/ccm-core/src/com/arsdigita/portal/Initializer.java b/ccm-core/src/com/arsdigita/portal/Initializer.java index 9eaff5310..db17b0f60 100755 --- a/ccm-core/src/com/arsdigita/portal/Initializer.java +++ b/ccm-core/src/com/arsdigita/portal/Initializer.java @@ -35,8 +35,7 @@ import org.apache.log4j.Logger; * @version $Id: Initializer.java 738 2005-09-01 12:36:52Z sskracic $ */ public class Initializer implements com.arsdigita.initializer.Initializer { - public static final String versionId = "$Id: Initializer.java 738 2005-09-01 12:36:52Z sskracic $ by $Author: sskracic $, $DateTime: 2004/08/16 18:10:38 $"; - + private static Logger s_log = Logger.getLogger(Initializer.class); private Configuration m_conf = new Configuration(); diff --git a/ccm-core/src/com/arsdigita/portal/Portal.java b/ccm-core/src/com/arsdigita/portal/Portal.java index 88f02cb89..129e7ddb7 100755 --- a/ccm-core/src/com/arsdigita/portal/Portal.java +++ b/ccm-core/src/com/arsdigita/portal/Portal.java @@ -47,11 +47,11 @@ import org.apache.log4j.Logger; *

* A Portal is a Persistence-backed framework for aggregating content * from multiple web applications/content sources. - * The com.arsdigita.portal - * package is an infrastructural package that can be used to quickly - * implement a basic portal server, but is primarily intended as a - * foundation for the development of more sophisticated Portal systems such as - * workspaces that feature multiple portals as named tabs within the workspace. + * The com.arsdigita.portal package is an infrastructural package + * that can be used to quickly implement a basic portal server, but is + * primarily intended as a foundation for the development of more sophisticated + * Portal systems such as workspaces that feature multiple portals as named tabs + * within the workspace. *

*

* Containment properties of Portals, such as versioning, permissioning, and @@ -63,7 +63,6 @@ import org.apache.log4j.Logger; * @version $Id: Portal.java 287 2005-02-22 00:29:02Z sskracic $ */ public class Portal extends Resource { - public static final String versionId = "$Id: Portal.java 287 2005-02-22 00:29:02Z sskracic $ by $Author: sskracic $, $DateTime: 2004/08/16 18:10:38 $"; public static final String BASE_DATA_OBJECT_TYPE = "com.arsdigita.portal.Portal"; @@ -74,14 +73,29 @@ public class Portal extends Resource { return BASE_DATA_OBJECT_TYPE; } + /** + * Constructor + * @param dataObject + */ protected Portal(DataObject dataObject) { super(dataObject); } + /** + * Constructor + * + * @param dataObjectType + */ protected Portal(String dataObjectType) { super(dataObjectType); } + /** + * Constructor + * + * @param oid + * @throws com.arsdigita.domain.DataObjectNotFoundException + */ public Portal(OID oid) throws DataObjectNotFoundException { super(oid); } @@ -179,6 +193,10 @@ public class Portal extends Resource { return new Portal(dataObject); } + /** + * + * @return + */ public static PortalCollection retrieveAll() { DataCollection dataCollection = SessionManager.getSession().retrieve(BASE_DATA_OBJECT_TYPE); @@ -269,7 +287,7 @@ public class Portal extends Resource { */ public void addPortlet(Portlet portlet, int cellNumber) { Assert.exists(portlet, Portlet.class); - Assert.truth(cellNumber >= 1, "cellNumber >= 1"); + Assert.isTrue(cellNumber >= 1, "cellNumber >= 1"); LinkedList portletList = getPortletListForCell(cellNumber); synchronized (portletList) { @@ -325,7 +343,7 @@ public class Portal extends Resource { LinkedList portletList = getPortletListForCell(portlet.getCellNumber()); int currentIndex = portletList.indexOf(portlet); - Assert.truth(currentIndex != -1, "Portlet not found."); + Assert.isTrue(currentIndex != -1, "Portlet not found."); try { synchronized (portletList) { @@ -345,7 +363,7 @@ public class Portal extends Resource { LinkedList portletList = getPortletListForCell(portlet.getCellNumber()); int currentIndex = portletList.indexOf(portlet); - Assert.truth(currentIndex != -1, "Portlet not found."); + Assert.isTrue(currentIndex != -1, "Portlet not found."); try { synchronized (portletList) { @@ -365,7 +383,7 @@ public class Portal extends Resource { LinkedList portletList = getPortletListForCell(portlet.getCellNumber()); int currentIndex = portletList.indexOf(portlet); - Assert.truth(currentIndex != -1, "Portlet not found."); + Assert.isTrue(currentIndex != -1, "Portlet not found."); synchronized (portletList) { portletList.remove(currentIndex); diff --git a/ccm-core/src/com/arsdigita/portal/PortalCollection.java b/ccm-core/src/com/arsdigita/portal/PortalCollection.java index 3390ff39c..0f5618af2 100755 --- a/ccm-core/src/com/arsdigita/portal/PortalCollection.java +++ b/ccm-core/src/com/arsdigita/portal/PortalCollection.java @@ -1,19 +1,19 @@ /* * 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 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. + * 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 + * 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.portal; @@ -24,14 +24,15 @@ import com.arsdigita.persistence.DataCollection; import com.arsdigita.util.Assert; /** - * - * + *

Collection of Portals.

+ *

+ * Describes a set of portal domain objects. + *

* @see Portal * @author Justin Ross * @version $Id: PortalCollection.java 287 2005-02-22 00:29:02Z sskracic $ */ public class PortalCollection extends ACSObjectCollection { - public static final String versionId = "$Id: PortalCollection.java 287 2005-02-22 00:29:02Z sskracic $ by $Author: sskracic $, $DateTime: 2004/08/16 18:10:38 $"; protected PortalCollection(DataCollection dataCollection) { super(dataCollection); @@ -48,7 +49,7 @@ public class PortalCollection extends ACSObjectCollection { Portal portal = Portal.retrieve(dataObject); - Assert.assertNotNull(portal, "portal"); + Assert.exists(portal, "portal"); return portal; } diff --git a/ccm-core/src/com/arsdigita/portal/Portlet.java b/ccm-core/src/com/arsdigita/portal/Portlet.java index 71068c31c..d9da72ef4 100755 --- a/ccm-core/src/com/arsdigita/portal/Portlet.java +++ b/ccm-core/src/com/arsdigita/portal/Portlet.java @@ -37,9 +37,8 @@ import org.apache.log4j.Logger; * *

* A Portlet is a domain class that provides a window or channel into - * a content source - * ( such as a web application, content item, remote content site). The - * portlet is added, usually along with other portlets, to a {@link Portal} + * a content source (such as a web application, content item, remote content site). + * The portlet is added, usually along with other portlets, to a {@link Portal} * which provides a way for multiple sources of content to be agregated * on one web page view.

*

diff --git a/ccm-core/src/com/arsdigita/portal/PortletCollection.java b/ccm-core/src/com/arsdigita/portal/PortletCollection.java index 9320feea2..8b7c854cc 100755 --- a/ccm-core/src/com/arsdigita/portal/PortletCollection.java +++ b/ccm-core/src/com/arsdigita/portal/PortletCollection.java @@ -24,8 +24,6 @@ import com.arsdigita.persistence.DataCollection; import com.arsdigita.util.Assert; /** - * - * *

Describes a set of portlet domain objects.

* * @see Portlet @@ -36,7 +34,10 @@ import com.arsdigita.util.Assert; * @version $Id: PortletCollection.java 287 2005-02-22 00:29:02Z sskracic $ */ public class PortletCollection extends ApplicationCollection { - public static final String versionId = "$Id: PortletCollection.java 287 2005-02-22 00:29:02Z sskracic $ by $Author: sskracic $, $DateTime: 2004/08/16 18:10:38 $"; + + // public static final String versionId = + // "$Id: PortletCollection.java 287 2005-02-22 00:29:02Z sskracic $" + + // "by $Author: sskracic $, $DateTime: 2004/08/16 18:10:38 $"; public PortletCollection(DataCollection dataCollection) { super(dataCollection); @@ -53,7 +54,7 @@ public class PortletCollection extends ApplicationCollection { Portlet portlet = Portlet.retrievePortlet(dataObject); - Assert.assertNotNull(portlet); + Assert.exists(portlet); return portlet; } diff --git a/ccm-core/src/com/arsdigita/portal/PortletSetup.java b/ccm-core/src/com/arsdigita/portal/PortletSetup.java index 12f5b9a33..a1712c0f7 100755 --- a/ccm-core/src/com/arsdigita/portal/PortletSetup.java +++ b/ccm-core/src/com/arsdigita/portal/PortletSetup.java @@ -47,7 +47,10 @@ import java.util.ArrayList; * @version $Id: PortletSetup.java 287 2005-02-22 00:29:02Z sskracic $ */ public class PortletSetup { - public static final String versionId = "$Id: PortletSetup.java 287 2005-02-22 00:29:02Z sskracic $ by $Author: sskracic $, $DateTime: 2004/08/16 18:10:38 $"; + + // public static final String versionId = + // "$Id: PortletSetup.java 287 2005-02-22 00:29:02Z sskracic $" + + // "by $Author: sskracic $, $DateTime: 2004/08/16 18:10:38 $"; protected String m_profile; protected String m_key = null; diff --git a/ccm-core/src/com/arsdigita/portal/PortletType.java b/ccm-core/src/com/arsdigita/portal/PortletType.java index 497e7b2b7..0adad031f 100755 --- a/ccm-core/src/com/arsdigita/portal/PortletType.java +++ b/ccm-core/src/com/arsdigita/portal/PortletType.java @@ -44,6 +44,7 @@ import com.arsdigita.web.Web; * * * @author Justin Ross + * @version $Id: PortletType.java 287 2005-02-22 00:29:02Z sskracic $ */ public class PortletType extends ResourceType { @@ -72,9 +73,9 @@ public class PortletType extends ResourceType { String portletObjectType) { super(dataObjectType); - Assert.assertNotNull(title, "title"); - Assert.assertNotNull(profile, "profile"); - Assert.assertNotNull(portletObjectType, "portletObjectType"); + Assert.exists(title, "title"); + Assert.exists(profile, "profile"); + Assert.exists(portletObjectType, "portletObjectType"); PackageType packageType = null; @@ -106,36 +107,36 @@ public class PortletType extends ResourceType { } public static PortletType retrievePortletType(BigDecimal id) { - Assert.assertNotNull(id, "id"); + Assert.exists(id, "id"); return PortletType.retrievePortletType (new OID(BASE_DATA_OBJECT_TYPE, id)); } public static PortletType retrievePortletType(OID oid) { - Assert.assertNotNull(oid, "oid"); + Assert.exists(oid, "oid"); DataObject dataObject = SessionManager.getSession().retrieve(oid); - Assert.assertNotNull(dataObject); + Assert.exists(dataObject); return PortletType.retrievePortletType(dataObject); } public static PortletType retrievePortletType(DataObject dataObject) { - Assert.assertNotNull(dataObject, "dataObject"); + Assert.exists(dataObject, "dataObject"); return new PortletType(dataObject); } public static PortletType retrievePortletTypeForPortlet (String portletObjectType) { - Assert.assertNotNull(portletObjectType, "portletObjectType"); + Assert.exists(portletObjectType, "portletObjectType"); DataCollection collection = SessionManager.getSession().retrieve(BASE_DATA_OBJECT_TYPE); - Assert.assertNotNull(collection, "collection"); + Assert.exists(collection, "collection"); collection.addEqualsFilter("objectType", portletObjectType); @@ -158,7 +159,7 @@ public class PortletType extends ResourceType { DataCollection collection = SessionManager.getSession().retrieve(BASE_DATA_OBJECT_TYPE); - Assert.assertNotNull(collection, "collection"); + Assert.exists(collection, "collection"); collection.addEqualsFilter("hasEmbeddedView", Boolean.TRUE); return new PortletTypeCollection(collection); @@ -169,7 +170,7 @@ public class PortletType extends ResourceType { // public void setProviderApplicationType(ApplicationType applicationType) { - Assert.assertNotNull(applicationType, "applicationType"); + Assert.exists(applicationType, "applicationType"); setAssociation("providerApplicationType", applicationType); } @@ -191,7 +192,7 @@ public class PortletType extends ResourceType { public boolean hasFullPageView() { Boolean hasFullPageView = (Boolean) get("hasFullPageView"); - Assert.assertNotNull(hasFullPageView, "hasFullPageView"); + Assert.exists(hasFullPageView, "hasFullPageView"); return hasFullPageView.booleanValue(); } @@ -203,7 +204,7 @@ public class PortletType extends ResourceType { public boolean hasEmbeddedView() { Boolean hasEmbeddedView = (Boolean)get("hasEmbeddedView"); - Assert.assertNotNull(hasEmbeddedView, "hasEmbeddedView"); + Assert.exists(hasEmbeddedView, "hasEmbeddedView"); return hasEmbeddedView.booleanValue(); } diff --git a/ccm-core/src/com/arsdigita/portal/apportlet/AppPortlet.java b/ccm-core/src/com/arsdigita/portal/apportlet/AppPortlet.java index e74d51edb..863fdad3b 100755 --- a/ccm-core/src/com/arsdigita/portal/apportlet/AppPortlet.java +++ b/ccm-core/src/com/arsdigita/portal/apportlet/AppPortlet.java @@ -55,7 +55,7 @@ public class AppPortlet extends Portlet { AppPortletType portletType = AppPortletType.retrieveAppPortletType(dataObject); - Assert.assertNotNull(portletType); + Assert.exists(portletType); return portletType; } diff --git a/ccm-core/src/com/arsdigita/portal/apportlet/AppPortletSetup.java b/ccm-core/src/com/arsdigita/portal/apportlet/AppPortletSetup.java index 448be421e..cf3bbb5fb 100755 --- a/ccm-core/src/com/arsdigita/portal/apportlet/AppPortletSetup.java +++ b/ccm-core/src/com/arsdigita/portal/apportlet/AppPortletSetup.java @@ -91,7 +91,7 @@ public class AppPortletSetup extends PortletSetup { notice(" ProviderApplicationType: " + m_provider); notice(" Key: " + m_key); notice(" StyleSheet: " + m_stylesheet); - notice(" IsPortalApplication: " + m_isPortalApplication); + notice(" IsPortalApplication: " + m_isPortalApplication); portletType = AppPortletType.createAppPortletType (m_title, m_profile, m_typeName); @@ -106,7 +106,8 @@ public class AppPortletSetup extends PortletSetup { notice("Done installing."); } else { - portletType = (AppPortletType)AppPortletType.retrieveAppPortletTypeForAppPortlet(m_typeName); + portletType = (AppPortletType) + AppPortletType.retrieveAppPortletTypeForAppPortlet(m_typeName); } DomainObjectFactory.registerInstantiator(m_typeName, m_instantiator); diff --git a/ccm-core/src/com/arsdigita/portal/package.html b/ccm-core/src/com/arsdigita/portal/package.html index e68495721..a5c53da90 100755 --- a/ccm-core/src/com/arsdigita/portal/package.html +++ b/ccm-core/src/com/arsdigita/portal/package.html @@ -6,10 +6,23 @@

- Basic portal infrastructure. -

+ +

+The portal service provides basic domain classes that represent portlets and +portals (a set of zero or more portlets). The portal service is used by +portal server implementations and any WAF application that provices portlets for +displaying specific content to the end user. +

+ +

+Portal server implementations currently include: +

+ diff --git a/ccm-core/src/com/arsdigita/runtime/RegistryConfig.java b/ccm-core/src/com/arsdigita/runtime/RegistryConfig.java index 801962b4d..e5af5b2a9 100755 --- a/ccm-core/src/com/arsdigita/runtime/RegistryConfig.java +++ b/ccm-core/src/com/arsdigita/runtime/RegistryConfig.java @@ -29,13 +29,15 @@ import java.net.URL; /** - * A config class used by the ConfigRegistry itself. Contains the - * waf.config.packages parameter and the waf.config.parents parameter. + * A config class used by the registry itself. + * + * Contains the parameters: + * waf.config.packages: comma separated package-key list of installed packages + * waf.config.parents : * * @author Rafael H. Schloming <rhs@mit.edu> * @version $Revision: #6 $ $Date: 2004/08/16 $ **/ - public class RegistryConfig extends AbstractConfig { public final static String versionId = diff --git a/ccm-core/src/com/arsdigita/runtime/Startup.java b/ccm-core/src/com/arsdigita/runtime/Startup.java index 49938123d..22b5ecfe8 100755 --- a/ccm-core/src/com/arsdigita/runtime/Startup.java +++ b/ccm-core/src/com/arsdigita/runtime/Startup.java @@ -53,23 +53,36 @@ import java.util.Set; import org.apache.log4j.Logger; /** - * An entry point initializer for the CCM runtime. This class may be - * used to bootstrap the CCM runtime environment into a state where it - * is safe to perform database I/O. It does this by accessing a - * persistent list of all the initializers required by the currently - * loaded packages. This guarantees that any of these packages has the - * opportunity to load any object-relational metadata and register any - * domain-data coupling metadata before any database I/O is performed. + * An entry point initializer for the CCM runtime used to bootstrap the CCM + * runtime environment into a state where it is safe to perform database I/O. + * It does this by accessing a persistent list of all the initializers + * required by the currently loaded packages. This guarantees that any of these + * packages has the opportunity to load any object-relational metadata and + * register any domain-data coupling metadata before any database I/O is + * performed. * + * USAGE: + * Construct an instance of this class and invoke its run() method. + *
+ * Startup startup = new Startup();
+ * if ( !startup.hasRun() ) {
+ *          startup.run();
+ *      }
+ * 
+ * + * In a servlet container runtime environment this should be done either in the + * first loaded servlet (BaseServlet in CCM) or in a special application + * listener servlet invoked by the servlet container at startuo time and before + * any other operation takes place (CCMApplicationListener). + * + * In a command line JVM environment (installation & maintenace procedures) it + * has to be performed once at the very beginning (e.g. package c.a.packaging) + * * @author Rafael Schloming <rhs@mit.edu> * @author Justin Ross <jross@redhat.com> * @version $Id: Startup.java 738 2005-09-01 12:36:52Z sskracic $ */ public class Startup extends CompoundInitializer { - public final static String versionId = - "$Id: Startup.java 738 2005-09-01 12:36:52Z sskracic $" + - "$Author: sskracic $" + - "$DateTime: 2004/08/16 18:10:38 $"; private static final Logger s_log = Logger.getLogger(Startup.class); @@ -83,6 +96,12 @@ public class Startup extends CompoundInitializer { private static boolean s_hasRun = false; + // Constructor section + + /** + * Default startup method. Determines the database connection information + * and delegates to a startup worker methods. + */ public Startup() { this(new PooledConnectionSource (RuntimeConfig.getConfig().getJDBCURL(), @@ -108,16 +127,86 @@ public class Startup extends CompoundInitializer { m_source = source; } - private void addWafInitializer() { - String claas = (String)SystemProperties.get(s_init); - if (claas != null) { - if (s_log.isDebugEnabled()) { - s_log.debug("adding: " + claas); - } - add((Initializer) Classes.newInstance(claas)); - } + + // Public API + + + /** + * Executes the initialization process using the default session + * and global metadata root. + * + * @see MetadataRoot#getMetadataRoot() + * @see SessionManager#getSession() + **/ + + public final void run() { + s_log.info("Initializing WAF runtime"); + + DbHelper.setDatabase + (DbHelper.getDatabaseFromURL(RuntimeConfig. + getConfig().getJDBCURL())); + addRuntimeInitializers(); + //addWafInitializer(); + + final MetadataRoot root = MetadataRoot.getMetadataRoot(); + // XXX It shouldn't be necessary to do this until the legacy + // init step, but SessionManager.getMetadataRoot depends on + // the session, and the DomainObjectFactory calls it. + final Session session = session("default", root); + + run(session, this); + + s_log.info("Initialization complete"); } + /** + * Executes the initialization process. + * + * This method is going to move. + */ + public static final void run(final Session session, + final Initializer init) { + + Assert.exists(session, Session.class); + Assert.exists(init, Initializer.class); + + s_hasRun = true; + + final PDLCompiler compiler = new PDLCompiler(); + final MetadataRoot root = session.getMetadataRoot(); + + Assert.exists(root, MetadataRoot.class); + + init.init(new DataInitEvent(compiler)); + + compiler.emit(root); + + init.init(new DomainInitEvent(new DomainObjectFactory())); + + init.init(new LegacyInitEvent(session)); + + } + + public static boolean hasRun() { + return s_hasRun; + } + + public static final void main(final String[] args) throws SQLException { + final String url; + final int size; + if (args.length == 0) { + url = RuntimeConfig.getConfig().getJDBCURL(); + } else { + url = args[0]; + } + + new Startup(new DedicatedConnectionSource(url)).run(); + } + + // //////////////////////////////// + // Private section / helper methods + // //////////////////////////////// + /* * Adds the runtime initializers from the database. */ @@ -132,9 +221,20 @@ public class Startup extends CompoundInitializer { } add((Initializer) Classes.newInstance(inits[i])); } + addWafInitializer(); } + private void addWafInitializer() { + String claas = (String)SystemProperties.get(s_init); + if (claas != null) { + if (s_log.isDebugEnabled()) { + s_log.debug("adding: " + claas); + } + add((Initializer) Classes.newInstance(claas)); + } + } + /** * Fetches the names of initializers loaded into the database. * Made protected so that test code can override the initializers @@ -189,95 +289,6 @@ public class Startup extends CompoundInitializer { } - /** - * Executes the initialization process. - * - * This method is going to move. - */ - public static final void run(final Session session, - final Initializer init) { - - Assert.exists(session, Session.class); - Assert.exists(init, Initializer.class); - - s_hasRun = true; - - final PDLCompiler compiler = new PDLCompiler(); - final MetadataRoot root = session.getMetadataRoot(); - - Assert.exists(root, MetadataRoot.class); - - init.init(new DataInitEvent(compiler)); - - compiler.emit(root); - - init.init(new DomainInitEvent(new DomainObjectFactory())); - - init.init(new LegacyInitEvent(session)); - - } - - /** - * Executes the initialization process using the default session - * and global metadata root. - * - * @see MetadataRoot#getMetadataRoot() - * @see SessionManager#getSession() - **/ - - public final void run() { - s_log.info("Initializing WAF runtime"); - - // Deprecated, no longer needed. - // startup(); - - DbHelper.setDatabase - (DbHelper.getDatabaseFromURL(RuntimeConfig. - getConfig().getJDBCURL())); - addRuntimeInitializers(); - //addWafInitializer(); - - final MetadataRoot root = MetadataRoot.getMetadataRoot(); - // XXX It shouldn't be necessary to do this until the legacy - // init step, but SessionManager.getMetadataRoot depends on - // the session, and the DomainObjectFactory calls it. - final Session session = session("default", root); - run(session, this); - - s_log.info("Initialization complete"); - } - - public static boolean hasRun() { - return s_hasRun; - } - -// /** -// * Executes the initialization process for the default session and -// * the Startup-determined set of initializers. -// */ -// public final void run() { -// s_log.info("Initializing WAF runtime"); - -// final MetadataRoot root = MetadataRoot.getMetadataRoot(); -// final Session session = session("default", root); - -// Startup.run(session, this); - -// s_log.info("Initialization complete"); -// } - - public static final void main(final String[] args) throws SQLException { - final String url; - final int size; - if (args.length == 0) { - url = RuntimeConfig.getConfig().getJDBCURL(); - } else { - url = args[0]; - } - - new Startup(new DedicatedConnectionSource(url)).run(); - } - private static void sort(String[] inits, Session session, MetadataRoot mroot) { Set all = new HashSet(Arrays.asList(inits)); Set provided = new HashSet(); diff --git a/ccm-core/src/com/arsdigita/ui/admin/package.html b/ccm-core/src/com/arsdigita/ui/admin/package.html index 813131633..5e14df1a6 100755 --- a/ccm-core/src/com/arsdigita/ui/admin/package.html +++ b/ccm-core/src/com/arsdigita/ui/admin/package.html @@ -6,9 +6,12 @@

- +(Original description) Basic user interface components for the administrative UI. - +

+

+Package implements the WAF administration panel, usually mouned at /ccm/admin, +used for administration of users and groups.

diff --git a/ccm-core/src/com/arsdigita/util/parameter/MapParameter.java b/ccm-core/src/com/arsdigita/util/parameter/MapParameter.java index 8f05ea3f3..b724c3f31 100755 --- a/ccm-core/src/com/arsdigita/util/parameter/MapParameter.java +++ b/ccm-core/src/com/arsdigita/util/parameter/MapParameter.java @@ -35,10 +35,6 @@ import java.util.Iterator; * @version $Id: MapParameter.java 287 2005-02-22 00:29:02Z sskracic $ */ public class MapParameter extends AbstractParameter { - public final static String versionId = - "$Id: MapParameter.java 287 2005-02-22 00:29:02Z sskracic $" + - "$Author: sskracic $" + - "$DateTime: 2004/08/16 18:10:38 $"; private final ArrayList m_params; diff --git a/ccm-core/src/com/arsdigita/web/ApplicationType.java b/ccm-core/src/com/arsdigita/web/ApplicationType.java index b26d55b98..08ee95730 100755 --- a/ccm-core/src/com/arsdigita/web/ApplicationType.java +++ b/ccm-core/src/com/arsdigita/web/ApplicationType.java @@ -49,10 +49,10 @@ import org.apache.log4j.Logger; * @version $Id: ApplicationType.java 1520 2007-03-22 13:36:04Z chrisgilbert23 $ */ public class ApplicationType extends ResourceType { - public static final String versionId = - "$Id: ApplicationType.java 1520 2007-03-22 13:36:04Z chrisgilbert23 $" + - "$Author: chrisgilbert23 $" + - "$DateTime: 2004/08/16 18:10:38 $"; + // public static final String versionId = + // "$Id: ApplicationType.java 1520 2007-03-22 13:36:04Z chrisgilbert23 $" + + // "$Author: chrisgilbert23 $" + + // "$DateTime: 2004/08/16 18:10:38 $"; private static final Logger s_log = Logger.getLogger (ApplicationType.class); @@ -102,9 +102,8 @@ public class ApplicationType extends ResourceType { final boolean createContainerGroup) { this(objectType); - Assert.assertNotNull(title, "String title"); - Assert.assertNotNull(applicationObjectType, - "String applicationObjectType"); + Assert.exists(title, "String title"); + Assert.exists(applicationObjectType, "String applicationObjectType"); setTitle(title); setApplicationObjectType(applicationObjectType); @@ -125,9 +124,10 @@ public class ApplicationType extends ResourceType { } /** - * Creates a new application type. Types created via this - * constructor are "legacy free" and do not create a legacy - * package type for compatibility with older applications. + * Creates a new "legacy free" application type. + * + * Types created via this constructor are "legacy free" and do not create + * a legacy package type for compatibility with older applications. */ public ApplicationType(final String title, final String applicationObjectType) { @@ -213,7 +213,8 @@ public class ApplicationType extends ResourceType { public static ApplicationType createApplicationType (String key, String title, String applicationObjectType) { - return ApplicationType.createApplicationType(key, title, applicationObjectType, false); + return ApplicationType.createApplicationType( + key, title, applicationObjectType, false); } diff --git a/ccm-docmgr/etc/enterprise.init.in b/ccm-docmgr/etc/enterprise.init.in.nolongerInUse similarity index 100% rename from ccm-docmgr/etc/enterprise.init.in rename to ccm-docmgr/etc/enterprise.init.in.nolongerInUse diff --git a/ccm-docmgr/etc/enterprise.init b/ccm-docmgr/etc/enterprise.init.nolongerInUse similarity index 100% rename from ccm-docmgr/etc/enterprise.init rename to ccm-docmgr/etc/enterprise.init.nolongerInUse diff --git a/ccm-docmgr/src/com/arsdigita/cms/docmgr/installer/Initializer.java b/ccm-docmgr/src/com/arsdigita/cms/docmgr/installer/Initializer.java index 5beac7791..9bfe7d12c 100755 --- a/ccm-docmgr/src/com/arsdigita/cms/docmgr/installer/Initializer.java +++ b/ccm-docmgr/src/com/arsdigita/cms/docmgr/installer/Initializer.java @@ -22,7 +22,7 @@ import com.arsdigita.cms.docmgr.Document; import com.arsdigita.cms.docmgr.DocumentCategoryBrowserApplication; import com.arsdigita.cms.docmgr.LegacyCategoryBrowserApplication; import com.arsdigita.cms.docmgr.Repository; -import com.arsdigita.cms.docmgr.search.SearchUtils; +// unused: import com.arsdigita.cms.docmgr.search.SearchUtils; import com.arsdigita.cms.docmgr.ui.CategoryDocsNavigatorPortlet; import com.arsdigita.cms.docmgr.ui.LegacyCategoryDocsNavigatorPortlet; import com.arsdigita.cms.docmgr.ui.RecentUpdatedDocsPortlet; @@ -51,10 +51,8 @@ import com.arsdigita.web.ApplicationType; * @version $Revision: #11 $ $Date: 2004/01/14 $ */ -//public class Initializer implements com.arsdigita.initializer.Initializer { public class Initializer extends CompoundInitializer { - private Configuration m_conf = new Configuration(); private static final String SEPARATOR = java.io.File.separator; diff --git a/ccm-ldn-aplaws/src/com/arsdigita/aplaws/ui/ACSObjectCategoryPicker.java b/ccm-ldn-aplaws/src/com/arsdigita/aplaws/ui/ACSObjectCategoryPicker.java index 8c13ea16a..04fd5c49b 100755 --- a/ccm-ldn-aplaws/src/com/arsdigita/aplaws/ui/ACSObjectCategoryPicker.java +++ b/ccm-ldn-aplaws/src/com/arsdigita/aplaws/ui/ACSObjectCategoryPicker.java @@ -35,9 +35,10 @@ import com.arsdigita.kernel.ACSObject; import com.arsdigita.london.terms.Term; import com.arsdigita.london.terms.Domain; import com.arsdigita.categorization.ui.ACSObjectCategoryForm; -import com.arsdigita.cms.ContentItem; -import com.arsdigita.cms.CMS; -import com.arsdigita.cms.ui.authoring.ItemCategoryForm; +// unused imports +// import com.arsdigita.cms.ContentItem; +// import com.arsdigita.cms.CMS; +// import com.arsdigita.cms.ui.authoring.ItemCategoryForm; import java.util.Collection; import java.util.List; @@ -51,7 +52,8 @@ import org.apache.log4j.Logger; * chris gilbert */ public abstract class ACSObjectCategoryPicker extends SimpleContainer { - private static final Logger s_log = Logger.getLogger(ItemCategoryPicker.class); + + private static final Logger s_log = Logger.getLogger(ACSObjectCategoryPicker.class); private ACSObjectCategoryForm m_form; private BigDecimalParameter m_root; diff --git a/ccm-ldn-aplaws/web/templates/ccm-ldn-portal/portal/README.txt b/ccm-ldn-aplaws/web/templates/ccm-ldn-portal/portal/README.txt new file mode 100644 index 000000000..ec85001c5 --- /dev/null +++ b/ccm-ldn-aplaws/web/templates/ccm-ldn-portal/portal/README.txt @@ -0,0 +1,6 @@ +jsp files replace files provided by ccm-ldn-protal. + +goal: Make the portal homepage read-only and cached for 15min. EXPERIMENTAL + +Dynamic no-cache version is available at /ccm/portal/custom.jsp for admins to get the 'customize area' links. +see r1082 diff --git a/ccm-ldn-navigation/src/com/arsdigita/london/navigation/Initializer.java b/ccm-ldn-navigation/src/com/arsdigita/london/navigation/Initializer.java index 3634a5404..2cba2c9f1 100755 --- a/ccm-ldn-navigation/src/com/arsdigita/london/navigation/Initializer.java +++ b/ccm-ldn-navigation/src/com/arsdigita/london/navigation/Initializer.java @@ -72,7 +72,8 @@ import java.util.List; import org.apache.log4j.Logger; -import com.arsdigita.london.navigation.Template; +// same package +// import com.arsdigita.london.navigation.Template; import com.arsdigita.domain.xml.TraversalHandler; import com.arsdigita.xml.XML; @@ -83,10 +84,10 @@ import com.arsdigita.xml.XML; * @version $Id: Initializer.java 755 2005-09-02 13:42:47Z sskracic $ */ public class Initializer extends CompoundInitializer { - public final static String versionId = - "$Id: Initializer.java 755 2005-09-02 13:42:47Z sskracic $" + - "$Author: sskracic $" + - "$DateTime: 2004/03/15 11:10:54 $"; + // public final static String versionId = + // "$Id: Initializer.java 755 2005-09-02 13:42:47Z sskracic $" + + // "$Author: sskracic $" + + // "$DateTime: 2004/03/15 11:10:54 $"; public static final Logger s_log = Logger.getLogger(Initializer.class); diff --git a/ccm-ldn-navigation/src/com/arsdigita/london/navigation/Loader.java b/ccm-ldn-navigation/src/com/arsdigita/london/navigation/Loader.java index 450a240b5..1a7c92e6d 100755 --- a/ccm-ldn-navigation/src/com/arsdigita/london/navigation/Loader.java +++ b/ccm-ldn-navigation/src/com/arsdigita/london/navigation/Loader.java @@ -18,7 +18,8 @@ package com.arsdigita.london.navigation; -import com.arsdigita.london.navigation.Navigation; +// same package +// import com.arsdigita.london.navigation.Navigation; import com.arsdigita.domain.DomainObject; import com.arsdigita.kernel.ACSObjectInstantiator; @@ -54,10 +55,10 @@ import org.apache.log4j.Logger; * @version $Id: Loader.java 287 2005-02-22 00:29:02Z sskracic $ */ public class Loader extends PackageLoader { - public final static String versionId = - "$Id: Loader.java 287 2005-02-22 00:29:02Z sskracic $" + - "$Author: sskracic $" + - "$DateTime: 2004/03/03 12:26:48 $"; + // public final static String versionId = + // "$Id: Loader.java 287 2005-02-22 00:29:02Z sskracic $" + + // "$Author: sskracic $" + + // "$DateTime: 2004/03/03 12:26:48 $"; private static final Logger s_log = Logger.getLogger(Loader.class); diff --git a/ccm-ldn-navigation/src/com/arsdigita/london/navigation/portlet/ItemListPortlet.java b/ccm-ldn-navigation/src/com/arsdigita/london/navigation/portlet/ItemListPortlet.java index fdf749617..9bdc66062 100755 --- a/ccm-ldn-navigation/src/com/arsdigita/london/navigation/portlet/ItemListPortlet.java +++ b/ccm-ldn-navigation/src/com/arsdigita/london/navigation/portlet/ItemListPortlet.java @@ -24,6 +24,14 @@ import com.arsdigita.london.navigation.DataCollectionDefinition; import com.arsdigita.london.navigation.cms.CMSDataCollectionDefinition; import com.arsdigita.london.navigation.ui.portlet.ItemListPortletRenderer; +/** + * Portlet to display a list of (content) items. + * + * The items can be selected / restricted by base type and filtered by a + * category or category tree. Ordering and length of the list can be configured. + * + * @version $Id: $ + */ public class ItemListPortlet extends ObjectListPortlet { diff --git a/ccm-ldn-navigation/src/com/arsdigita/london/navigation/portlet/ObjectListPortlet.java b/ccm-ldn-navigation/src/com/arsdigita/london/navigation/portlet/ObjectListPortlet.java index a2c855b95..5b8b23ea7 100755 --- a/ccm-ldn-navigation/src/com/arsdigita/london/navigation/portlet/ObjectListPortlet.java +++ b/ccm-ldn-navigation/src/com/arsdigita/london/navigation/portlet/ObjectListPortlet.java @@ -43,6 +43,14 @@ import java.util.StringTokenizer; import org.apache.log4j.Logger; +/** + * Portlet to display a list of objects. + * + * The objects can be selected / restricted by object type and filtered by a + * category or category tree. Ordering and length of the list can be configured. + * + * @version $Id: $ + */ public class ObjectListPortlet extends Portlet { private static final Logger s_log = Logger.getLogger( ObjectListPortlet.class ); diff --git a/ccm-ldn-portal/src/com/arsdigita/london/portal/Initializer.java b/ccm-ldn-portal/src/com/arsdigita/london/portal/Initializer.java index e01ad4a50..66a021a51 100755 --- a/ccm-ldn-portal/src/com/arsdigita/london/portal/Initializer.java +++ b/ccm-ldn-portal/src/com/arsdigita/london/portal/Initializer.java @@ -64,8 +64,8 @@ import com.arsdigita.xml.XML; * @version $Id: Initializer.java 1739 2008-08-15 01:15:21Z terry $ */ public class Initializer extends CompoundInitializer { - public final static String versionId = "$Id: Initializer.java 1739 2008-08-15 01:15:21Z terry $" - + "$Author: terry $" + "$DateTime: 2004/03/02 06:33:42 $"; + // public final static String versionId = "$Id: Initializer.java 1739 2008-08-15 01:15:21Z terry $" + // + "$Author: terry $" + "$DateTime: 2004/03/02 06:33:42 $"; private static final Logger s_log = Logger.getLogger(Initializer.class); @@ -276,7 +276,9 @@ public class Initializer extends CompoundInitializer { FlashPortletInitializer.initialize(); - ApplicationNavigationModel.register(Workspace.class.getName(), + // import from london.navigation required + // causes horizontal dependency between portal and navigation + ApplicationNavigationModel.register(Workspace.class.getName(), new DefaultNavigationModel()); } } diff --git a/ccm-ldn-portal/src/com/arsdigita/london/portal/Loader.java b/ccm-ldn-portal/src/com/arsdigita/london/portal/Loader.java index 7da1c4826..fd0386433 100755 --- a/ccm-ldn-portal/src/com/arsdigita/london/portal/Loader.java +++ b/ccm-ldn-portal/src/com/arsdigita/london/portal/Loader.java @@ -42,14 +42,24 @@ import com.arsdigita.web.Application; import com.arsdigita.web.ApplicationType; /** - * Loader. + * Executes nonrecurring at install time and loads (and configures ) a default + * workspace instance (i.e. instance of ccm-ldn-portal) in a default configuration. + * + * Configuration can be modified by configuration parameters before processing, + * otherwise hardcoded default values take effect. A set of portlets, part of + * the ccm-ldn-portal package, are loaded as well, so they are statically available. + * + * After processing the installation values can not be modified anymore without + * a fresh installation of the whole system. * * @author Justin Ross <jross@redhat.com> * @version $Id: Loader.java 1718 2008-07-16 14:08:38Z terry $ */ public class Loader extends PackageLoader { - public final static String versionId = "$Id: Loader.java 1718 2008-07-16 14:08:38Z terry $" - + "$Author: terry $" + "$DateTime: 2004/03/02 06:33:42 $"; + // versionID no longer used as a system variable. version information is + // kept as part of java doc. + // public final static String versionId = "$Id: Loader.java 1718 2008-07-16 14:08:38Z terry $" + // + "$Author: terry $" + "$DateTime: 2004/03/02 06:33:42 $"; private static final Logger s_log = Logger.getLogger(Loader.class); @@ -65,13 +75,21 @@ public class Loader extends PackageLoader { "com.arsdigita.london.portal.default_is_public", Parameter.REQUIRED, Boolean.TRUE); - public Loader() { + /** + * Standard constructor. + */ + public Loader() { register(m_isPublic); register(m_url); register(m_title); } - public void run(final ScriptContext ctx) { + /** + * Run script invoked by the loader script. + * + * @param ctx + */ + public void run(final ScriptContext ctx) { new KernelExcursion() { public void excurse() { setEffectiveParty(Kernel.getSystemParty()); @@ -91,15 +109,23 @@ public class Loader extends PackageLoader { }.run(); } - private void createApplication(String url, Boolean isPublic, String title) { + /** + * + * @param url + * @param isPublic + * @param title + */ + private void createApplication(String url, Boolean isPublic, String title) { + ApplicationType type = setupWorkspaceType(); if (url != null) { - s_log.debug("process url " + url); - Assert.truth(url.startsWith("/"), "url starts with /"); - Assert.truth(url.endsWith("/"), "url ends with /"); - Assert.truth(!url.equals("/"), "url is not /"); + // check weather the url parameter is properly formatted + s_log.debug("process url " + url); + Assert.isTrue(url.startsWith("/"), "url starts with /"); + Assert.isTrue(url.endsWith("/"), "url ends with /"); + Assert.isTrue(!url.equals("/"), "url is not /"); int last = url.lastIndexOf("/", url.length() - 2); s_log.debug("last slash at " + last); @@ -122,7 +148,17 @@ public class Loader extends PackageLoader { } } - private ApplicationType setupWorkspaceType() { + /** + * Creates a workspace application type as a legacy-compatible application + * type. + * + * No localization here because it is an invariant configuration. + * + * @return + */ + private ApplicationType setupWorkspaceType() { + // The first string is a key parameter used to create a + // legacy package type to back the new application type. ApplicationType type = ApplicationType.createApplicationType( "workspace", "Portal Workspace", Workspace.BASE_DATA_OBJECT_TYPE); diff --git a/ccm-ldn-portal/src/com/arsdigita/london/portal/Workspace.java b/ccm-ldn-portal/src/com/arsdigita/london/portal/Workspace.java index 635508e67..f1238a59d 100755 --- a/ccm-ldn-portal/src/com/arsdigita/london/portal/Workspace.java +++ b/ccm-ldn-portal/src/com/arsdigita/london/portal/Workspace.java @@ -53,6 +53,12 @@ import com.arsdigita.web.Web; import java.util.Iterator; import java.util.LinkedList; +/** + * Workspace domain class, a workspace represents an area containing 0...n portals + * each arranged as a pane of page. Each portal (or pane) manages a number of portlets. + * + * + */ public class Workspace extends Application { private static final Logger s_log = Logger.getLogger(Workspace.class); @@ -83,11 +89,20 @@ public class Workspace extends Application { */ private static Workspace defaultHomepageWorkspace = null; - public Workspace(DataObject obj) { + /** + * Constructor + * @param obj + */ + public Workspace(DataObject obj) { super(obj); } - public Workspace(OID oid) throws DataObjectNotFoundException { + /** + * Constructor, retrieves the workspace from database using its OID + * @param oid + * @throws com.arsdigita.domain.DataObjectNotFoundException + */ + public Workspace(OID oid) throws DataObjectNotFoundException { super(oid); } @@ -96,24 +111,57 @@ public class Workspace extends Application { * public String getContextPath() { return "ccm-ldn-portal"; } */ - public String getServletPath() { + /** + * + * @return ServletPath (constant) probably should be synchron with web.xml + * entry + */ + public String getServletPath() { // return "/files"; return "/ccm-ldn-portal/files"; } - public static Workspace createWorkspace(String url, String title, + /** + * Wrapper class to handle a limited set of parameters, + * here: page layout is set to default layout. + * + * @param url + * @param title + * @param parent + * @param isPublic + * @return + */ + public static Workspace createWorkspace(String url, String title, Application parent, boolean isPublic) { return createWorkspace(url, title, PageLayout.getDefaultLayout(), parent, isPublic); } - public static Workspace createWorkspace(String url, String title, + /** + * + * @param url + * @param title + * @param parent parent application + * @param owner + * @return + */ + public static Workspace createWorkspace(String url, String title, Application parent, User owner) { return createWorkspace(url, title, PageLayout.getDefaultLayout(), parent, owner); } - public static Workspace createWorkspace(String url, String title, + /** + * Does the real work to create a workspace in the storage (db) + * + * @param url + * @param title + * @param layout + * @param parent + * @param isPublic + * @return + */ + public static Workspace createWorkspace(String url, String title, PageLayout layout, Application parent, boolean isPublic) { if (s_log.isDebugEnabled()) { s_log.debug("Creating group workspace, isPublic:" + isPublic @@ -128,7 +176,17 @@ public class Workspace extends Application { return workspace; } - public static Workspace createWorkspace(String url, String title, + /** + * Does the real work to create a workspace in the storage (db) + * + * @param url + * @param title + * @param layout + * @param parent + * @param owner + * @return + */ + public static Workspace createWorkspace(String url, String title, PageLayout layout, Application parent, User owner) { if (s_log.isDebugEnabled()) { s_log.debug("Creating personal workspace for " + owner.getOID() @@ -692,8 +750,7 @@ public class Workspace extends Application { Workspace workspace = (Workspace) Application .retrieveApplication(personalWorkspaces.getDataObject()); if (personalWorkspaces.next()) - s_log - .error("more than one personal workspaces for this user!!"); + s_log.error("more than one personal workspaces for this user!!"); personalWorkspaces.close(); return workspace; diff --git a/ccm-ldn-portal/src/com/arsdigita/london/portal/WorkspacePage.java b/ccm-ldn-portal/src/com/arsdigita/london/portal/WorkspacePage.java index 935dd044e..2077483e6 100755 --- a/ccm-ldn-portal/src/com/arsdigita/london/portal/WorkspacePage.java +++ b/ccm-ldn-portal/src/com/arsdigita/london/portal/WorkspacePage.java @@ -32,7 +32,8 @@ public class WorkspacePage extends Portal { public static final String WORKSPACE = "workspace"; - public static final String BASE_DATA_OBJECT_TYPE = "com.arsdigita.london.portal.WorkspacePage"; + public static final String BASE_DATA_OBJECT_TYPE = + "com.arsdigita.london.portal.WorkspacePage"; public WorkspacePage() { this(BASE_DATA_OBJECT_TYPE); diff --git a/ccm-ldn-portal/src/com/arsdigita/london/portal/package.html b/ccm-ldn-portal/src/com/arsdigita/london/portal/package.html new file mode 100644 index 000000000..02b22c20d --- /dev/null +++ b/ccm-ldn-portal/src/com/arsdigita/london/portal/package.html @@ -0,0 +1,15 @@ + + + +Portal + + + +

+Implementation of a (simple) portal based upon ccm-core basic portal +infrastructure. +

+ + + + diff --git a/ccm-ldn-portal/src/com/arsdigita/london/portal/portlet/ContentDirectoryPortlet.java b/ccm-ldn-portal/src/com/arsdigita/london/portal/portlet/ContentDirectoryPortlet.java index 16c9a5152..06c4162e9 100755 --- a/ccm-ldn-portal/src/com/arsdigita/london/portal/portlet/ContentDirectoryPortlet.java +++ b/ccm-ldn-portal/src/com/arsdigita/london/portal/portlet/ContentDirectoryPortlet.java @@ -25,10 +25,17 @@ import com.arsdigita.london.portal.ui.portlet.ContentDirectoryPortletRenderer; import com.arsdigita.persistence.DataObject; import com.arsdigita.portal.Portlet; +/** + * Portlet to display a selected navigation category tree including links to + * the corresponding navigation index page. + * + * + * @version $Id: ContentDirectoryPortlet.java 1174 2006-06-14 14:14:15Z fabrice $ + */ public class ContentDirectoryPortlet extends Portlet { - public static final String versionId = "$Id: ContentDirectoryPortlet.java 1174 2006-06-14 14:14:15Z fabrice $ by $Author: fabrice $, $DateTime: 2003/08/08 05:59:54 $"; - - public static final String BASE_DATA_OBJECT_TYPE = "com.arsdigita.london.portal.portlet.ContentDirectoryPortlet"; + + public static final String BASE_DATA_OBJECT_TYPE = + "com.arsdigita.london.portal.portlet.ContentDirectoryPortlet"; public static final String ROOT = "root"; diff --git a/ccm-ldn-portal/src/com/arsdigita/london/portal/portlet/WorkspaceDirectoryPortlet.java b/ccm-ldn-portal/src/com/arsdigita/london/portal/portlet/WorkspaceDirectoryPortlet.java index 00531ceea..38e3a36e9 100755 --- a/ccm-ldn-portal/src/com/arsdigita/london/portal/portlet/WorkspaceDirectoryPortlet.java +++ b/ccm-ldn-portal/src/com/arsdigita/london/portal/portlet/WorkspaceDirectoryPortlet.java @@ -20,10 +20,15 @@ import com.arsdigita.london.portal.ui.portlet.WorkspaceDirectoryPortletRenderer; import com.arsdigita.persistence.DataObject; import com.arsdigita.portal.Portlet; +/** + * Workspace Directory Portlet - unknown functionality + * + * @version $Id: WorkspaceDirectoryPortlet.java 1174 2006-06-14 14:14:15Z fabrice $ + */ public class WorkspaceDirectoryPortlet extends Portlet { - public static final String versionId = "$Id: WorkspaceDirectoryPortlet.java 1174 2006-06-14 14:14:15Z fabrice $ by $Author: fabrice $, $DateTime: 2003/08/08 05:59:54 $"; - public static final String BASE_DATA_OBJECT_TYPE = "com.arsdigita.london.portal.portlet.WorkspaceDirectoryPortlet"; + public static final String BASE_DATA_OBJECT_TYPE = + "com.arsdigita.london.portal.portlet.WorkspaceDirectoryPortlet"; public static final String CONTENT = "content"; diff --git a/ccm-ldn-portal/src/com/arsdigita/london/portal/ui/PersistentPortal.java b/ccm-ldn-portal/src/com/arsdigita/london/portal/ui/PersistentPortal.java index 42203fc57..aaf7695c5 100755 --- a/ccm-ldn-portal/src/com/arsdigita/london/portal/ui/PersistentPortal.java +++ b/ccm-ldn-portal/src/com/arsdigita/london/portal/ui/PersistentPortal.java @@ -77,6 +77,14 @@ import java.io.IOException; import org.apache.log4j.Logger; // XXX this class is disgusting +/** + * PersitentPortals are able to have more than one column, and the constructor + * for PersitentPortal takes in an integer argument for number of columns. + * + * HomepagePortals defined on the jsp page each construct instances of this + * class, one for the portal in view mode, one in edit mode. + * + */ public class PersistentPortal extends SimpleContainer { public static final String ACTION_CUSTOMIZE = "customize"; diff --git a/ccm-ldn-portal/web/templates/ccm-ldn-portal/workspaces.jsp b/ccm-ldn-portal/web/templates/ccm-ldn-portal/workspaces.jsp index b9c573f15..01e7557f9 100755 --- a/ccm-ldn-portal/web/templates/ccm-ldn-portal/workspaces.jsp +++ b/ccm-ldn-portal/web/templates/ccm-ldn-portal/workspaces.jsp @@ -3,6 +3,8 @@ xmlns:define="/WEB-INF/bebop-define.tld" xmlns:show="/WEB-INF/bebop-show.tld" version="1.2"> + <%-- This page is used by class in method getChannel(PageState pageState) + com.arsdigita.london.portal.ui.WorkspaceDirectoryComponent --%> @@ -10,8 +12,13 @@ DispatcherHelper.cacheDisable(response); - - + + diff --git a/ccm-ldn-rss/src/com/arsdigita/london/rss/Initializer.java b/ccm-ldn-rss/src/com/arsdigita/london/rss/Initializer.java index fac514e5e..8f4302188 100755 --- a/ccm-ldn-rss/src/com/arsdigita/london/rss/Initializer.java +++ b/ccm-ldn-rss/src/com/arsdigita/london/rss/Initializer.java @@ -47,7 +47,6 @@ public class Initializer extends CompoundInitializer { ("ccm-ldn-rss.pdl.mf", new NameFilter(DbHelper.getDatabaseSuffix(database), "pdl")))); - // XXX rss.enterprise.init is empty. not needed here add(new LegacyInitializer("com/arsdigita/london/rss/enterprise.init")); } } diff --git a/ccm-shp-aplaws/src/com/arsdigita/aplaws/Loader.java b/ccm-shp-aplaws/src/com/arsdigita/aplaws/Loader.java index da685bfae..07537c6ff 100755 --- a/ccm-shp-aplaws/src/com/arsdigita/aplaws/Loader.java +++ b/ccm-shp-aplaws/src/com/arsdigita/aplaws/Loader.java @@ -64,13 +64,16 @@ import java.util.Set; * @version $Id: Loader.java 755 2005-09-02 13:42:47Z sskracic $ */ public class Loader extends PackageLoader { - public final static String versionId = - "$Id: Loader.java 755 2005-09-02 13:42:47Z sskracic $" + - "$Author: sskracic $" + - "$DateTime: 2004/03/25 09:34:39 $"; + //public final static String versionId = + // "$Id: Loader.java 755 2005-09-02 13:42:47Z sskracic $" + + // "$Author: sskracic $" + + // "$DateTime: 2004/03/25 09:34:39 $"; private static final Logger s_log = Logger.getLogger(Loader.class); + // Name of files containing an initial category tree(s). + // Files are stored as part of the jar, so classloader can find them. + // ToDo: relocate files user accessible outside the jar. private static final String[] categoryFiles = new String[] { "WEB-INF/aplaws/shp-nav-domain-1.00.xml" , "WEB-INF/aplaws/shp-nav-hierarchy-1.00.xml" @@ -95,6 +98,7 @@ public class Loader extends PackageLoader { "com.arsdigita.aplaws.navigation_domain", Parameter.REQUIRED, "SHP-NAV"); + // Registers to the context by adding the parameter to a map of parameters register(m_navigationDomain); /* @@ -135,6 +139,7 @@ public class Loader extends PackageLoader { String[] files = categoryFiles; final Parser parser = new Parser(); + // for each filename in the array of files containing categories for (int i = 0 ; i < files.length ; i++) { final String file = files[i]; if (s_log.isInfoEnabled()) { @@ -183,7 +188,7 @@ public class Loader extends PackageLoader { .retrieveApplicationForPath("/portal/"); portal.setDefaultLayout(PageLayout .findLayoutByFormat(PageLayout.FORMAT_ONE_COLUMN)); - } + } // run method // public void registerServicesTemplate(String appURL) { // Application app = Application.retrieveApplicationForPath(appURL); diff --git a/ccm-shp-aplaws/web/templates/ccm-ldn-portal/portal/README.txt b/ccm-shp-aplaws/web/templates/ccm-ldn-portal/portal/README.txt new file mode 100644 index 000000000..ec85001c5 --- /dev/null +++ b/ccm-shp-aplaws/web/templates/ccm-ldn-portal/portal/README.txt @@ -0,0 +1,6 @@ +jsp files replace files provided by ccm-ldn-protal. + +goal: Make the portal homepage read-only and cached for 15min. EXPERIMENTAL + +Dynamic no-cache version is available at /ccm/portal/custom.jsp for admins to get the 'customize area' links. +see r1082 diff --git a/ccm-simplesurvey/src/com/arsdigita/simplesurvey/Initializer.java b/ccm-simplesurvey/src/com/arsdigita/simplesurvey/Initializer.java index 58946d579..dd3d7af87 100755 --- a/ccm-simplesurvey/src/com/arsdigita/simplesurvey/Initializer.java +++ b/ccm-simplesurvey/src/com/arsdigita/simplesurvey/Initializer.java @@ -33,10 +33,6 @@ import com.arsdigita.runtime.RuntimeConfig; * @version $Id: Initializer.java 759 2005-09-02 15:25:32Z sskracic $ */ public class Initializer extends CompoundInitializer { - public final static String versionId = - "$Id: Initializer.java 759 2005-09-02 15:25:32Z sskracic $" + - "$Author: sskracic $" + - "$DateTime: 2004/08/17 23:26:27 $"; public Initializer() { final String url = RuntimeConfig.getConfig().getJDBCURL(); diff --git a/ccm-weblog/etc/enterprise.init b/ccm-weblog/etc/enterprise.init.in.nolongerInUse similarity index 100% rename from ccm-weblog/etc/enterprise.init rename to ccm-weblog/etc/enterprise.init.in.nolongerInUse diff --git a/ccm-weblog/etc/enterprise.init.in b/ccm-weblog/etc/enterprise.init.nolongerInUse similarity index 100% rename from ccm-weblog/etc/enterprise.init.in rename to ccm-weblog/etc/enterprise.init.nolongerInUse diff --git a/ccm-webpage/etc/enterprise.init b/ccm-webpage/etc/enterprise.init.nolongerInUse similarity index 100% rename from ccm-webpage/etc/enterprise.init rename to ccm-webpage/etc/enterprise.init.nolongerInUse diff --git a/ccm-zes-aplaws/web/templates/ccm-ldn-portal/portal/README.txt b/ccm-zes-aplaws/web/templates/ccm-ldn-portal/portal/README.txt new file mode 100644 index 000000000..ec85001c5 --- /dev/null +++ b/ccm-zes-aplaws/web/templates/ccm-ldn-portal/portal/README.txt @@ -0,0 +1,6 @@ +jsp files replace files provided by ccm-ldn-protal. + +goal: Make the portal homepage read-only and cached for 15min. EXPERIMENTAL + +Dynamic no-cache version is available at /ccm/portal/custom.jsp for admins to get the 'customize area' links. +see r1082