Verschiedenes an Dokumentation
git-svn-id: https://svn.libreccm.org/ccm/trunk@280 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
054fd33c8c
commit
b1dc386328
|
|
@ -19,27 +19,27 @@ import com.arsdigita.db.DbHelper;
|
||||||
import com.arsdigita.persistence.DataObject;
|
import com.arsdigita.persistence.DataObject;
|
||||||
import com.arsdigita.persistence.TransactionContext;
|
import com.arsdigita.persistence.TransactionContext;
|
||||||
import com.arsdigita.persistence.SessionManager;
|
import com.arsdigita.persistence.SessionManager;
|
||||||
import com.arsdigita.persistence.OID;
|
// unused import com.arsdigita.persistence.OID;
|
||||||
import com.arsdigita.web.*;
|
import com.arsdigita.web.*;
|
||||||
import com.arsdigita.kernel.*;
|
import com.arsdigita.kernel.*;
|
||||||
import com.arsdigita.sitenode.*;
|
// unused import com.arsdigita.sitenode.*;
|
||||||
import com.arsdigita.bookmarks.*;
|
import com.arsdigita.bookmarks.*;
|
||||||
import com.arsdigita.bookmarks.ui.*;
|
import com.arsdigita.bookmarks.ui.*;
|
||||||
import com.arsdigita.domain.DomainObjectFactory;
|
// unused import com.arsdigita.domain.DomainObjectFactory;
|
||||||
import com.arsdigita.domain.DomainObject;
|
import com.arsdigita.domain.DomainObject;
|
||||||
import com.arsdigita.initializer.Configuration;
|
import com.arsdigita.initializer.Configuration;
|
||||||
import com.arsdigita.initializer.InitializationException;
|
// unused import com.arsdigita.initializer.InitializationException;
|
||||||
import com.arsdigita.domain.DataObjectNotFoundException;
|
// unused import com.arsdigita.domain.DataObjectNotFoundException;
|
||||||
import com.arsdigita.persistence.pdl.ManifestSource;
|
import com.arsdigita.persistence.pdl.ManifestSource;
|
||||||
import com.arsdigita.persistence.pdl.NameFilter;
|
import com.arsdigita.persistence.pdl.NameFilter;
|
||||||
import com.arsdigita.portal.PortletType;
|
import com.arsdigita.portal.PortletType;
|
||||||
import com.arsdigita.portal.apportlet.AppPortletSetup;
|
import com.arsdigita.portal.apportlet.AppPortletSetup;
|
||||||
import com.arsdigita.runtime.CompoundInitializer;
|
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.DomainInitEvent;
|
||||||
import com.arsdigita.runtime.PDLInitializer;
|
import com.arsdigita.runtime.PDLInitializer;
|
||||||
import com.arsdigita.runtime.RuntimeConfig;
|
import com.arsdigita.runtime.RuntimeConfig;
|
||||||
import com.arsdigita.util.Assert;
|
// unusd import com.arsdigita.util.Assert;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -48,7 +48,6 @@ import org.apache.log4j.Logger;
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:jparsons@redhat.com">Jim Parsons</a>
|
* @author <a href="mailto:jparsons@redhat.com">Jim Parsons</a>
|
||||||
*/
|
*/
|
||||||
// public class Initializer extends BaseInitializer {
|
|
||||||
public class Initializer extends CompoundInitializer {
|
public class Initializer extends CompoundInitializer {
|
||||||
|
|
||||||
private static final Logger s_log = Logger.getLogger
|
private static final Logger s_log = Logger.getLogger
|
||||||
|
|
@ -56,11 +55,6 @@ public class Initializer extends CompoundInitializer {
|
||||||
|
|
||||||
private Configuration m_conf = new Configuration();
|
private Configuration m_conf = new Configuration();
|
||||||
|
|
||||||
// public Initializer() throws InitializationException {
|
|
||||||
// super();
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
public Initializer() {
|
public Initializer() {
|
||||||
final String url = RuntimeConfig.getConfig().getJDBCURL();
|
final String url = RuntimeConfig.getConfig().getJDBCURL();
|
||||||
final int database = DbHelper.getDatabaseFromURL(url);
|
final int database = DbHelper.getDatabaseFromURL(url);
|
||||||
|
|
@ -84,7 +78,7 @@ public class Initializer extends CompoundInitializer {
|
||||||
TransactionContext txn = SessionManager.getSession()
|
TransactionContext txn = SessionManager.getSession()
|
||||||
.getTransactionContext();
|
.getTransactionContext();
|
||||||
txn.beginTxn();
|
txn.beginTxn();
|
||||||
setupBookmarks();
|
setupBookmarks();
|
||||||
txn.commitTxn();
|
txn.commitTxn();
|
||||||
s_log.info("Bookamrks Initializer completed.");
|
s_log.info("Bookamrks Initializer completed.");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,10 +27,6 @@ import org.apache.log4j.Logger;
|
||||||
* @version $Id: ArticleInitializer.java 757 2005-09-02 14:12:21Z sskracic $
|
* @version $Id: ArticleInitializer.java 757 2005-09-02 14:12:21Z sskracic $
|
||||||
*/
|
*/
|
||||||
public class ArticleInitializer extends ContentTypeInitializer {
|
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);
|
private static final Logger s_log = Logger.getLogger(ArticleInitializer.class);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,10 +27,6 @@ import org.apache.log4j.Logger;
|
||||||
* @version $Id: SiteProxyInitializer.java 757 2005-09-02 14:12:21Z sskracic $
|
* @version $Id: SiteProxyInitializer.java 757 2005-09-02 14:12:21Z sskracic $
|
||||||
*/
|
*/
|
||||||
public class SiteProxyInitializer extends ContentTypeInitializer {
|
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);
|
private static final Logger s_log = Logger.getLogger(SiteProxyInitializer.class);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -105,17 +105,16 @@ public final class ContentSectionConfig extends AbstractConfig {
|
||||||
private static Map s_skipAssetSteps = null;
|
private static Map s_skipAssetSteps = null;
|
||||||
|
|
||||||
private final Parameter m_templateRootPath;
|
private final Parameter m_templateRootPath;
|
||||||
|
private final Parameter m_categoryAuthoringAddForm;
|
||||||
private final Parameter m_defaultItemTemplatePath;
|
private final Parameter m_defaultItemTemplatePath;
|
||||||
private final Parameter m_defaultFolderTemplatePath;
|
private final Parameter m_defaultFolderTemplatePath;
|
||||||
|
private final Parameter m_defaultSection;
|
||||||
private final Parameter m_languages;
|
private final Parameter m_languages;
|
||||||
private final Parameter m_publishToFileClass;
|
|
||||||
private final Parameter m_disableItemPfs;
|
|
||||||
private final Parameter m_defaultItemResolverClass;
|
private final Parameter m_defaultItemResolverClass;
|
||||||
private final Parameter m_defaultTemplateResolverClass;
|
private final Parameter m_defaultTemplateResolverClass;
|
||||||
private final Parameter m_categoryAuthoringAddForm;
|
private final Parameter m_disableItemPfs;
|
||||||
private final Parameter m_useSectionCategories;
|
private final Parameter m_useSectionCategories;
|
||||||
private final Parameter m_itemAdapters;
|
private final Parameter m_itemAdapters;
|
||||||
private final Parameter m_defaultSection;
|
|
||||||
private final Parameter m_useStreamlinedCreation;
|
private final Parameter m_useStreamlinedCreation;
|
||||||
private final Parameter m_dhtmlEditorConfig;
|
private final Parameter m_dhtmlEditorConfig;
|
||||||
private final Parameter m_dhtmlEditorPlugins;
|
private final Parameter m_dhtmlEditorPlugins;
|
||||||
|
|
@ -129,6 +128,7 @@ public final class ContentSectionConfig extends AbstractConfig {
|
||||||
private final Parameter m_hideFolderIndexCheckbox;
|
private final Parameter m_hideFolderIndexCheckbox;
|
||||||
private final Parameter m_defaultNotificationTime;
|
private final Parameter m_defaultNotificationTime;
|
||||||
private final Parameter m_publishLifecycleListenerClass;
|
private final Parameter m_publishLifecycleListenerClass;
|
||||||
|
private final Parameter m_publishToFileClass;
|
||||||
private final Parameter m_notifyAuthorOnLifecycle;
|
private final Parameter m_notifyAuthorOnLifecycle;
|
||||||
private final Parameter m_saveTextCleansWordTags;
|
private final Parameter m_saveTextCleansWordTags;
|
||||||
private final Parameter m_hideAdditionalResourceFields;
|
private final Parameter m_hideAdditionalResourceFields;
|
||||||
|
|
|
||||||
|
|
@ -86,10 +86,6 @@ import com.arsdigita.cms.util.LanguageUtil;
|
||||||
* @version $Id: Initializer.java 1428 2007-01-24 12:39:56Z sskracic $
|
* @version $Id: Initializer.java 1428 2007-01-24 12:39:56Z sskracic $
|
||||||
*/
|
*/
|
||||||
public class Initializer extends CompoundInitializer {
|
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() {
|
public Initializer() {
|
||||||
final String url = RuntimeConfig.getConfig().getJDBCURL();
|
final String url = RuntimeConfig.getConfig().getJDBCURL();
|
||||||
|
|
@ -173,6 +169,8 @@ public class Initializer extends CompoundInitializer {
|
||||||
new TraversalHandler());
|
new TraversalHandler());
|
||||||
|
|
||||||
|
|
||||||
|
// Just set the class implementing methods run when for publishing
|
||||||
|
// or unpublishing to file. No initialisation of the class here.
|
||||||
try {
|
try {
|
||||||
QueueManager.setListener((PublishToFileListener)
|
QueueManager.setListener((PublishToFileListener)
|
||||||
ContentSection.getConfig()
|
ContentSection.getConfig()
|
||||||
|
|
|
||||||
|
|
@ -37,10 +37,6 @@ import java.util.Map;
|
||||||
* @version $Id: Template.java 754 2005-09-02 13:26:17Z sskracic $
|
* @version $Id: Template.java 754 2005-09-02 13:26:17Z sskracic $
|
||||||
*/
|
*/
|
||||||
public class Template extends TextAsset {
|
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);
|
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
|
* Set whether it is possible to write the items with this template
|
||||||
* to the filesystem (as static HTML files).
|
* to the filesystem (as static HTML files).
|
||||||
*
|
*
|
||||||
* @param isPublishable true if the items may be written to the filesystem, false if the
|
* @param isPublishable true if the items may be written to the filesystem,
|
||||||
* template is designed for highly dynamic items which should always be
|
* false if the template is designed for highly dynamic items which should
|
||||||
* served from the database.
|
* always be served from the database.
|
||||||
*/
|
*/
|
||||||
public void setPublishable(Boolean isPublishable) {
|
public void setPublishable(Boolean isPublishable) {
|
||||||
set(IS_PUBLISHABLE, isPublishable);
|
set(IS_PUBLISHABLE, isPublishable);
|
||||||
|
|
|
||||||
|
|
@ -51,13 +51,11 @@ import com.arsdigita.persistence.SessionManager;
|
||||||
*
|
*
|
||||||
* @author Michael Pih (pihman@arsdigita.com)
|
* @author Michael Pih (pihman@arsdigita.com)
|
||||||
* @author Jack Chung (flattop@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 implements PackageEventListener {
|
||||||
//public class Installer {
|
//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 PACKAGE_KEY = "content-section";
|
||||||
|
|
||||||
public final static String DISPATCHER_CLASS =
|
public final static String DISPATCHER_CLASS =
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,13 @@
|
||||||
|
|
||||||
<p>Contains the core classes for the Red Hat Content Management
|
<p>Contains the core classes for the Red Hat Content Management
|
||||||
System (CMS), classes that persist the fundamental objects for CMS
|
System (CMS), classes that persist the fundamental objects for CMS
|
||||||
such as {@link com.arsdigita.cms.ContentItem content items}, {@link
|
such as</p>
|
||||||
com.arsdigita.cms.Template templates}, {@link
|
<ul>
|
||||||
com.arsdigita.cms.ContentSection content sections}, and {@link
|
<li>{@link com.arsdigita.cms.ContentItem content items},</li>
|
||||||
com.arsdigita.cms.ContentType content types}.</p>
|
<li>{@link com.arsdigita.cms.Template templates}, </li>
|
||||||
|
<li>{@link com.arsdigita.cms.ContentSection content sections}, and </li>
|
||||||
|
<li>{@link com.arsdigita.cms.ContentType content types}.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -232,7 +232,8 @@ public class PublishToFile implements PublishToFileListener {
|
||||||
else if ( qe.isMoveTask() )
|
else if ( qe.isMoveTask() )
|
||||||
return move(qe);
|
return move(qe);
|
||||||
else {
|
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) {
|
protected boolean move(QueueEntry qe) {
|
||||||
ContentItem liveItem = qe.getItem();
|
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 )
|
if ( liveItem == null || dstFolder == null )
|
||||||
return false; // there is nothing to do
|
return false; // there is nothing to do
|
||||||
|
|
||||||
|
|
@ -291,11 +293,12 @@ public class PublishToFile implements PublishToFileListener {
|
||||||
fileName = resolver.getTemplatePath(template);
|
fileName = resolver.getTemplatePath(template);
|
||||||
}
|
}
|
||||||
|
|
||||||
// The 'templateRoot' bit is specified in enterprise.init as the 'destination'
|
// The 'templateRoot' bit is specified in enterprise.init as the
|
||||||
// for the Template object type, so we must strip it off here, otherwise it
|
// 'destination' for the Template object type, so we must
|
||||||
// gets double appended
|
// strip it off here, otherwise it gets double appended
|
||||||
String templateRoot = ContentSection.getConfig().getTemplateRoot();
|
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(
|
PublishedFile f = PublishedFile.loadOrCreate(
|
||||||
template,
|
template,
|
||||||
|
|
@ -417,11 +420,13 @@ public class PublishToFile implements PublishToFileListener {
|
||||||
* @param item - actuall ContentItem to be published
|
* @param item - actuall ContentItem to be published
|
||||||
* @param where - destination folder 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()) {
|
if (s_log.isDebugEnabled()) {
|
||||||
s_log.debug("publishAllTemplates url " + url);
|
s_log.debug("publishAllTemplates url " + url);
|
||||||
s_log.debug("item is " + item.getName() + " with id " + item.getID());
|
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();
|
ContentItem draft = item.getWorkingVersion();
|
||||||
|
|
|
||||||
|
|
@ -24,12 +24,10 @@ import com.arsdigita.util.UncheckedWrapperException;
|
||||||
* Publish to file exception.
|
* Publish to file exception.
|
||||||
*
|
*
|
||||||
* @author Jeff Teeters (teeters@arsdigita.com)
|
* @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 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) {
|
public PublishToFileException(String message) {
|
||||||
super("woohoo: " + message);
|
super("woohoo: " + message);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,9 +21,10 @@ package com.arsdigita.bebop.portal;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>Defines a model for
|
* <p>Defines a model for use by Portal.</p>
|
||||||
* use by Portal. Portal builds and uses a PortalModel inside its
|
* <p>
|
||||||
* {@link Portal#generateXML} method.</p>
|
* Portal builds and uses a PortalModel inside its {@link Portal#generateXML} method.
|
||||||
|
* </p>
|
||||||
*
|
*
|
||||||
* @see Portal
|
* @see Portal
|
||||||
* @see PortalModelBuilder
|
* @see PortalModelBuilder
|
||||||
|
|
|
||||||
|
|
@ -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 () {
|
public String getDefaultAncestors () {
|
||||||
return (String)get(DEFAULT_ANCESTORS);
|
return (String)get(DEFAULT_ANCESTORS);
|
||||||
|
|
|
||||||
|
|
@ -57,13 +57,11 @@ import com.arsdigita.search.converter.TextConverter;
|
||||||
* CoreInitializer
|
* CoreInitializer
|
||||||
*
|
*
|
||||||
* @author Rafael H. Schloming <rhs@mit.edu>
|
* @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 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() {
|
public Initializer() {
|
||||||
final String url = RuntimeConfig.getConfig().getJDBCURL();
|
final String url = RuntimeConfig.getConfig().getJDBCURL();
|
||||||
final int database = DbHelper.getDatabaseFromURL(url);
|
final int database = DbHelper.getDatabaseFromURL(url);
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,9 @@
|
||||||
Automatically manage data model upgrade process.
|
Automatically manage data model upgrade process.
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
<p>
|
||||||
|
As of APLAWS 1.0.5 / CCM 6.5 seems to no loner in use.
|
||||||
|
</p>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -36,11 +36,13 @@ import java.util.ArrayList;
|
||||||
* operations.
|
* operations.
|
||||||
*
|
*
|
||||||
* @author Joseph Bank
|
* @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 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 =
|
private static final org.apache.log4j.Logger s_log =
|
||||||
org.apache.log4j.Logger.getLogger(ObservableDomainObject.class);
|
org.apache.log4j.Logger.getLogger(ObservableDomainObject.class);
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,8 @@
|
||||||
package com.arsdigita.initializer;
|
package com.arsdigita.initializer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* OLD INITIALIZATION SYSTEM - DEPRECATED
|
||||||
|
*
|
||||||
* Any class implementing this interface may appear in an initialization
|
* Any class implementing this interface may appear in an initialization
|
||||||
* script read in by the Script class. A class that does this should construct
|
* script read in by the Script class. A class that does this should construct
|
||||||
* its own configuration object and initialize the parameters with the
|
* its own configuration object and initialize the parameters with the
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,8 @@
|
||||||
Provides a simple framework for initializing components at system
|
Provides a simple framework for initializing components at system
|
||||||
startup time.
|
startup time.
|
||||||
|
|
||||||
|
<b> Old Initialization System - deprecated! </b>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
|
||||||
|
|
@ -48,17 +48,17 @@ import com.arsdigita.util.parameter.ParameterReader;
|
||||||
* PackageLoader
|
* PackageLoader
|
||||||
*
|
*
|
||||||
* @author Rafael H. Schloming <rhs@mit.edu>
|
* @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 abstract class PackageLoader extends AbstractScript {
|
||||||
|
|
||||||
public final static Logger s_log = Logger.getLogger(PackageLoader.class);
|
public final static Logger s_log = Logger.getLogger(PackageLoader.class);
|
||||||
|
|
||||||
public final static String versionId =
|
// public final static String versionId =
|
||||||
"$Id: PackageLoader.java 1840 2009-03-05 07:51:20Z terry $" +
|
// "$Id: PackageLoader.java 1840 2009-03-05 07:51:20Z terry $" +
|
||||||
" by $Author: terry $, " +
|
// " by $Author: terry $, " +
|
||||||
"$DateTime: 2004/08/16 18:10:38 $";
|
// "$DateTime: 2004/08/16 18:10:38 $";
|
||||||
|
|
||||||
public static boolean exists(Connection conn, String table) {
|
public static boolean exists(Connection conn, String table) {
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
|
|
@ -25,23 +25,26 @@ import org.apache.commons.cli.OptionBuilder;
|
||||||
import org.apache.commons.cli.Options;
|
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>
|
* @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 {
|
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_name;
|
||||||
private String m_summary;
|
private String m_summary;
|
||||||
private boolean m_verbose;
|
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) {
|
protected Command(String name, String summary) {
|
||||||
m_name = name;
|
m_name = name;
|
||||||
m_summary = summary;
|
m_summary = summary;
|
||||||
|
|
|
||||||
|
|
@ -80,16 +80,11 @@ import org.apache.commons.cli.PosixParser;
|
||||||
* Called by PackageTool
|
* Called by PackageTool
|
||||||
*
|
*
|
||||||
* @author Rafael H. Schloming <rhs@mit.edu>
|
* @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 {
|
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();
|
private static final Options OPTIONS = getOptions();
|
||||||
|
|
||||||
static {
|
static {
|
||||||
|
|
@ -153,10 +148,21 @@ class Load extends Command {
|
||||||
.create());*/
|
.create());*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Standard constructor, super class provides basic functions as name,
|
||||||
|
* short description, usage and help message.
|
||||||
|
*
|
||||||
|
*/
|
||||||
public Load() {
|
public Load() {
|
||||||
super("load", "Load a CCM package");
|
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) {
|
public boolean run(String[] args) {
|
||||||
CommandLine line;
|
CommandLine line;
|
||||||
|
|
||||||
|
|
@ -167,6 +173,8 @@ class Load extends Command {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// fill with command line arguments which is a list of packages by their
|
||||||
|
// package-keys to load.
|
||||||
List packages = line.getArgList();
|
List packages = line.getArgList();
|
||||||
if (packages.isEmpty()) {
|
if (packages.isEmpty()) {
|
||||||
usage(OPTIONS, System.err, "PACKAGE-KEYS");
|
usage(OPTIONS, System.err, "PACKAGE-KEYS");
|
||||||
|
|
@ -183,6 +191,9 @@ class Load extends Command {
|
||||||
|| line.hasOption("data")
|
|| line.hasOption("data")
|
||||||
|| line.hasOption("init"));
|
|| 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();
|
RegistryConfig rc = new RegistryConfig();
|
||||||
rc.load();
|
rc.load();
|
||||||
List loaded = Arrays.asList(rc.getPackages());
|
List loaded = Arrays.asList(rc.getPackages());
|
||||||
|
|
|
||||||
|
|
@ -21,9 +21,10 @@ package com.arsdigita.portal;
|
||||||
import com.arsdigita.bebop.portal.AbstractPortletRenderer;
|
import com.arsdigita.bebop.portal.AbstractPortletRenderer;
|
||||||
import com.arsdigita.bebop.portal.PortletRenderer;
|
import com.arsdigita.bebop.portal.PortletRenderer;
|
||||||
import com.arsdigita.domain.DataObjectNotFoundException;
|
import com.arsdigita.domain.DataObjectNotFoundException;
|
||||||
import com.arsdigita.portal.Portlet;
|
// same package
|
||||||
import com.arsdigita.portal.Portal;
|
// import com.arsdigita.portal.Portlet;
|
||||||
import com.arsdigita.portal.PortletType;
|
// import com.arsdigita.portal.Portal;
|
||||||
|
// import com.arsdigita.portal.PortletType;
|
||||||
import com.arsdigita.kernel.Resource;
|
import com.arsdigita.kernel.Resource;
|
||||||
import com.arsdigita.persistence.DataObject;
|
import com.arsdigita.persistence.DataObject;
|
||||||
import com.arsdigita.persistence.OID;
|
import com.arsdigita.persistence.OID;
|
||||||
|
|
@ -59,7 +60,7 @@ public class AgentPortlet extends Portlet {
|
||||||
createAgentPortlet(Portlet p, Resource parent, Portal portal) {
|
createAgentPortlet(Portlet p, Resource parent, Portal portal) {
|
||||||
PortletType ptype =
|
PortletType ptype =
|
||||||
PortletType.retrievePortletTypeForPortlet(BASE_DATA_OBJECT_TYPE);
|
PortletType.retrievePortletTypeForPortlet(BASE_DATA_OBJECT_TYPE);
|
||||||
Assert.assertNotNull(ptype, "PortletType");
|
Assert.exists(ptype, "PortletType");
|
||||||
AgentPortlet aportlet = (AgentPortlet) Resource.createResource
|
AgentPortlet aportlet = (AgentPortlet) Resource.createResource
|
||||||
(ptype, p.getTitle(), parent);
|
(ptype, p.getTitle(), parent);
|
||||||
aportlet.setCellNumber(p.getCellNumber());
|
aportlet.setCellNumber(p.getCellNumber());
|
||||||
|
|
@ -77,7 +78,7 @@ public class AgentPortlet extends Portlet {
|
||||||
|
|
||||||
// To make this role accessible to the Portal domain object.
|
// To make this role accessible to the Portal domain object.
|
||||||
public void setSuperPortlet(final Portlet portlet) {
|
public void setSuperPortlet(final Portlet portlet) {
|
||||||
Assert.assertNotNull(portlet);
|
Assert.exists(portlet);
|
||||||
|
|
||||||
setAssociation("superportlet", portlet);
|
setAssociation("superportlet", portlet);
|
||||||
|
|
||||||
|
|
@ -89,7 +90,7 @@ public class AgentPortlet extends Portlet {
|
||||||
|
|
||||||
Portlet portlet = Portlet.retrievePortlet(dataObject);
|
Portlet portlet = Portlet.retrievePortlet(dataObject);
|
||||||
|
|
||||||
Assert.assertNotNull(portlet);
|
Assert.exists(portlet);
|
||||||
|
|
||||||
return portlet;
|
return portlet;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,11 +29,8 @@ import java.util.ArrayList;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* <p>A default implementation of {@link com.arsdigita.bebop.portal.PortalModel}
|
||||||
*
|
* that provides a stateful backing to the Bebop portal classes.</p>
|
||||||
* <p>A default implementation of {@link
|
|
||||||
* com.arsdigita.bebop.portal.PortalModel} that provides a stateful
|
|
||||||
* backing to the Bebop portal classes.</p>
|
|
||||||
*
|
*
|
||||||
* @see com.arsdigita.bebop.portal.PortalModel
|
* @see com.arsdigita.bebop.portal.PortalModel
|
||||||
* @see Portal
|
* @see Portal
|
||||||
|
|
@ -43,7 +40,6 @@ import java.math.BigDecimal;
|
||||||
* @version $Id: DefaultPortalModel.java 287 2005-02-22 00:29:02Z sskracic $
|
* @version $Id: DefaultPortalModel.java 287 2005-02-22 00:29:02Z sskracic $
|
||||||
*/
|
*/
|
||||||
public class DefaultPortalModel implements PortalModel {
|
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
|
private static Category s_cat = Category.getInstance
|
||||||
(DefaultPortalModel.class.getName());
|
(DefaultPortalModel.class.getName());
|
||||||
|
|
@ -62,15 +58,15 @@ public class DefaultPortalModel implements PortalModel {
|
||||||
public DefaultPortalModel
|
public DefaultPortalModel
|
||||||
(PageState pageState, BigDecimalParameter portalIDParam) {
|
(PageState pageState, BigDecimalParameter portalIDParam) {
|
||||||
|
|
||||||
Assert.assertNotNull(pageState);
|
Assert.exists(pageState);
|
||||||
Assert.assertNotNull(portalIDParam);
|
Assert.exists(portalIDParam);
|
||||||
|
|
||||||
BigDecimal portalID = (BigDecimal)pageState.getValue
|
BigDecimal portalID = (BigDecimal)pageState.getValue
|
||||||
(portalIDParam);
|
(portalIDParam);
|
||||||
|
|
||||||
m_portal = Portal.retrieve(portalID);
|
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
|
* @pre portalID != null
|
||||||
*/
|
*/
|
||||||
public DefaultPortalModel(BigDecimal portalID) {
|
public DefaultPortalModel(BigDecimal portalID) {
|
||||||
Assert.assertNotNull(portalID);
|
Assert.exists(portalID);
|
||||||
|
|
||||||
m_portal = Portal.retrieve(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
|
* @pre portal != null
|
||||||
*/
|
*/
|
||||||
public DefaultPortalModel(Portal portal) {
|
public DefaultPortalModel(Portal portal) {
|
||||||
Assert.assertNotNull(portal);
|
Assert.exists(portal);
|
||||||
|
|
||||||
m_portal = portal;
|
m_portal = portal;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,6 @@ import org.apache.log4j.Logger;
|
||||||
* @version $Id: Initializer.java 738 2005-09-01 12:36:52Z sskracic $
|
* @version $Id: Initializer.java 738 2005-09-01 12:36:52Z sskracic $
|
||||||
*/
|
*/
|
||||||
public class Initializer implements com.arsdigita.initializer.Initializer {
|
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 static Logger s_log = Logger.getLogger(Initializer.class);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,11 +47,11 @@ import org.apache.log4j.Logger;
|
||||||
* <p>
|
* <p>
|
||||||
* A Portal is a Persistence-backed framework for aggregating content
|
* A Portal is a Persistence-backed framework for aggregating content
|
||||||
* from multiple web applications/content sources.
|
* from multiple web applications/content sources.
|
||||||
* The <code>com.arsdigita.portal
|
* The <code>com.arsdigita.portal</code> package is an infrastructural package
|
||||||
* </code> package is an infrastructural package that can be used to quickly
|
* that can be used to quickly implement a basic portal server, but is
|
||||||
* implement a basic portal server, but is primarily intended as a
|
* primarily intended as a foundation for the development of more sophisticated
|
||||||
* foundation for the development of more sophisticated Portal systems such as
|
* Portal systems such as workspaces that feature multiple portals as named tabs
|
||||||
* workspaces that feature multiple portals as named tabs within the workspace.
|
* within the workspace.
|
||||||
* </p>
|
* </p>
|
||||||
* <p>
|
* <p>
|
||||||
* Containment properties of Portals, such as versioning, permissioning, and
|
* 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 $
|
* @version $Id: Portal.java 287 2005-02-22 00:29:02Z sskracic $
|
||||||
*/
|
*/
|
||||||
public class Portal extends Resource {
|
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 =
|
public static final String BASE_DATA_OBJECT_TYPE =
|
||||||
"com.arsdigita.portal.Portal";
|
"com.arsdigita.portal.Portal";
|
||||||
|
|
@ -74,14 +73,29 @@ public class Portal extends Resource {
|
||||||
return BASE_DATA_OBJECT_TYPE;
|
return BASE_DATA_OBJECT_TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
* @param dataObject
|
||||||
|
*/
|
||||||
protected Portal(DataObject dataObject) {
|
protected Portal(DataObject dataObject) {
|
||||||
super(dataObject);
|
super(dataObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @param dataObjectType
|
||||||
|
*/
|
||||||
protected Portal(String dataObjectType) {
|
protected Portal(String dataObjectType) {
|
||||||
super(dataObjectType);
|
super(dataObjectType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @param oid
|
||||||
|
* @throws com.arsdigita.domain.DataObjectNotFoundException
|
||||||
|
*/
|
||||||
public Portal(OID oid) throws DataObjectNotFoundException {
|
public Portal(OID oid) throws DataObjectNotFoundException {
|
||||||
super(oid);
|
super(oid);
|
||||||
}
|
}
|
||||||
|
|
@ -179,6 +193,10 @@ public class Portal extends Resource {
|
||||||
return new Portal(dataObject);
|
return new Portal(dataObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public static PortalCollection retrieveAll() {
|
public static PortalCollection retrieveAll() {
|
||||||
DataCollection dataCollection =
|
DataCollection dataCollection =
|
||||||
SessionManager.getSession().retrieve(BASE_DATA_OBJECT_TYPE);
|
SessionManager.getSession().retrieve(BASE_DATA_OBJECT_TYPE);
|
||||||
|
|
@ -269,7 +287,7 @@ public class Portal extends Resource {
|
||||||
*/
|
*/
|
||||||
public void addPortlet(Portlet portlet, int cellNumber) {
|
public void addPortlet(Portlet portlet, int cellNumber) {
|
||||||
Assert.exists(portlet, Portlet.class);
|
Assert.exists(portlet, Portlet.class);
|
||||||
Assert.truth(cellNumber >= 1, "cellNumber >= 1");
|
Assert.isTrue(cellNumber >= 1, "cellNumber >= 1");
|
||||||
|
|
||||||
LinkedList portletList = getPortletListForCell(cellNumber);
|
LinkedList portletList = getPortletListForCell(cellNumber);
|
||||||
synchronized (portletList) {
|
synchronized (portletList) {
|
||||||
|
|
@ -325,7 +343,7 @@ public class Portal extends Resource {
|
||||||
LinkedList portletList = getPortletListForCell(portlet.getCellNumber());
|
LinkedList portletList = getPortletListForCell(portlet.getCellNumber());
|
||||||
int currentIndex = portletList.indexOf(portlet);
|
int currentIndex = portletList.indexOf(portlet);
|
||||||
|
|
||||||
Assert.truth(currentIndex != -1, "Portlet not found.");
|
Assert.isTrue(currentIndex != -1, "Portlet not found.");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
synchronized (portletList) {
|
synchronized (portletList) {
|
||||||
|
|
@ -345,7 +363,7 @@ public class Portal extends Resource {
|
||||||
LinkedList portletList = getPortletListForCell(portlet.getCellNumber());
|
LinkedList portletList = getPortletListForCell(portlet.getCellNumber());
|
||||||
int currentIndex = portletList.indexOf(portlet);
|
int currentIndex = portletList.indexOf(portlet);
|
||||||
|
|
||||||
Assert.truth(currentIndex != -1, "Portlet not found.");
|
Assert.isTrue(currentIndex != -1, "Portlet not found.");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
synchronized (portletList) {
|
synchronized (portletList) {
|
||||||
|
|
@ -365,7 +383,7 @@ public class Portal extends Resource {
|
||||||
LinkedList portletList = getPortletListForCell(portlet.getCellNumber());
|
LinkedList portletList = getPortletListForCell(portlet.getCellNumber());
|
||||||
int currentIndex = portletList.indexOf(portlet);
|
int currentIndex = portletList.indexOf(portlet);
|
||||||
|
|
||||||
Assert.truth(currentIndex != -1, "Portlet not found.");
|
Assert.isTrue(currentIndex != -1, "Portlet not found.");
|
||||||
|
|
||||||
synchronized (portletList) {
|
synchronized (portletList) {
|
||||||
portletList.remove(currentIndex);
|
portletList.remove(currentIndex);
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,19 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2002-2004 Red Hat Inc. All Rights Reserved.
|
* Copyright (C) 2002-2004 Red Hat Inc. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or modify it under
|
||||||
* modify it under the terms of the GNU Lesser General Public License
|
* the terms of the GNU Lesser General Public License as published by the
|
||||||
* as published by the Free Software Foundation; either version 2.1 of
|
* Free Software Foundation; either version 2.1 of the License, or (at your option)
|
||||||
* the License, or (at your option) any later version.
|
* any later version.
|
||||||
*
|
*
|
||||||
* This library is distributed in the hope that it will be useful,
|
* This library is distributed in the hope that it will be useful, but WITHOUT
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
||||||
* Lesser General Public License for more details.
|
* details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
* License along with this library; if not, write to the Free Software
|
* along with this library; if not, write to the Free Software Foundation, Inc.,
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
package com.arsdigita.portal;
|
package com.arsdigita.portal;
|
||||||
|
|
@ -24,14 +24,15 @@ import com.arsdigita.persistence.DataCollection;
|
||||||
import com.arsdigita.util.Assert;
|
import com.arsdigita.util.Assert;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* <p>Collection of Portals.</p>
|
||||||
*
|
* <p>
|
||||||
|
* Describes a set of portal domain objects.
|
||||||
|
* </p>
|
||||||
* @see Portal
|
* @see Portal
|
||||||
* @author Justin Ross
|
* @author Justin Ross
|
||||||
* @version $Id: PortalCollection.java 287 2005-02-22 00:29:02Z sskracic $
|
* @version $Id: PortalCollection.java 287 2005-02-22 00:29:02Z sskracic $
|
||||||
*/
|
*/
|
||||||
public class PortalCollection extends ACSObjectCollection {
|
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) {
|
protected PortalCollection(DataCollection dataCollection) {
|
||||||
super(dataCollection);
|
super(dataCollection);
|
||||||
|
|
@ -48,7 +49,7 @@ public class PortalCollection extends ACSObjectCollection {
|
||||||
|
|
||||||
Portal portal = Portal.retrieve(dataObject);
|
Portal portal = Portal.retrieve(dataObject);
|
||||||
|
|
||||||
Assert.assertNotNull(portal, "portal");
|
Assert.exists(portal, "portal");
|
||||||
|
|
||||||
return portal;
|
return portal;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -37,9 +37,8 @@ import org.apache.log4j.Logger;
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* A Portlet is a domain class that provides a window or <i>channel</i> into
|
* A Portlet is a domain class that provides a window or <i>channel</i> into
|
||||||
* a content source
|
* a content source (such as a web application, content item, remote content site).
|
||||||
* ( such as a web application, content item, remote content site). The
|
* The portlet is added, usually along with other portlets, to a {@link Portal}
|
||||||
* portlet is added, usually along with other portlets, to a {@link Portal}
|
|
||||||
* which provides a way for multiple sources of content to be agregated
|
* which provides a way for multiple sources of content to be agregated
|
||||||
* on one web page view.</p>
|
* on one web page view.</p>
|
||||||
* <p>
|
* <p>
|
||||||
|
|
|
||||||
|
|
@ -24,8 +24,6 @@ import com.arsdigita.persistence.DataCollection;
|
||||||
import com.arsdigita.util.Assert;
|
import com.arsdigita.util.Assert;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* <p>Describes a set of portlet domain objects.</p>
|
* <p>Describes a set of portlet domain objects.</p>
|
||||||
*
|
*
|
||||||
* @see Portlet
|
* @see Portlet
|
||||||
|
|
@ -36,7 +34,10 @@ import com.arsdigita.util.Assert;
|
||||||
* @version $Id: PortletCollection.java 287 2005-02-22 00:29:02Z sskracic $
|
* @version $Id: PortletCollection.java 287 2005-02-22 00:29:02Z sskracic $
|
||||||
*/
|
*/
|
||||||
public class PortletCollection extends ApplicationCollection {
|
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) {
|
public PortletCollection(DataCollection dataCollection) {
|
||||||
super(dataCollection);
|
super(dataCollection);
|
||||||
|
|
@ -53,7 +54,7 @@ public class PortletCollection extends ApplicationCollection {
|
||||||
|
|
||||||
Portlet portlet = Portlet.retrievePortlet(dataObject);
|
Portlet portlet = Portlet.retrievePortlet(dataObject);
|
||||||
|
|
||||||
Assert.assertNotNull(portlet);
|
Assert.exists(portlet);
|
||||||
|
|
||||||
return portlet;
|
return portlet;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,10 @@ import java.util.ArrayList;
|
||||||
* @version $Id: PortletSetup.java 287 2005-02-22 00:29:02Z sskracic $
|
* @version $Id: PortletSetup.java 287 2005-02-22 00:29:02Z sskracic $
|
||||||
*/
|
*/
|
||||||
public class PortletSetup {
|
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_profile;
|
||||||
protected String m_key = null;
|
protected String m_key = null;
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,7 @@ import com.arsdigita.web.Web;
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @author Justin Ross
|
* @author Justin Ross
|
||||||
|
* @version $Id: PortletType.java 287 2005-02-22 00:29:02Z sskracic $
|
||||||
*/
|
*/
|
||||||
public class PortletType extends ResourceType {
|
public class PortletType extends ResourceType {
|
||||||
|
|
||||||
|
|
@ -72,9 +73,9 @@ public class PortletType extends ResourceType {
|
||||||
String portletObjectType) {
|
String portletObjectType) {
|
||||||
super(dataObjectType);
|
super(dataObjectType);
|
||||||
|
|
||||||
Assert.assertNotNull(title, "title");
|
Assert.exists(title, "title");
|
||||||
Assert.assertNotNull(profile, "profile");
|
Assert.exists(profile, "profile");
|
||||||
Assert.assertNotNull(portletObjectType, "portletObjectType");
|
Assert.exists(portletObjectType, "portletObjectType");
|
||||||
|
|
||||||
PackageType packageType = null;
|
PackageType packageType = null;
|
||||||
|
|
||||||
|
|
@ -106,36 +107,36 @@ public class PortletType extends ResourceType {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static PortletType retrievePortletType(BigDecimal id) {
|
public static PortletType retrievePortletType(BigDecimal id) {
|
||||||
Assert.assertNotNull(id, "id");
|
Assert.exists(id, "id");
|
||||||
|
|
||||||
return PortletType.retrievePortletType
|
return PortletType.retrievePortletType
|
||||||
(new OID(BASE_DATA_OBJECT_TYPE, id));
|
(new OID(BASE_DATA_OBJECT_TYPE, id));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static PortletType retrievePortletType(OID oid) {
|
public static PortletType retrievePortletType(OID oid) {
|
||||||
Assert.assertNotNull(oid, "oid");
|
Assert.exists(oid, "oid");
|
||||||
|
|
||||||
DataObject dataObject = SessionManager.getSession().retrieve(oid);
|
DataObject dataObject = SessionManager.getSession().retrieve(oid);
|
||||||
|
|
||||||
Assert.assertNotNull(dataObject);
|
Assert.exists(dataObject);
|
||||||
|
|
||||||
return PortletType.retrievePortletType(dataObject);
|
return PortletType.retrievePortletType(dataObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static PortletType retrievePortletType(DataObject dataObject) {
|
public static PortletType retrievePortletType(DataObject dataObject) {
|
||||||
Assert.assertNotNull(dataObject, "dataObject");
|
Assert.exists(dataObject, "dataObject");
|
||||||
|
|
||||||
return new PortletType(dataObject);
|
return new PortletType(dataObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static PortletType retrievePortletTypeForPortlet
|
public static PortletType retrievePortletTypeForPortlet
|
||||||
(String portletObjectType) {
|
(String portletObjectType) {
|
||||||
Assert.assertNotNull(portletObjectType, "portletObjectType");
|
Assert.exists(portletObjectType, "portletObjectType");
|
||||||
|
|
||||||
DataCollection collection =
|
DataCollection collection =
|
||||||
SessionManager.getSession().retrieve(BASE_DATA_OBJECT_TYPE);
|
SessionManager.getSession().retrieve(BASE_DATA_OBJECT_TYPE);
|
||||||
|
|
||||||
Assert.assertNotNull(collection, "collection");
|
Assert.exists(collection, "collection");
|
||||||
|
|
||||||
collection.addEqualsFilter("objectType", portletObjectType);
|
collection.addEqualsFilter("objectType", portletObjectType);
|
||||||
|
|
||||||
|
|
@ -158,7 +159,7 @@ public class PortletType extends ResourceType {
|
||||||
DataCollection collection =
|
DataCollection collection =
|
||||||
SessionManager.getSession().retrieve(BASE_DATA_OBJECT_TYPE);
|
SessionManager.getSession().retrieve(BASE_DATA_OBJECT_TYPE);
|
||||||
|
|
||||||
Assert.assertNotNull(collection, "collection");
|
Assert.exists(collection, "collection");
|
||||||
collection.addEqualsFilter("hasEmbeddedView", Boolean.TRUE);
|
collection.addEqualsFilter("hasEmbeddedView", Boolean.TRUE);
|
||||||
|
|
||||||
return new PortletTypeCollection(collection);
|
return new PortletTypeCollection(collection);
|
||||||
|
|
@ -169,7 +170,7 @@ public class PortletType extends ResourceType {
|
||||||
//
|
//
|
||||||
|
|
||||||
public void setProviderApplicationType(ApplicationType applicationType) {
|
public void setProviderApplicationType(ApplicationType applicationType) {
|
||||||
Assert.assertNotNull(applicationType, "applicationType");
|
Assert.exists(applicationType, "applicationType");
|
||||||
|
|
||||||
setAssociation("providerApplicationType", applicationType);
|
setAssociation("providerApplicationType", applicationType);
|
||||||
}
|
}
|
||||||
|
|
@ -191,7 +192,7 @@ public class PortletType extends ResourceType {
|
||||||
public boolean hasFullPageView() {
|
public boolean hasFullPageView() {
|
||||||
Boolean hasFullPageView = (Boolean) get("hasFullPageView");
|
Boolean hasFullPageView = (Boolean) get("hasFullPageView");
|
||||||
|
|
||||||
Assert.assertNotNull(hasFullPageView, "hasFullPageView");
|
Assert.exists(hasFullPageView, "hasFullPageView");
|
||||||
|
|
||||||
return hasFullPageView.booleanValue();
|
return hasFullPageView.booleanValue();
|
||||||
}
|
}
|
||||||
|
|
@ -203,7 +204,7 @@ public class PortletType extends ResourceType {
|
||||||
public boolean hasEmbeddedView() {
|
public boolean hasEmbeddedView() {
|
||||||
Boolean hasEmbeddedView = (Boolean)get("hasEmbeddedView");
|
Boolean hasEmbeddedView = (Boolean)get("hasEmbeddedView");
|
||||||
|
|
||||||
Assert.assertNotNull(hasEmbeddedView, "hasEmbeddedView");
|
Assert.exists(hasEmbeddedView, "hasEmbeddedView");
|
||||||
|
|
||||||
return hasEmbeddedView.booleanValue();
|
return hasEmbeddedView.booleanValue();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ public class AppPortlet extends Portlet {
|
||||||
|
|
||||||
AppPortletType portletType = AppPortletType.retrieveAppPortletType(dataObject);
|
AppPortletType portletType = AppPortletType.retrieveAppPortletType(dataObject);
|
||||||
|
|
||||||
Assert.assertNotNull(portletType);
|
Assert.exists(portletType);
|
||||||
|
|
||||||
return portletType;
|
return portletType;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,7 @@ public class AppPortletSetup extends PortletSetup {
|
||||||
notice(" ProviderApplicationType: " + m_provider);
|
notice(" ProviderApplicationType: " + m_provider);
|
||||||
notice(" Key: " + m_key);
|
notice(" Key: " + m_key);
|
||||||
notice(" StyleSheet: " + m_stylesheet);
|
notice(" StyleSheet: " + m_stylesheet);
|
||||||
notice(" IsPortalApplication: " + m_isPortalApplication);
|
notice(" IsPortalApplication: " + m_isPortalApplication);
|
||||||
|
|
||||||
portletType = AppPortletType.createAppPortletType
|
portletType = AppPortletType.createAppPortletType
|
||||||
(m_title, m_profile, m_typeName);
|
(m_title, m_profile, m_typeName);
|
||||||
|
|
@ -106,7 +106,8 @@ public class AppPortletSetup extends PortletSetup {
|
||||||
|
|
||||||
notice("Done installing.");
|
notice("Done installing.");
|
||||||
} else {
|
} else {
|
||||||
portletType = (AppPortletType)AppPortletType.retrieveAppPortletTypeForAppPortlet(m_typeName);
|
portletType = (AppPortletType)
|
||||||
|
AppPortletType.retrieveAppPortletTypeForAppPortlet(m_typeName);
|
||||||
}
|
}
|
||||||
|
|
||||||
DomainObjectFactory.registerInstantiator(m_typeName, m_instantiator);
|
DomainObjectFactory.registerInstantiator(m_typeName, m_instantiator);
|
||||||
|
|
|
||||||
|
|
@ -6,10 +6,23 @@
|
||||||
<body bgcolor="white">
|
<body bgcolor="white">
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|
||||||
Basic portal infrastructure.
|
Basic portal infrastructure.
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
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.
|
||||||
|
<p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Portal server implementations currently include:
|
||||||
|
</p>
|
||||||
|
<ul
|
||||||
|
<li>Red Hat Portal Server (ccm-portalserver)</li>
|
||||||
|
<li>APLAWS portal server (ccm-ldn-portal) </li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -29,13 +29,15 @@ import java.net.URL;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A config class used by the ConfigRegistry itself. Contains the
|
* A config class used by the registry itself.
|
||||||
* waf.config.packages parameter and the waf.config.parents parameter.
|
*
|
||||||
|
* Contains the parameters:
|
||||||
|
* waf.config.packages: comma separated package-key list of installed packages
|
||||||
|
* waf.config.parents :
|
||||||
*
|
*
|
||||||
* @author Rafael H. Schloming <rhs@mit.edu>
|
* @author Rafael H. Schloming <rhs@mit.edu>
|
||||||
* @version $Revision: #6 $ $Date: 2004/08/16 $
|
* @version $Revision: #6 $ $Date: 2004/08/16 $
|
||||||
**/
|
**/
|
||||||
|
|
||||||
public class RegistryConfig extends AbstractConfig {
|
public class RegistryConfig extends AbstractConfig {
|
||||||
|
|
||||||
public final static String versionId =
|
public final static String versionId =
|
||||||
|
|
|
||||||
|
|
@ -53,23 +53,36 @@ import java.util.Set;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An entry point initializer for the CCM runtime. This class may be
|
* An entry point initializer for the CCM runtime used to bootstrap the CCM
|
||||||
* used to bootstrap the CCM runtime environment into a state where it
|
* runtime environment into a state where it is safe to perform database I/O.
|
||||||
* is safe to perform database I/O. It does this by accessing a
|
* It does this by accessing a persistent list of all the initializers
|
||||||
* persistent list of all the initializers required by the currently
|
* required by the currently loaded packages. This guarantees that any of these
|
||||||
* loaded packages. This guarantees that any of these packages has the
|
* packages has the opportunity to load any object-relational metadata and
|
||||||
* opportunity to load any object-relational metadata and register any
|
* register any domain-data coupling metadata before any database I/O is
|
||||||
* domain-data coupling metadata before any database I/O is performed.
|
* performed.
|
||||||
|
*
|
||||||
|
* USAGE:
|
||||||
|
* Construct an instance of this class and invoke its run() method.
|
||||||
|
* <pre>
|
||||||
|
* Startup startup = new Startup();
|
||||||
|
* if ( !startup.hasRun() ) {
|
||||||
|
* startup.run();
|
||||||
|
* }
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
* 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 Rafael Schloming <rhs@mit.edu>
|
||||||
* @author Justin Ross <jross@redhat.com>
|
* @author Justin Ross <jross@redhat.com>
|
||||||
* @version $Id: Startup.java 738 2005-09-01 12:36:52Z sskracic $
|
* @version $Id: Startup.java 738 2005-09-01 12:36:52Z sskracic $
|
||||||
*/
|
*/
|
||||||
public class Startup extends CompoundInitializer {
|
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);
|
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;
|
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() {
|
public Startup() {
|
||||||
this(new PooledConnectionSource
|
this(new PooledConnectionSource
|
||||||
(RuntimeConfig.getConfig().getJDBCURL(),
|
(RuntimeConfig.getConfig().getJDBCURL(),
|
||||||
|
|
@ -108,16 +127,86 @@ public class Startup extends CompoundInitializer {
|
||||||
m_source = source;
|
m_source = source;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addWafInitializer() {
|
|
||||||
String claas = (String)SystemProperties.get(s_init);
|
// Public API
|
||||||
if (claas != null) {
|
|
||||||
if (s_log.isDebugEnabled()) {
|
|
||||||
s_log.debug("adding: " + claas);
|
/**
|
||||||
}
|
* Executes the initialization process using the default session
|
||||||
add((Initializer) Classes.newInstance(claas));
|
* 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.
|
* Adds the runtime initializers from the database.
|
||||||
*/
|
*/
|
||||||
|
|
@ -132,9 +221,20 @@ public class Startup extends CompoundInitializer {
|
||||||
}
|
}
|
||||||
add((Initializer) Classes.newInstance(inits[i]));
|
add((Initializer) Classes.newInstance(inits[i]));
|
||||||
}
|
}
|
||||||
|
|
||||||
addWafInitializer();
|
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.
|
* Fetches the names of initializers loaded into the database.
|
||||||
* Made protected so that test code can override the initializers
|
* 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 <code>Startup</code>-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) {
|
private static void sort(String[] inits, Session session, MetadataRoot mroot) {
|
||||||
Set all = new HashSet(Arrays.asList(inits));
|
Set all = new HashSet(Arrays.asList(inits));
|
||||||
Set provided = new HashSet();
|
Set provided = new HashSet();
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,12 @@
|
||||||
<body bgcolor="white">
|
<body bgcolor="white">
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
(Original description)
|
||||||
Basic user interface components for the administrative UI.
|
Basic user interface components for the administrative UI.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Package implements the WAF administration panel, usually mouned at /ccm/admin,
|
||||||
|
used for administration of users and groups.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
|
||||||
|
|
@ -35,10 +35,6 @@ import java.util.Iterator;
|
||||||
* @version $Id: MapParameter.java 287 2005-02-22 00:29:02Z sskracic $
|
* @version $Id: MapParameter.java 287 2005-02-22 00:29:02Z sskracic $
|
||||||
*/
|
*/
|
||||||
public class MapParameter extends AbstractParameter {
|
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;
|
private final ArrayList m_params;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -49,10 +49,10 @@ import org.apache.log4j.Logger;
|
||||||
* @version $Id: ApplicationType.java 1520 2007-03-22 13:36:04Z chrisgilbert23 $
|
* @version $Id: ApplicationType.java 1520 2007-03-22 13:36:04Z chrisgilbert23 $
|
||||||
*/
|
*/
|
||||||
public class ApplicationType extends ResourceType {
|
public class ApplicationType extends ResourceType {
|
||||||
public static final String versionId =
|
// public static final String versionId =
|
||||||
"$Id: ApplicationType.java 1520 2007-03-22 13:36:04Z chrisgilbert23 $" +
|
// "$Id: ApplicationType.java 1520 2007-03-22 13:36:04Z chrisgilbert23 $" +
|
||||||
"$Author: chrisgilbert23 $" +
|
// "$Author: chrisgilbert23 $" +
|
||||||
"$DateTime: 2004/08/16 18:10:38 $";
|
// "$DateTime: 2004/08/16 18:10:38 $";
|
||||||
|
|
||||||
private static final Logger s_log = Logger.getLogger
|
private static final Logger s_log = Logger.getLogger
|
||||||
(ApplicationType.class);
|
(ApplicationType.class);
|
||||||
|
|
@ -102,9 +102,8 @@ public class ApplicationType extends ResourceType {
|
||||||
final boolean createContainerGroup) {
|
final boolean createContainerGroup) {
|
||||||
this(objectType);
|
this(objectType);
|
||||||
|
|
||||||
Assert.assertNotNull(title, "String title");
|
Assert.exists(title, "String title");
|
||||||
Assert.assertNotNull(applicationObjectType,
|
Assert.exists(applicationObjectType, "String applicationObjectType");
|
||||||
"String applicationObjectType");
|
|
||||||
|
|
||||||
setTitle(title);
|
setTitle(title);
|
||||||
setApplicationObjectType(applicationObjectType);
|
setApplicationObjectType(applicationObjectType);
|
||||||
|
|
@ -125,9 +124,10 @@ public class ApplicationType extends ResourceType {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new application type. Types created via this
|
* Creates a new "legacy free" application type.
|
||||||
* constructor are "legacy free" and do not create a legacy
|
*
|
||||||
* package type for compatibility with older applications.
|
* 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,
|
public ApplicationType(final String title,
|
||||||
final String applicationObjectType) {
|
final String applicationObjectType) {
|
||||||
|
|
@ -213,7 +213,8 @@ public class ApplicationType extends ResourceType {
|
||||||
public static ApplicationType createApplicationType
|
public static ApplicationType createApplicationType
|
||||||
(String key, String title, String applicationObjectType) {
|
(String key, String title, String applicationObjectType) {
|
||||||
|
|
||||||
return ApplicationType.createApplicationType(key, title, applicationObjectType, false);
|
return ApplicationType.createApplicationType(
|
||||||
|
key, title, applicationObjectType, false);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ import com.arsdigita.cms.docmgr.Document;
|
||||||
import com.arsdigita.cms.docmgr.DocumentCategoryBrowserApplication;
|
import com.arsdigita.cms.docmgr.DocumentCategoryBrowserApplication;
|
||||||
import com.arsdigita.cms.docmgr.LegacyCategoryBrowserApplication;
|
import com.arsdigita.cms.docmgr.LegacyCategoryBrowserApplication;
|
||||||
import com.arsdigita.cms.docmgr.Repository;
|
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.CategoryDocsNavigatorPortlet;
|
||||||
import com.arsdigita.cms.docmgr.ui.LegacyCategoryDocsNavigatorPortlet;
|
import com.arsdigita.cms.docmgr.ui.LegacyCategoryDocsNavigatorPortlet;
|
||||||
import com.arsdigita.cms.docmgr.ui.RecentUpdatedDocsPortlet;
|
import com.arsdigita.cms.docmgr.ui.RecentUpdatedDocsPortlet;
|
||||||
|
|
@ -51,10 +51,8 @@ import com.arsdigita.web.ApplicationType;
|
||||||
* @version $Revision: #11 $ $Date: 2004/01/14 $
|
* @version $Revision: #11 $ $Date: 2004/01/14 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//public class Initializer implements com.arsdigita.initializer.Initializer {
|
|
||||||
public class Initializer extends CompoundInitializer {
|
public class Initializer extends CompoundInitializer {
|
||||||
|
|
||||||
|
|
||||||
private Configuration m_conf = new Configuration();
|
private Configuration m_conf = new Configuration();
|
||||||
|
|
||||||
private static final String SEPARATOR = java.io.File.separator;
|
private static final String SEPARATOR = java.io.File.separator;
|
||||||
|
|
|
||||||
|
|
@ -35,9 +35,10 @@ import com.arsdigita.kernel.ACSObject;
|
||||||
import com.arsdigita.london.terms.Term;
|
import com.arsdigita.london.terms.Term;
|
||||||
import com.arsdigita.london.terms.Domain;
|
import com.arsdigita.london.terms.Domain;
|
||||||
import com.arsdigita.categorization.ui.ACSObjectCategoryForm;
|
import com.arsdigita.categorization.ui.ACSObjectCategoryForm;
|
||||||
import com.arsdigita.cms.ContentItem;
|
// unused imports
|
||||||
import com.arsdigita.cms.CMS;
|
// import com.arsdigita.cms.ContentItem;
|
||||||
import com.arsdigita.cms.ui.authoring.ItemCategoryForm;
|
// import com.arsdigita.cms.CMS;
|
||||||
|
// import com.arsdigita.cms.ui.authoring.ItemCategoryForm;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -51,7 +52,8 @@ import org.apache.log4j.Logger;
|
||||||
* chris gilbert
|
* chris gilbert
|
||||||
*/
|
*/
|
||||||
public abstract class ACSObjectCategoryPicker extends SimpleContainer {
|
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 ACSObjectCategoryForm m_form;
|
||||||
private BigDecimalParameter m_root;
|
private BigDecimalParameter m_root;
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
@ -72,7 +72,8 @@ import java.util.List;
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
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.domain.xml.TraversalHandler;
|
||||||
import com.arsdigita.xml.XML;
|
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 $
|
* @version $Id: Initializer.java 755 2005-09-02 13:42:47Z sskracic $
|
||||||
*/
|
*/
|
||||||
public class Initializer extends CompoundInitializer {
|
public class Initializer extends CompoundInitializer {
|
||||||
public final static String versionId =
|
// public final static String versionId =
|
||||||
"$Id: Initializer.java 755 2005-09-02 13:42:47Z sskracic $" +
|
// "$Id: Initializer.java 755 2005-09-02 13:42:47Z sskracic $" +
|
||||||
"$Author: sskracic $" +
|
// "$Author: sskracic $" +
|
||||||
"$DateTime: 2004/03/15 11:10:54 $";
|
// "$DateTime: 2004/03/15 11:10:54 $";
|
||||||
|
|
||||||
public static final Logger s_log = Logger.getLogger(Initializer.class);
|
public static final Logger s_log = Logger.getLogger(Initializer.class);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,8 @@
|
||||||
|
|
||||||
package com.arsdigita.london.navigation;
|
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.domain.DomainObject;
|
||||||
import com.arsdigita.kernel.ACSObjectInstantiator;
|
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 $
|
* @version $Id: Loader.java 287 2005-02-22 00:29:02Z sskracic $
|
||||||
*/
|
*/
|
||||||
public class Loader extends PackageLoader {
|
public class Loader extends PackageLoader {
|
||||||
public final static String versionId =
|
// public final static String versionId =
|
||||||
"$Id: Loader.java 287 2005-02-22 00:29:02Z sskracic $" +
|
// "$Id: Loader.java 287 2005-02-22 00:29:02Z sskracic $" +
|
||||||
"$Author: sskracic $" +
|
// "$Author: sskracic $" +
|
||||||
"$DateTime: 2004/03/03 12:26:48 $";
|
// "$DateTime: 2004/03/03 12:26:48 $";
|
||||||
|
|
||||||
private static final Logger s_log = Logger.getLogger(Loader.class);
|
private static final Logger s_log = Logger.getLogger(Loader.class);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,14 @@ import com.arsdigita.london.navigation.DataCollectionDefinition;
|
||||||
import com.arsdigita.london.navigation.cms.CMSDataCollectionDefinition;
|
import com.arsdigita.london.navigation.cms.CMSDataCollectionDefinition;
|
||||||
import com.arsdigita.london.navigation.ui.portlet.ItemListPortletRenderer;
|
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 {
|
public class ItemListPortlet extends ObjectListPortlet {
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,14 @@ import java.util.StringTokenizer;
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
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 {
|
public class ObjectListPortlet extends Portlet {
|
||||||
private static final Logger s_log =
|
private static final Logger s_log =
|
||||||
Logger.getLogger( ObjectListPortlet.class );
|
Logger.getLogger( ObjectListPortlet.class );
|
||||||
|
|
|
||||||
|
|
@ -64,8 +64,8 @@ import com.arsdigita.xml.XML;
|
||||||
* @version $Id: Initializer.java 1739 2008-08-15 01:15:21Z terry $
|
* @version $Id: Initializer.java 1739 2008-08-15 01:15:21Z terry $
|
||||||
*/
|
*/
|
||||||
public class Initializer extends CompoundInitializer {
|
public class Initializer extends CompoundInitializer {
|
||||||
public final static String versionId = "$Id: Initializer.java 1739 2008-08-15 01:15:21Z terry $"
|
// 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 $";
|
// + "$Author: terry $" + "$DateTime: 2004/03/02 06:33:42 $";
|
||||||
|
|
||||||
private static final Logger s_log = Logger.getLogger(Initializer.class);
|
private static final Logger s_log = Logger.getLogger(Initializer.class);
|
||||||
|
|
||||||
|
|
@ -276,7 +276,9 @@ public class Initializer extends CompoundInitializer {
|
||||||
|
|
||||||
FlashPortletInitializer.initialize();
|
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());
|
new DefaultNavigationModel());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -42,14 +42,24 @@ import com.arsdigita.web.Application;
|
||||||
import com.arsdigita.web.ApplicationType;
|
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>
|
* @author Justin Ross <jross@redhat.com>
|
||||||
* @version $Id: Loader.java 1718 2008-07-16 14:08:38Z terry $
|
* @version $Id: Loader.java 1718 2008-07-16 14:08:38Z terry $
|
||||||
*/
|
*/
|
||||||
public class Loader extends PackageLoader {
|
public class Loader extends PackageLoader {
|
||||||
public final static String versionId = "$Id: Loader.java 1718 2008-07-16 14:08:38Z terry $"
|
// versionID no longer used as a system variable. version information is
|
||||||
+ "$Author: terry $" + "$DateTime: 2004/03/02 06:33:42 $";
|
// 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);
|
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",
|
"com.arsdigita.london.portal.default_is_public",
|
||||||
Parameter.REQUIRED, Boolean.TRUE);
|
Parameter.REQUIRED, Boolean.TRUE);
|
||||||
|
|
||||||
public Loader() {
|
/**
|
||||||
|
* Standard constructor.
|
||||||
|
*/
|
||||||
|
public Loader() {
|
||||||
register(m_isPublic);
|
register(m_isPublic);
|
||||||
register(m_url);
|
register(m_url);
|
||||||
register(m_title);
|
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() {
|
new KernelExcursion() {
|
||||||
public void excurse() {
|
public void excurse() {
|
||||||
setEffectiveParty(Kernel.getSystemParty());
|
setEffectiveParty(Kernel.getSystemParty());
|
||||||
|
|
@ -91,15 +109,23 @@ public class Loader extends PackageLoader {
|
||||||
}.run();
|
}.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();
|
ApplicationType type = setupWorkspaceType();
|
||||||
|
|
||||||
if (url != null) {
|
if (url != null) {
|
||||||
s_log.debug("process url " + url);
|
|
||||||
|
|
||||||
Assert.truth(url.startsWith("/"), "url starts with /");
|
// check weather the url parameter is properly formatted
|
||||||
Assert.truth(url.endsWith("/"), "url ends with /");
|
s_log.debug("process url " + url);
|
||||||
Assert.truth(!url.equals("/"), "url is not /");
|
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);
|
int last = url.lastIndexOf("/", url.length() - 2);
|
||||||
s_log.debug("last slash at " + last);
|
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(
|
ApplicationType type = ApplicationType.createApplicationType(
|
||||||
"workspace", "Portal Workspace",
|
"workspace", "Portal Workspace",
|
||||||
Workspace.BASE_DATA_OBJECT_TYPE);
|
Workspace.BASE_DATA_OBJECT_TYPE);
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,12 @@ import com.arsdigita.web.Web;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.LinkedList;
|
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 {
|
public class Workspace extends Application {
|
||||||
|
|
||||||
private static final Logger s_log = Logger.getLogger(Workspace.class);
|
private static final Logger s_log = Logger.getLogger(Workspace.class);
|
||||||
|
|
@ -83,11 +89,20 @@ public class Workspace extends Application {
|
||||||
*/
|
*/
|
||||||
private static Workspace defaultHomepageWorkspace = null;
|
private static Workspace defaultHomepageWorkspace = null;
|
||||||
|
|
||||||
public Workspace(DataObject obj) {
|
/**
|
||||||
|
* Constructor
|
||||||
|
* @param obj
|
||||||
|
*/
|
||||||
|
public Workspace(DataObject obj) {
|
||||||
super(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);
|
super(oid);
|
||||||
}
|
}
|
||||||
|
|
@ -96,24 +111,57 @@ public class Workspace extends Application {
|
||||||
* public String getContextPath() { return "ccm-ldn-portal"; }
|
* 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 "/files";
|
||||||
return "/ccm-ldn-portal/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) {
|
Application parent, boolean isPublic) {
|
||||||
return createWorkspace(url, title, PageLayout.getDefaultLayout(),
|
return createWorkspace(url, title, PageLayout.getDefaultLayout(),
|
||||||
parent, isPublic);
|
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) {
|
Application parent, User owner) {
|
||||||
return createWorkspace(url, title, PageLayout.getDefaultLayout(),
|
return createWorkspace(url, title, PageLayout.getDefaultLayout(),
|
||||||
parent, owner);
|
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) {
|
PageLayout layout, Application parent, boolean isPublic) {
|
||||||
if (s_log.isDebugEnabled()) {
|
if (s_log.isDebugEnabled()) {
|
||||||
s_log.debug("Creating group workspace, isPublic:" + isPublic
|
s_log.debug("Creating group workspace, isPublic:" + isPublic
|
||||||
|
|
@ -128,7 +176,17 @@ public class Workspace extends Application {
|
||||||
return workspace;
|
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) {
|
PageLayout layout, Application parent, User owner) {
|
||||||
if (s_log.isDebugEnabled()) {
|
if (s_log.isDebugEnabled()) {
|
||||||
s_log.debug("Creating personal workspace for " + owner.getOID()
|
s_log.debug("Creating personal workspace for " + owner.getOID()
|
||||||
|
|
@ -692,8 +750,7 @@ public class Workspace extends Application {
|
||||||
Workspace workspace = (Workspace) Application
|
Workspace workspace = (Workspace) Application
|
||||||
.retrieveApplication(personalWorkspaces.getDataObject());
|
.retrieveApplication(personalWorkspaces.getDataObject());
|
||||||
if (personalWorkspaces.next())
|
if (personalWorkspaces.next())
|
||||||
s_log
|
s_log.error("more than one personal workspaces for this user!!");
|
||||||
.error("more than one personal workspaces for this user!!");
|
|
||||||
personalWorkspaces.close();
|
personalWorkspaces.close();
|
||||||
|
|
||||||
return workspace;
|
return workspace;
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,8 @@ public class WorkspacePage extends Portal {
|
||||||
|
|
||||||
public static final String WORKSPACE = "workspace";
|
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() {
|
public WorkspacePage() {
|
||||||
this(BASE_DATA_OBJECT_TYPE);
|
this(BASE_DATA_OBJECT_TYPE);
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Portal</title>
|
||||||
|
</head>
|
||||||
|
<body bgcolor="white">
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Implementation of a (simple) portal based upon ccm-core basic portal
|
||||||
|
infrastructure.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -25,10 +25,17 @@ import com.arsdigita.london.portal.ui.portlet.ContentDirectoryPortletRenderer;
|
||||||
import com.arsdigita.persistence.DataObject;
|
import com.arsdigita.persistence.DataObject;
|
||||||
import com.arsdigita.portal.Portlet;
|
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 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";
|
public static final String ROOT = "root";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,10 +20,15 @@ import com.arsdigita.london.portal.ui.portlet.WorkspaceDirectoryPortletRenderer;
|
||||||
import com.arsdigita.persistence.DataObject;
|
import com.arsdigita.persistence.DataObject;
|
||||||
import com.arsdigita.portal.Portlet;
|
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 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";
|
public static final String CONTENT = "content";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,14 @@ import java.io.IOException;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
// XXX this class is disgusting
|
// 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 class PersistentPortal extends SimpleContainer {
|
||||||
|
|
||||||
public static final String ACTION_CUSTOMIZE = "customize";
|
public static final String ACTION_CUSTOMIZE = "customize";
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,8 @@
|
||||||
xmlns:define="/WEB-INF/bebop-define.tld"
|
xmlns:define="/WEB-INF/bebop-define.tld"
|
||||||
xmlns:show="/WEB-INF/bebop-show.tld"
|
xmlns:show="/WEB-INF/bebop-show.tld"
|
||||||
version="1.2">
|
version="1.2">
|
||||||
|
<%-- This page is used by class in method getChannel(PageState pageState)
|
||||||
|
com.arsdigita.london.portal.ui.WorkspaceDirectoryComponent --%>
|
||||||
|
|
||||||
<jsp:directive.page import="com.arsdigita.dispatcher.DispatcherHelper"/>
|
<jsp:directive.page import="com.arsdigita.dispatcher.DispatcherHelper"/>
|
||||||
|
|
||||||
|
|
@ -10,8 +12,13 @@
|
||||||
DispatcherHelper.cacheDisable(response);
|
DispatcherHelper.cacheDisable(response);
|
||||||
</jsp:scriptlet>
|
</jsp:scriptlet>
|
||||||
|
|
||||||
<define:page name="itemPage" application="portal" title="Workspace Directory" cache="true">
|
<define:page name="itemPage"
|
||||||
<define:component name="left" classname="com.arsdigita.london.portal.ui.WorkspaceDirectoryComponent" />
|
application="portal"
|
||||||
|
title="Workspace Directory"
|
||||||
|
cache="true">
|
||||||
|
<define:component
|
||||||
|
name="left"
|
||||||
|
classname="com.arsdigita.london.portal.ui.WorkspaceDirectoryComponent" />
|
||||||
</define:page>
|
</define:page>
|
||||||
|
|
||||||
<show:all/>
|
<show:all/>
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,6 @@ public class Initializer extends CompoundInitializer {
|
||||||
("ccm-ldn-rss.pdl.mf",
|
("ccm-ldn-rss.pdl.mf",
|
||||||
new NameFilter(DbHelper.getDatabaseSuffix(database), "pdl"))));
|
new NameFilter(DbHelper.getDatabaseSuffix(database), "pdl"))));
|
||||||
|
|
||||||
// XXX rss.enterprise.init is empty. not needed here
|
|
||||||
add(new LegacyInitializer("com/arsdigita/london/rss/enterprise.init"));
|
add(new LegacyInitializer("com/arsdigita/london/rss/enterprise.init"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -64,13 +64,16 @@ import java.util.Set;
|
||||||
* @version $Id: Loader.java 755 2005-09-02 13:42:47Z sskracic $
|
* @version $Id: Loader.java 755 2005-09-02 13:42:47Z sskracic $
|
||||||
*/
|
*/
|
||||||
public class Loader extends PackageLoader {
|
public class Loader extends PackageLoader {
|
||||||
public final static String versionId =
|
//public final static String versionId =
|
||||||
"$Id: Loader.java 755 2005-09-02 13:42:47Z sskracic $" +
|
// "$Id: Loader.java 755 2005-09-02 13:42:47Z sskracic $" +
|
||||||
"$Author: sskracic $" +
|
// "$Author: sskracic $" +
|
||||||
"$DateTime: 2004/03/25 09:34:39 $";
|
// "$DateTime: 2004/03/25 09:34:39 $";
|
||||||
|
|
||||||
private static final Logger s_log = Logger.getLogger(Loader.class);
|
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[] {
|
private static final String[] categoryFiles = new String[] {
|
||||||
"WEB-INF/aplaws/shp-nav-domain-1.00.xml"
|
"WEB-INF/aplaws/shp-nav-domain-1.00.xml"
|
||||||
, "WEB-INF/aplaws/shp-nav-hierarchy-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",
|
"com.arsdigita.aplaws.navigation_domain",
|
||||||
Parameter.REQUIRED,
|
Parameter.REQUIRED,
|
||||||
"SHP-NAV");
|
"SHP-NAV");
|
||||||
|
// Registers to the context by adding the parameter to a map of parameters
|
||||||
register(m_navigationDomain);
|
register(m_navigationDomain);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -135,6 +139,7 @@ public class Loader extends PackageLoader {
|
||||||
String[] files = categoryFiles;
|
String[] files = categoryFiles;
|
||||||
|
|
||||||
final Parser parser = new Parser();
|
final Parser parser = new Parser();
|
||||||
|
// for each filename in the array of files containing categories
|
||||||
for (int i = 0 ; i < files.length ; i++) {
|
for (int i = 0 ; i < files.length ; i++) {
|
||||||
final String file = files[i];
|
final String file = files[i];
|
||||||
if (s_log.isInfoEnabled()) {
|
if (s_log.isInfoEnabled()) {
|
||||||
|
|
@ -183,7 +188,7 @@ public class Loader extends PackageLoader {
|
||||||
.retrieveApplicationForPath("/portal/");
|
.retrieveApplicationForPath("/portal/");
|
||||||
portal.setDefaultLayout(PageLayout
|
portal.setDefaultLayout(PageLayout
|
||||||
.findLayoutByFormat(PageLayout.FORMAT_ONE_COLUMN));
|
.findLayoutByFormat(PageLayout.FORMAT_ONE_COLUMN));
|
||||||
}
|
} // run method
|
||||||
|
|
||||||
// public void registerServicesTemplate(String appURL) {
|
// public void registerServicesTemplate(String appURL) {
|
||||||
// Application app = Application.retrieveApplicationForPath(appURL);
|
// Application app = Application.retrieveApplicationForPath(appURL);
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
@ -33,10 +33,6 @@ import com.arsdigita.runtime.RuntimeConfig;
|
||||||
* @version $Id: Initializer.java 759 2005-09-02 15:25:32Z sskracic $
|
* @version $Id: Initializer.java 759 2005-09-02 15:25:32Z sskracic $
|
||||||
*/
|
*/
|
||||||
public class Initializer extends CompoundInitializer {
|
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() {
|
public Initializer() {
|
||||||
final String url = RuntimeConfig.getConfig().getJDBCURL();
|
final String url = RuntimeConfig.getConfig().getJDBCURL();
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
Loading…
Reference in New Issue