Weitere Ergänzungen zu r1475 / r1476. Es ist das Verzeichnis static f. Content Types in heirloom integriert und das Verzeichnis packages weitgehend aufgelöst. Templates / jsps weitgehend nach templates verschoben.

git-svn-id: https://svn.libreccm.org/ccm/trunk@1478 8810af33-2d31-482b-a856-94f89814c4df
master
pb 2012-01-30 10:07:39 +00:00
parent 11177abc31
commit caba8b7540
103 changed files with 1499 additions and 992 deletions

View File

@ -26,7 +26,8 @@ import com.arsdigita.london.terms.ui.AbstractAssignedTerms;
/** /**
* *
* Invoked by jsp * Invoked by jsp
* (e.g. packages/content-section/templates/default/aplaws-item.jsp) * (e.g. templates/ccm-cms/content-section/default/aplaws-item.jsp
* previously: packages/content-section/templates/default/aplaws-item.jsp)
*/ */
public class AssignedItemTerms extends AbstractAssignedTerms { public class AssignedItemTerms extends AbstractAssignedTerms {

View File

@ -1,28 +1,23 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:admin="http://www.arsdigita.com/admin-ui/1.0" xmlns:admin="http://www.arsdigita.com/admin-ui/1.0"
xmlns:bebop="http://www.arsdigita.com/bebop/1.0" xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
xmlns:portal="http://www.uk.arsdigita.com/portal/1.0" xmlns:portal="http://www.uk.arsdigita.com/portal/1.0"
xmlns:portlet="http://www.uk.arsdigita.com/portlet/1.0" xmlns:portlet="http://www.uk.arsdigita.com/portlet/1.0"
exclude-result-prefixes="xsl admin bebop portal portlet" exclude-result-prefixes="xsl admin bebop portal portlet"
version="1.0"> version="1.0">
<xsl:import href="login-portlet.xsl"/>
<xsl:import href="directory-portlet.xsl"/>
<xsl:import href="content-sections-portlet.xsl"/>
<xsl:import href="time-of-day-portlet.xsl"/>
<xsl:import href="freeform-html-portlet.xsl"/>
<xsl:import href="rss-feed-portlet.xsl"/>
<xsl:import href="tasklist-portlet.xsl"/>
<xsl:import href="application-directory-portlet.xsl"/>
<xsl:import href="workspace-directory-portlet.xsl"/>
<xsl:import href="content-item-portlet.xsl"/>
<xsl:import href="login-portlet.xsl"/>
<xsl:import href="directory-portlet.xsl"/>
<xsl:import href="content-sections-portlet.xsl"/>
<xsl:import href="time-of-day-portlet.xsl"/>
<xsl:import href="freeform-html-portlet.xsl"/>
<xsl:import href="rss-feed-portlet.xsl"/>
<xsl:import href="tasklist-portlet.xsl"/>
<xsl:import href="application-directory-portlet.xsl"/>
<xsl:import href="workspace-directory-portlet.xsl"/>
<xsl:import href="content-item-portlet.xsl"/>
</xsl:stylesheet> </xsl:stylesheet>

View File

@ -1,31 +1,81 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
package com.arsdigita.cms.contenttypes; package com.arsdigita.cms.contenttypes;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
/** /**
* Executes at each system startup and initializes the PublicPersonalProfile
* content type.
*
* Defines the content type specific properties and just uses the super class
* methods to register the content type with the (transient) content type store
* (map). This is done by runtimeRuntime startup method which runs the init()
* methods of all initializers (this one just using the parent implementation).
* *
* @author Jens Pelzetter * @author Jens Pelzetter
* @version $Id$ * @version $Id$
*/ */
public class PublicPersonalProfileInitializer extends ContentTypeInitializer { public class PublicPersonalProfileInitializer extends ContentTypeInitializer {
private static final Logger logger = Logger.getLogger(PublicPersonalProfileInitializer.class); /** Private Logger instance for debugging purpose. */
private static final Logger logger = Logger.getLogger(
PublicPersonalProfileInitializer.class);
/**
* Constructor, sets the PDL manifest file and object type string.
*/
public PublicPersonalProfileInitializer() { public PublicPersonalProfileInitializer() {
super("ccm-cms-publicpersonalprofile.pdl.mf", super("ccm-cms-publicpersonalprofile.pdl.mf",
PublicPersonalProfile.BASE_DATA_OBJECT_TYPE); PublicPersonalProfile.BASE_DATA_OBJECT_TYPE);
} }
/**
* Retrieve location of this content type's internal default theme
* stylesheet(s) which concomitantly serve as a fallback if a custom theme
* is engaged.
*
* Custom themes usually will provide their own stylesheet(s) and their own
* access method, but may not support every content type.
*
* Overwrites parent method with AgendaItem specific value for use by the
* parent class worker methods.
*
* @return String array of XSL stylesheet files of the internal default theme
*/
@Override @Override
public String[] getStylesheets() { public String[] getStylesheets() {
return new String[]{ return new String[]{
"/static/content-types/com/arsdigita/cms/contenttypes/PublicPersonalProfile.xsl" INTERNAL_THEME_TYPES_DIR + "PublicPersonalProfile.xsl"
}; };
} }
/**
* Retrieves fully qualified traversal adapter file name.
* @return
*/
@Override @Override
public String getTraversalXML() { public String getTraversalXML() {
return "/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/PublicPersonalProfile.xml"; return
"/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/PublicPersonalProfile.xml";
} }
} }

View File

@ -4,16 +4,19 @@
xmlns:bebop="http://www.arsdigita.com/bebop/1.0" xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
exclude-result-prefixes="cms bebop"> exclude-result-prefixes="cms bebop">
<xsl:import href="../../../../../../packages/formbuilder/xsl/formbuilder.xsl"/> <!-- <xsl:import href="../../../../../../packages/formbuilder/xsl/formbuilder.xsl"/> -->
<xsl:import href="../packages/formbuilder/xsl/formbuilder.xsl"/>
<xsl:template match="cms:item[objectType='com.arsdigita.cms.formbuilder.FormItem']" mode="cms:CT_text" <xsl:template match="cms:item[objectType='com.arsdigita.cms.formbuilder.FormItem']"
name="cms:CT_text_com_arsdigita_cms_formbuilder_FormItem"> mode="cms:CT_text"
name="cms:CT_text_com_arsdigita_cms_formbuilder_FormItem">
<xsl:apply-templates select="." mode="cms:CT_graphics"/> <xsl:apply-templates select="." mode="cms:CT_graphics"/>
<xsl:apply-templates select="form"/> <xsl:apply-templates select="form"/>
</xsl:template> </xsl:template>
<xsl:template match="cms:item[objectType='com.arsdigita.cms.formbuilder.FormItem']" mode="cms:CT_graphics" <xsl:template match="cms:item[objectType='com.arsdigita.cms.formbuilder.FormItem']"
name="cms:CT_graphics_com_arsdigita_cms_formbuilder_FormItem"> mode="cms:CT_graphics"
name="cms:CT_graphics_com_arsdigita_cms_formbuilder_FormItem">
<h1><xsl:value-of select="title"/></h1> <h1><xsl:value-of select="title"/></h1>
<div class="description"> <div class="description">
<xsl:value-of select="form/description"/> <xsl:value-of select="form/description"/>

View File

@ -16,18 +16,27 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* *
*/ */
package com.arsdigita.cms.contenttypes; package com.arsdigita.cms.contenttypes;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
/** /**
* Initializer of the HealthCareFacility content type. * Executes at each system startup and initializes the HealthCareFacility
* content type.
*
* Defines the content type specific properties and just uses the super class
* methods to register the content type with the (transient) content type store
* (map). This is done by runtimeRuntime startup method which runs the init()
* methods of all initializers (this one just using the parent implementation).
* *
* @author Sören Bernstein * @author Sören Bernstein
*/ */
public class HealthCareFacilityInitializer extends ContentTypeInitializer { public class HealthCareFacilityInitializer extends ContentTypeInitializer {
private static final Logger s_log = Logger.getLogger(HealthCareFacilityInitializer.class); /** Private Logger instance for debugging purpose. */
private static final Logger s_log = Logger.getLogger(
HealthCareFacilityInitializer.class);
/** /**
* Constructor. calls only the constructor of the parent class with name of * Constructor. calls only the constructor of the parent class with name of
@ -39,11 +48,23 @@ public class HealthCareFacilityInitializer extends ContentTypeInitializer {
} }
/** /**
* Retrieve location of this content type's internal default theme
* stylesheet(s) which concomitantly serve as a fallback if a custom theme
* is engaged.
* *
* @return path of the XSL stylesheet file. The stylesheet is very generic, because this * Custom themes usually will provide their own stylesheet(s) and their own
* contenttype will be used with the new mandalay theme only. * access method, but may not support every content type.
*
* Overwrites parent method with AgendaItem specific value for use by the
* parent class worker methods.
*
* @return String array of XSL stylesheet files of the internal default theme
* The stylesheet is very generic, because this
* contenttype will be used with the new mandalay theme only.
*/ */
public String getStylesheet() { @Override
return "static/content-types/com/arsdigita/cms/contenttypes/HealthCareFacility.xsl"; public String[] getStylesheets() {
return new String[]
{ INTERNAL_THEME_TYPES_DIR + "HealthCareFacility.xsl"} ;
} }
} }

View File

@ -16,28 +16,52 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* *
*/ */
package com.arsdigita.cms.contenttypes; package com.arsdigita.cms.contenttypes;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
/** /**
* The CMS initializer. * Executes at each system startup and initializes the InlineSite content type.
*
* Defines the content type specific properties and just uses the super class
* methods to register the content type with the (transient) content type store
* (map). This is done by runtimeRuntime startup method which runs the init()
* methods of all initializers (this one just using the parent implementation).
* *
* @author Justin Ross &lt;jross@redhat.com&gt; * @author Justin Ross &lt;jross@redhat.com&gt;
* @version $Id: InlineSiteInitializer.java 757 2005-09-02 14:12:21Z sskracic $ * @version $Id: InlineSiteInitializer.java 757 2005-09-02 14:12:21Z sskracic $
*/ */
public class InlineSiteInitializer extends ContentTypeInitializer { public class InlineSiteInitializer extends ContentTypeInitializer {
/** Private Logger instance for debugging purpose. */
private static final Logger s_log = Logger.getLogger(InlineSiteInitializer.class); private static final Logger s_log = Logger.getLogger(InlineSiteInitializer.class);
/**
* Constructor, sets the PDL manifest file and object type string.
*/
public InlineSiteInitializer() { public InlineSiteInitializer() {
super("ccm-cms-types-inlinesite.pdl.mf", super("ccm-cms-types-inlinesite.pdl.mf",
InlineSite.BASE_DATA_OBJECT_TYPE); InlineSite.BASE_DATA_OBJECT_TYPE);
} }
/**
* Retrieve location of this content type's internal default theme
* stylesheet(s) which concomitantly serve as a fallback if a custom theme
* is engaged.
*
* Custom themes usually will provide their own stylesheet(s) and their own
* access method, but may not support every content type.
*
* Overwrites parent method with AgendaItem specific value for use by the
* parent class worker methods.
*
* @return String array of XSL stylesheet files of the internal default theme
*/
@Override
public String[] getStylesheets() { public String[] getStylesheets() {
return new String[] { return new String[] {
"/static/content-types/com/arsdigita/cms/contenttypes/InlineSite.xsl" INTERNAL_THEME_TYPES_DIR + "InlineSite.xsl"
}; };
} }
} }

View File

@ -16,10 +16,16 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* *
*/ */
package com.arsdigita.cms.contenttypes; package com.arsdigita.cms.contenttypes;
/** /**
* Initializer * Executes at each system startup and initializes the Job content type.
*
* Defines the content type specific properties and just uses the super class
* methods to register the content type with the (transient) content type store
* (map). This is done by runtimeRuntime startup method which runs the init()
* methods of all initializers (this one just using the parent implementation).
* *
* @author Rafael H. Schloming &lt;rhs@mit.edu&gt; * @author Rafael H. Schloming &lt;rhs@mit.edu&gt;
* @version $Revision: #7 $ $Date: 2004/08/17 $ * @version $Revision: #7 $ $Date: 2004/08/17 $
@ -29,16 +35,38 @@ package com.arsdigita.cms.contenttypes;
public class JobInitializer extends ContentTypeInitializer { public class JobInitializer extends ContentTypeInitializer {
/**
* Constructor, sets the PDL manifest file and object type string.
*/
public JobInitializer() { public JobInitializer() {
super("ccm-cms-types-job.pdl.mf", Job.BASE_DATA_OBJECT_TYPE); super("ccm-cms-types-job.pdl.mf", Job.BASE_DATA_OBJECT_TYPE);
} }
/**
* Retrieves fully qualified traversal adapter file name.
* @return
*/
@Override
public String getTraversalXML() { public String getTraversalXML() {
return "WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/Job.xml"; return "WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/Job.xml";
} }
/**
* Retrieve location of this content type's internal default theme
* stylesheet(s) which concomitantly serve as a fallback if a custom theme
* is engaged.
*
* Custom themes usually will provide their own stylesheet(s) and their own
* access method, but may not support every content type.
*
* Overwrites parent method with AgendaItem specific value for use by the
* parent class worker methods.
*
* @return String array of XSL stylesheet files of the internal default theme
*/
@Override
public String[] getStylesheets() { public String[] getStylesheets() {
return new String[] {"/static/content-types/com/arsdigita/cms/contenttypes/Job.xsl"}; return new String[] {INTERNAL_THEME_TYPES_DIR + "Job.xsl"};
} }

View File

@ -16,12 +16,13 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* *
*/ */
package com.arsdigita.cms.contenttypes; package com.arsdigita.cms.contenttypes;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
/** /**
* Initializes the Legal Notice content type. * Executes at each system startup and initializes the LegalNotice content type.
* *
* Defines the content type specific properties and just uses the super class * Defines the content type specific properties and just uses the super class
* methods to register the content type with the (transient) content type store * methods to register the content type with the (transient) content type store
@ -35,6 +36,7 @@ import org.apache.log4j.Logger;
public class LegalNoticeInitializer extends ContentTypeInitializer { public class LegalNoticeInitializer extends ContentTypeInitializer {
/** Private Logger instance for debugging purpose. */
private static final Logger s_log = Logger.getLogger(LegalNoticeInitializer.class); private static final Logger s_log = Logger.getLogger(LegalNoticeInitializer.class);
/** /**
@ -45,14 +47,22 @@ public class LegalNoticeInitializer extends ContentTypeInitializer {
} }
/** /**
* Retrieve location of this content types stylesheet. Overwrites parent * Retrieve location of this content type's internal default theme
* method with FormItem specific value for use by the parent class worker * stylesheet(s) which concomitantly serve as a fallback if a custom theme
* methods. * is engaged.
* @return *
* Custom themes usually will provide their own stylesheet(s) and their own
* access method, but may not support every content type.
*
* Overwrites parent method with AgendaItem specific value for use by the
* parent class worker methods.
*
* @return String array of XSL stylesheet files of the internal default theme
*/ */
@Override
public String[] getStylesheets() { public String[] getStylesheets() {
return new String[] { return new String[] {
"/static/content-types/com/arsdigita/cms/contenttypes/LegalNotice.xsl" }; INTERNAL_THEME_TYPES_DIR + "LegalNotice.xsl" };
} }
} }

View File

@ -16,12 +16,13 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* *
*/ */
package com.arsdigita.cms.contenttypes; package com.arsdigita.cms.contenttypes;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
/** /**
* Initializes the Minutes content type. * Executes at each system startup and initializes the Minutes content type.
* *
* Defines the content type specific properties and just uses the super class * Defines the content type specific properties and just uses the super class
* methods to register the content type with the (transient) content type store * methods to register the content type with the (transient) content type store
@ -35,6 +36,7 @@ import org.apache.log4j.Logger;
public class MinutesInitializer extends ContentTypeInitializer { public class MinutesInitializer extends ContentTypeInitializer {
/** Private Logger instance for debugging purpose. */
private static final Logger s_log = Logger.getLogger(MinutesInitializer.class); private static final Logger s_log = Logger.getLogger(MinutesInitializer.class);
/** /**
@ -45,15 +47,22 @@ public class MinutesInitializer extends ContentTypeInitializer {
} }
/** /**
* Retrieve location of this content types stylesheet. Overwrites parent * Retrieve location of this content type's internal default theme
* method with FormItem specific value for use by the parent class worker * stylesheet(s) which concomitantly serve as a fallback if a custom theme
* methods. * is engaged.
* *
* @return complete path info string * Custom themes usually will provide their own stylesheet(s) and their own
* access method, but may not support every content type.
*
* Overwrites parent method with AgendaItem specific value for use by the
* parent class worker methods.
*
* @return String array of XSL stylesheet files of the internal default theme
*/ */
@Override
public String[] getStylesheets() { public String[] getStylesheets() {
return new String[] { return new String[] {
"/static/content-types/com/arsdigita/cms/contenttypes/LegalNotice.xsl" }; INTERNAL_THEME_TYPES_DIR + "Minutes.xsl" };
} }
} }

View File

@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<registry> <registry>
<!-- NOTHING to config here ???
<config class="com.arsdigita.cms.contenttypes.SciOrganizationConfig" <config class="com.arsdigita.cms.contenttypes.SciOrganizationConfig"
storage="ccm-sci-types-organization/SciOrganization.properties"/> storage="ccm-sci-types-organization/SciOrganization.properties"/>
-->
</registry> </registry>

View File

@ -16,12 +16,13 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* *
*/ */
package com.arsdigita.cms.contenttypes; package com.arsdigita.cms.contenttypes;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
/** /**
* Initializes the Organization content type. * Executes at each system startup and initializes the Organization content type.
* *
* Defines the content type specific properties and just uses the super class * Defines the content type specific properties and just uses the super class
* methods to register the content type with the (transient) content type store * methods to register the content type with the (transient) content type store
@ -33,6 +34,7 @@ import org.apache.log4j.Logger;
*/ */
public class OrganizationInitializer extends ContentTypeInitializer { public class OrganizationInitializer extends ContentTypeInitializer {
/** Private Logger instance for debugging purpose. */
private static final Logger s_log = Logger.getLogger(OrganizationInitializer.class); private static final Logger s_log = Logger.getLogger(OrganizationInitializer.class);
/** /**
@ -44,15 +46,22 @@ public class OrganizationInitializer extends ContentTypeInitializer {
} }
/** /**
* Retrieve location of this content types stylesheet. Overwrites parent * Retrieve location of this content type's internal default theme
* method with FormItem specific value for use by the parent class worker * stylesheet(s) which concomitantly serve as a fallback if a custom theme
* methods. * is engaged.
* *
* @return complete path info string * Custom themes usually will provide their own stylesheet(s) and their own
* access method, but may not support every content type.
*
* Overwrites parent method with AgendaItem specific value for use by the
* parent class worker methods.
*
* @return String array of XSL stylesheet files of the internal default theme
*/ */
@Override
public String[] getStylesheets() { public String[] getStylesheets() {
return new String[] { return new String[] {
"/static/content-types/com/arsdigita/cms/contenttypes/Organization.xsl" INTERNAL_THEME_TYPES_DIR + "Organization.xsl"
}; };
} }

View File

@ -16,12 +16,18 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* *
*/ */
package com.arsdigita.cms.contenttypes; package com.arsdigita.cms.contenttypes;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
/** /**
* Initializer * Executes at each system startup and initializes the PressRelease content type.
*
* Defines the content type specific properties and just uses the super class
* methods to register the content type with the (transient) content type store
* (map). This is done by runtimeRuntime startup method which runs the init()
* methods of all initializers (this one just using the parent implementation).
* *
* @author Rafael H. Schloming &lt;rhs@mit.edu&gt; * @author Rafael H. Schloming &lt;rhs@mit.edu&gt;
* @version $Revision: #6 $ $Date: 2004/08/17 $ * @version $Revision: #6 $ $Date: 2004/08/17 $
@ -30,6 +36,7 @@ import org.apache.log4j.Logger;
public class PressReleaseInitializer extends ContentTypeInitializer { public class PressReleaseInitializer extends ContentTypeInitializer {
/** Private Logger instance for debugging purpose. */
private static final Logger s_log = Logger.getLogger(PressReleaseInitializer.class); private static final Logger s_log = Logger.getLogger(PressReleaseInitializer.class);
/** /**
@ -40,15 +47,22 @@ public class PressReleaseInitializer extends ContentTypeInitializer {
} }
/** /**
* Retrieve location of this content types stylesheet. Overwrites parent * Retrieve location of this content type's internal default theme
* method with FormItem specific value for use by the parent class worker * stylesheet(s) which concomitantly serve as a fallback if a custom theme
* methods. * is engaged.
* *
* @return complete path info string * Custom themes usually will provide their own stylesheet(s) and their own
* access method, but may not support every content type.
*
* Overwrites parent method with AgendaItem specific value for use by the
* parent class worker methods.
*
* @return String array of XSL stylesheet files of the internal default theme
*/ */
@Override
public String[] getStylesheets() { public String[] getStylesheets() {
return new String[] { return new String[] {
"/static/content-types/com/arsdigita/cms/contenttypes/PressRelease.xsl" }; INTERNAL_THEME_TYPES_DIR + "PressRelease.xsl" };
} }
} }

View File

@ -16,12 +16,13 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* *
*/ */
package com.arsdigita.cms.contenttypes; package com.arsdigita.cms.contenttypes;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
/** /**
* Initializes the Service content type. * Executes at each system startup and initializes the Service content type.
* *
* Defines the content type specific properties and just uses the super class * Defines the content type specific properties and just uses the super class
* methods to register the content type with the (transient) content type store * methods to register the content type with the (transient) content type store
@ -34,6 +35,7 @@ import org.apache.log4j.Logger;
*/ */
public class ServiceInitializer extends ContentTypeInitializer { public class ServiceInitializer extends ContentTypeInitializer {
/** Private Logger instance for debugging purpose. */
private static final Logger s_log = Logger.getLogger(ServiceInitializer.class); private static final Logger s_log = Logger.getLogger(ServiceInitializer.class);
/** /**
@ -44,14 +46,21 @@ public class ServiceInitializer extends ContentTypeInitializer {
} }
/** /**
* Retrieve location of this content types stylesheet. Overwrites parent * Retrieve location of this content type's internal default theme
* method with FormItem specific value for use by the parent class worker * stylesheet(s) which concomitantly serve as a fallback if a custom theme
* methods. * is engaged.
* *
* @return complete path info string * Custom themes usually will provide their own stylesheet(s) and their own
* access method, but may not support every content type.
*
* Overwrites parent method with AgendaItem specific value for use by the
* parent class worker methods.
*
* @return String array of XSL stylesheet files of the internal default theme
*/ */
@Override
public String[] getStylesheets() { public String[] getStylesheets() {
return new String[] { return new String[] {
"/static/content-types/com/arsdigita/cms/contenttypes/Service.xsl" }; INTERNAL_THEME_TYPES_DIR + "Service.xsl" };
} }
} }

View File

@ -32,7 +32,6 @@ import com.arsdigita.domain.DataObjectNotFoundException;
import com.arsdigita.domain.DomainObjectFactory; import com.arsdigita.domain.DomainObjectFactory;
import com.arsdigita.formbuilder.PersistentOption; import com.arsdigita.formbuilder.PersistentOption;
import com.arsdigita.formbuilder.ui.PropertiesEditor; import com.arsdigita.formbuilder.ui.PropertiesEditor;
import com.arsdigita.persistence.DataAssociationCursor;
import com.arsdigita.util.UncheckedWrapperException; import com.arsdigita.util.UncheckedWrapperException;
import com.arsdigita.web.RedirectSignal; import com.arsdigita.web.RedirectSignal;
import com.arsdigita.xml.Element; import com.arsdigita.xml.Element;

View File

@ -3,17 +3,21 @@
xmlns:cms="http://www.arsdigita.com/cms/1.0" xmlns:cms="http://www.arsdigita.com/cms/1.0"
xmlns:bebop="http://www.arsdigita.com/bebop/1.0" xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
exclude-result-prefixes="cms bebop"> exclude-result-prefixes="cms bebop">
<!--
<xsl:import href="../../../../../../packages/formbuilder/xsl/formbuilder.xsl"/> <xsl:import href="../../../../../../packages/formbuilder/xsl/formbuilder.xsl"/>
-->
<xsl:import href="../packages/formbuilder/xsl/formbuilder.xsl"/>
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.Survey']" mode="cms:CT_text" <xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.Survey']"
name="cms:CT_text_com_arsdigita_cms_contenttypes_Survey"> mode="cms:CT_text"
name="cms:CT_text_com_arsdigita_cms_contenttypes_Survey">
<xsl:apply-templates select="." mode="cms:CT_graphics"/> <xsl:apply-templates select="." mode="cms:CT_graphics"/>
<xsl:apply-templates select="form"/> <xsl:apply-templates select="form"/>
</xsl:template> </xsl:template>
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.Survey']" mode="cms:CT_graphics" <xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.Survey']"
name="cms:CT_graphics_com_arsdigita_cms_contenttypes_Survey"> mode="cms:CT_graphics"
name="cms:CT_graphics_com_arsdigita_cms_contenttypes_Survey">
<h1><xsl:value-of select="title"/></h1> <h1><xsl:value-of select="title"/></h1>
<div class="description"> <div class="description">
<xsl:value-of select="form/description"/> <xsl:value-of select="form/description"/>

View File

@ -41,15 +41,22 @@ public class Initializer extends ContentTypeInitializer {
} }
/** /**
* Retrieve location of this content types stylesheet. Overwrites parent * Retrieve location of this content type's internal default theme
* method with FormItem specific value for use by the parent class worker * stylesheet(s) which concomitantly serve as a fallback if a custom theme
* methods. * is engaged.
* *
* @return complete path info string * Custom themes usually will provide their own stylesheet(s) and their own
* access method, but may not support every content type.
*
* Overwrites parent method with AgendaItem specific value for use by the
* parent class worker methods.
*
* @return String array of XSL stylesheet files of the internal default theme
* (path-info string)
*/ */
@Override
public String[] getStylesheets() { public String[] getStylesheets() {
return new String[] { "/static/content-types/com/" + return new String[] { INTERNAL_THEME_TYPES_DIR + "XMLFeed.xsl" };
"arsdigita/cms/contenttypes/XMLFeed.xsl" };
} }
} }

View File

@ -2,7 +2,7 @@
<ccm:application xmlns:ccm="http://ccm.redhat.com/ccm-project" <ccm:application xmlns:ccm="http://ccm.redhat.com/ccm-project"
name="ccm-cms" name="ccm-cms"
prettyName="Red Hat CCM Content Management System" prettyName="Red Hat CCM Content Management System"
version="6.6.4" version="6.6.5"
release="1" release="1"
webapp="ROOT"> webapp="ROOT">
<ccm:dependencies> <ccm:dependencies>

View File

@ -154,8 +154,11 @@ public final class CMSConfig extends AbstractConfig {
new StringParameter( new StringParameter(
"com.arsdigita.cms.template_root_path", "com.arsdigita.cms.template_root_path",
Parameter.REQUIRED, Parameter.REQUIRED,
"/packages/content-section/templates"); "/templates/ccm-cms/content-section");
// URL resource: protocol handler removal: START // up to version 6.6.4
// "/packages/content-section/templates");
// URL resource: protocol handler removal: START
// remove: // remove:
// try { // try {
// m_itemAdapters = new URLParameter // m_itemAdapters = new URLParameter

View File

@ -9,8 +9,8 @@ com.arsdigita.cms.default_folder_template_path.example=/default/folder.jsp
com.arsdigita.cms.default_folder_template_path.format=[string] com.arsdigita.cms.default_folder_template_path.format=[string]
com.arsdigita.cms.template_root_path.title=Template Root Path com.arsdigita.cms.template_root_path.title=Template Root Path
com.arsdigita.cms.template_root_path.purpose=Path for the default template folder. Path is relative to webapp root com.arsdigita.cms.template_root_path.purpose=Path for the default template folder. Path is relative to webapp root. Don't modify without really good reasons!
com.arsdigita.cms.template_root_path.example=/packages/content-section/templates com.arsdigita.cms.template_root_path.example=/templates/ccm-cms/content-section
com.arsdigita.cms.template_root_path.format=[string] com.arsdigita.cms.template_root_path.format=[string]
com.arsdigita.cms.default_item_resolver_class.title=Item resolver class com.arsdigita.cms.default_item_resolver_class.title=Item resolver class

View File

@ -135,6 +135,7 @@ public class ContentSectionServlet extends BaseApplicationServlet {
Session ssn = SessionManager.getSession(); Session ssn = SessionManager.getSession();
TransactionContext txn = ssn.getTransactionContext(); TransactionContext txn = ssn.getTransactionContext();
txn.addTransactionListener(new AbstractTransactionListener() { txn.addTransactionListener(new AbstractTransactionListener() {
@Override
public void beforeCommit(TransactionContext txn) { public void beforeCommit(TransactionContext txn) {
Assert.fail("uncommittable transaction"); Assert.fail("uncommittable transaction");
} }

View File

@ -52,25 +52,24 @@ import org.apache.log4j.Logger;
*/ */
public class ContentItemDispatcher implements Dispatcher { public class ContentItemDispatcher implements Dispatcher {
private static final Logger s_log = /** Private Logger instance for debugging purpose. */
Logger.getLogger(ContentItemDispatcher.class.getName()); private static final Logger s_log = Logger.getLogger(
ContentItemDispatcher.class.getName());
//the cache table for mapping content items to template JSP's /** the cache table for mapping content items to template JSP's */
private static CacheTable s_cache = private static CacheTable s_cache = new CacheTable(
new CacheTable("ContentItemDispatcherCache"); "ContentItemDispatcherCache");
//cache for the template resolver /** cache for the template resolver */
public static Map s_templateResolverCache = public static Map s_templateResolverCache = Collections
Collections.synchronizedMap(new HashMap()); .synchronizedMap(new HashMap());
/** */
protected ItemXML m_itemXML; protected ItemXML m_itemXML;
// public static final String TEMPLATE_ROOT =
// "/packages/content-section/templates";
// public static final String DEFAULT_ITEM_TEMPLATE =
// "/default/item.jsp";
// public static final String DEFAULT_FOLDER_TEMPLATE =
// "/default/folder.jsp";
/**
* Constructor
*/
public ContentItemDispatcher() { public ContentItemDispatcher() {
m_itemXML = new ItemXML(); m_itemXML = new ItemXML();
} }
@ -79,12 +78,13 @@ public class ContentItemDispatcher implements Dispatcher {
* @see com.arsdigita.dispatcher.Dispatcher#dispatch * @see com.arsdigita.dispatcher.Dispatcher#dispatch
* (HttpServletRequest, HttpServletResponse, RequestContext) * (HttpServletRequest, HttpServletResponse, RequestContext)
*/ */
public void dispatch public void dispatch( final HttpServletRequest request,
(final HttpServletRequest request, final HttpServletResponse response, final HttpServletResponse response,
final RequestContext actx) final RequestContext actx)
throws IOException, ServletException { throws IOException, ServletException {
Boolean bXMLMode =
(Boolean)request.getAttribute(ContentSectionServlet.XML_MODE); Boolean bXMLMode = (Boolean)request
.getAttribute(ContentSectionServlet.XML_MODE);
if (bXMLMode != null && bXMLMode.booleanValue()) { if (bXMLMode != null && bXMLMode.booleanValue()) {
//if this is XML mode, then use itemXML //if this is XML mode, then use itemXML
m_itemXML.dispatch(request, response, actx); m_itemXML.dispatch(request, response, actx);
@ -267,8 +267,10 @@ public class ContentItemDispatcher implements Dispatcher {
return (String)s_cache.get(key); return (String)s_cache.get(key);
} }
private String getTemplatePath(ContentItem item, HttpServletRequest req, private String getTemplatePath(ContentItem item,
HttpServletRequest req,
RequestContext ctx) { RequestContext ctx) {
//check if the template path is cached //check if the template path is cached
//BigDecimal id = item.getID(); //BigDecimal id = item.getID();
//String sPath = cacheGet(id); //String sPath = cacheGet(id);
@ -323,7 +325,8 @@ public class ContentItemDispatcher implements Dispatcher {
* @param section The content section * @param section The content section
* @return The TemplateResolver associated with the content section * @return The TemplateResolver associated with the content section
*/ */
public TemplateResolver getTemplateResolver(ContentSection section) { public TemplateResolver getTemplateResolver(ContentSection section) {
String name = section.getName(); String name = section.getName();
TemplateResolver ir = TemplateResolver ir =
(TemplateResolver) s_templateResolverCache.get(name); (TemplateResolver) s_templateResolverCache.get(name);

View File

@ -61,10 +61,10 @@ public class ItemDispatcher implements ChainedDispatcher {
public static final String FILE_SUFFIX = ".jsp"; public static final String FILE_SUFFIX = ".jsp";
public static final String INDEX_FILE = "/index"; public static final String INDEX_FILE = "/index";
public static final String TEMPLATE_ROOT = // public static final String TEMPLATE_ROOT =
"/packages/content-section/templates"; // "/packages/content-section/templates";
public static final String DEFAULT_ITEM_TEMPLATE = "/default/item.jsp"; // public static final String DEFAULT_ITEM_TEMPLATE = "/default/item.jsp";
public static final String DEFAULT_FOLDER_TEMPLATE = "/default/folder.jsp"; // public static final String DEFAULT_FOLDER_TEMPLATE = "/default/folder.jsp";
public static final String XML_SUFFIX = ".xml"; public static final String XML_SUFFIX = ".xml";
public static final String XML_MODE = "xmlMode"; public static final String XML_MODE = "xmlMode";

View File

@ -283,6 +283,7 @@ init com.arsdigita.formbuilder.installer.Initializer {
// // used anymore, all specifications are relative to webapplication base. // // used anymore, all specifications are relative to webapplication base.
// // So the following may have to be changed to "packages/content-section/templates" // // So the following may have to be changed to "packages/content-section/templates"
// // if someone tries to use p2fs // // if someone tries to use p2fs
// // NEW LOCATION: /templates/ccm-cms/content-section (since cms 6.6.5)
// { "com.arsdigita.cms.Template", // { "com.arsdigita.cms.Template",
// // "webapps/ROOT/packages/content-section/templates", // // "webapps/ROOT/packages/content-section/templates",
// "packages/content-section/templates", // "packages/content-section/templates",

View File

@ -122,11 +122,12 @@ public class Initializer extends CompoundInitializer {
// * // *
// * @param evt The legacy init event. // * @param evt The legacy init event.
// */ // */
// An empty implementations prevents this initializer from beiong executed. // An empty implementations prevents this initializer from being executed.
// A missing implementations causes the super class method to be executed, which // A missing implementations causes the super class method to be executed, which
// invokes the above added LegacyInitializer. // invokes the above added LegacyInitializer.
// That initializer starts P2fs background thread and creation of // That initializer starts P2fs background thread and creation of
// ~/packages/content-section/templates/content works now. // ~/packages/content-section/templates/content works now.
// SEE NEW LOCATION: ~/templates/ccm-cms/content-section
// public void init(LegacyInitEvent evt) {} // public void init(LegacyInitEvent evt) {}
/** /**

View File

@ -198,7 +198,7 @@ public class PublishToFileConfig extends AbstractConfig {
" false, " + " false, " +
" '/p2fs' }, " + " '/p2fs' }, " +
" { 'com.arsdigita.cms.Template', " + " { 'com.arsdigita.cms.Template', " +
" 'packages/content-section/templates', " + " '/templates/ccm-cms/content-section', " +
" false, " + " false, " +
" '/templates' } " + " '/templates' } " +
"} " "} "
@ -316,7 +316,7 @@ public class PublishToFileConfig extends AbstractConfig {
s_tmpDestList.add s_tmpDestList.add
( new ArrayList() {{ ( new ArrayList() {{
add("com.arsdigita.cms.Template"); add("com.arsdigita.cms.Template");
add("packages/content-section/templates"); add("templates/ccm-cms/content-section");
add(new Boolean(false)); add(new Boolean(false));
add("/templates"); add("/templates");
}} }}

View File

@ -29,6 +29,7 @@ init com.arsdigita.cms.publishToFile.LegacyInitializer {
// used anymore, all specifications are relative to webapplication base. // used anymore, all specifications are relative to webapplication base.
// So the following may have to be changed to "packages/content-section/templates" // So the following may have to be changed to "packages/content-section/templates"
// if someone tries to use p2fs // if someone tries to use p2fs
// new location: /templates/ccm-cms/content-section
{ "com.arsdigita.cms.Template", { "com.arsdigita.cms.Template",
// "webapps/ROOT/packages/content-section/templates", // "webapps/ROOT/packages/content-section/templates",
"packages/content-section/templates", "packages/content-section/templates",

View File

@ -42,7 +42,9 @@
<tt>com.arsdigita.cms.publishToFile.Initializer</tt> entry to your <tt>com.arsdigita.cms.publishToFile.Initializer</tt> entry to your
<tt>enterprise.init</tt>. For example: <tt>enterprise.init</tt>. For example:
</p> </p>
<!-- Completely outdated"
- entzerprise.init no longer used
- new template location is /templates/ccm-cms/content-section -->
<pre> <pre>
init com.arsdigita.cms.publishToFile.Initializer { init com.arsdigita.cms.publishToFile.Initializer {
destination = { destination = {

View File

@ -73,6 +73,7 @@ import org.apache.log4j.Logger;
*/ */
public class ContentItemPage extends CMSPage implements ActionListener { public class ContentItemPage extends CMSPage implements ActionListener {
/** Private Logger instance for debugging purpose. */
private static final Logger s_log = Logger.getLogger(ContentItemPage.class); private static final Logger s_log = Logger.getLogger(ContentItemPage.class);
/** /**
* The URL parameter that must be passed in in order to set * The URL parameter that must be passed in in order to set
@ -282,8 +283,8 @@ public class ContentItemPage extends CMSPage implements ActionListener {
final ContentItem item = m_item.getContentItem(state); final ContentItem item = m_item.getContentItem(state);
if (item == null) { if (item == null) {
throw new FormProcessException("The item_id supplied does not reference a valid " throw new FormProcessException("The item_id supplied does not "
+ "ContentItem."); + "reference a valid ContentItem.");
} }
} }

View File

@ -16,6 +16,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* *
*/ */
package com.arsdigita.portal; package com.arsdigita.portal;
import java.math.BigDecimal; import java.math.BigDecimal;
@ -67,6 +68,18 @@ public class PortletType extends ResourceType {
public static final String WIDE_PROFILE = "wide"; public static final String WIDE_PROFILE = "wide";
public static final String NARROW_PROFILE = "narrow"; public static final String NARROW_PROFILE = "narrow";
/** Directory holding the internal base theme */
public static final String INTERNAL_THEME_DIR = "/themes/heirloom/";
/** Default Directory holding internal base theme portlet XSL files
* May be used by portlet initializers while registerin itself in domain
* init step. */
public static final String INTERNAL_THEME_PORTLET_DIR = INTERNAL_THEME_DIR
+ "portlets/";
/** Default portlet namespace.
* A portlet may define it's ohne namespace though */
public static final String PORTLET_XML_NS =
"http://www.uk.arsdigita.com/portlet/1.0";
// ===== Constructors ==================================================== // // ===== Constructors ==================================================== //
/** /**
@ -385,6 +398,7 @@ public class PortletType extends ResourceType {
return m_path.equals(e.m_path) && m_type.equals(e.m_type); return m_path.equals(e.m_path) && m_type.equals(e.m_type);
} }
@Override
public int hashCode() { public int hashCode() {
return m_path.hashCode() + m_type.hashCode(); return m_path.hashCode() + m_type.hashCode();
} }

View File

@ -61,8 +61,9 @@ public final class VersioningServlet extends BaseServlet {
private final static String CMD = "cmd"; private final static String CMD = "cmd";
private final static String OID = "oid"; private final static String OID = "oid";
private final static String TITLE = "title"; private final static String TITLE = "title";
private final static String JSP_DIR = "themes/heirloom//packages/versioning/"; private final static String JSP_DIR = "/themes/heirloom/packages/versioning/";
@Override
public void doService(HttpServletRequest req, HttpServletResponse resp) public void doService(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException { throws ServletException, IOException {
@ -73,6 +74,7 @@ public final class VersioningServlet extends BaseServlet {
TransactionContext txn = SessionManager.getSession(). TransactionContext txn = SessionManager.getSession().
getTransactionContext(); getTransactionContext();
txn.addTransactionListener(new AbstractTransactionListener() { txn.addTransactionListener(new AbstractTransactionListener() {
@Override
public void beforeCommit(TransactionContext txn) { public void beforeCommit(TransactionContext txn) {
Assert.fail("uncommittable transaction"); Assert.fail("uncommittable transaction");
} }

View File

@ -1,122 +0,0 @@
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:formbuilder="http://www.arsdigita.com/formbuilder/1.0"
xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
xmlns:cms="http://www.arsdigita.com/cms/1.0">
<!-- This contains option widgets such as checkbox and radio as well
as select and multi-select -->
<!-- The standard checkbox group -->
<xsl:template match="component[defaultDomainClass='com.arsdigita.formbuilder.PersistentCheckboxGroup']">
<xsl:call-template name="optionGroup">
<xsl:with-param name="optionType">checkbox</xsl:with-param>
</xsl:call-template>
</xsl:template>
<!-- The standard option group -->
<xsl:template match="component[defaultDomainClass='com.arsdigita.formbuilder.PersistentRadioGroup']">
<xsl:call-template name="optionGroup">
<xsl:with-param name="optionType">radio</xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template name="optionGroup">
<xsl:param name="optionType"/>
<th align="left" valign="top">
<xsl:call-template name="printLabel"/>
</th>
<td align="left" valign="top">
<xsl:call-template name="printErrors"/>
<xsl:for-each select="component">
<xsl:sort select="link/orderNumber"/>
<xsl:apply-templates select=".">
<xsl:with-param name="optionType" select="$optionType"/>
</xsl:apply-templates>
<br />
</xsl:for-each>
</td>
</xsl:template>
<!-- The standard option -->
<xsl:template match="component[defaultDomainClass='com.arsdigita.formbuilder.PersistentOption']">
<xsl:param name="optionType">checkbox</xsl:param>
<xsl:variable name="paramName"><xsl:value-of select="../parameterName"/></xsl:variable>
<input>
<xsl:attribute name="value"><xsl:value-of select="parameterValue"/></xsl:attribute>
<xsl:attribute name="id"><xsl:value-of select="$paramName" />:<xsl:value-of select="parameterValue"/></xsl:attribute>
<xsl:attribute name="name"><xsl:value-of select="$paramName"/></xsl:attribute>
<xsl:attribute name="type"><xsl:value-of select="$optionType"/></xsl:attribute>
<xsl:if test="parameterValue=//bebop:page/cms:contentPanel/cms:item/formbuilder:formInfo/formbuilder:formDefaults[@parameterName=$paramName]/formbuilder:formDefaultValue">
<xsl:attribute name="checked">checked</xsl:attribute>
</xsl:if>
<label>
<xsl:attribute name="for"><xsl:value-of select="../parameterName"/>:<xsl:value-of select="parameterValue"/></xsl:attribute>
<xsl:value-of select="label"/>
</label>
</input>
</xsl:template>
<!-- The Persistent Single/Multiple Select -->
<xsl:template match="component[defaultDomainClass='com.arsdigita.formbuilder.PersistentSingleSelect' or defaultDomainClass='com.arsdigita.formbuilder.PersistentMultipleSelect']">
<xsl:variable name="paramName"><xsl:value-of select="parameterName"/></xsl:variable>
<th align="left" valign="top">
<xsl:call-template name="printLabel"/>
</th>
<td align="left" valign="top">
<xsl:call-template name="printErrors"/>
<select>
<xsl:attribute name="name"><xsl:value-of select="parameterName"/></xsl:attribute>
<xsl:choose>
<xsl:when test="defaultDomainClass='com.arsdigita.formbuilder.PersistentMultipleSelect'">
<xsl:attribute name="multiple">multiple</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<option value="">-- Select --</option>
</xsl:otherwise>
</xsl:choose>
<xsl:for-each select="component">
<option>
<xsl:attribute name="value"><xsl:value-of select="parameterValue"/></xsl:attribute>
<xsl:if test="parameterValue=//bebop:page/cms:contentPanel/cms:item/formbuilder:formInfo/formbuilder:formDefaults[@parameterName=$paramName]/formbuilder:formDefaultValue">
<xsl:attribute name="selected">selected</xsl:attribute>
</xsl:if>
<xsl:value-of select="label"/>
</option>
</xsl:for-each>
</select>
</td>
</xsl:template>
<!-- The DataDrivenSelect -->
<xsl:template match="component[defaultDomainClass='com.arsdigita.formbuilder.DataDrivenSelect']">
<xsl:variable name="paramName"><xsl:value-of select="parameterName"/></xsl:variable>
<th align="left" valign="top">
<xsl:call-template name="printLabel"/>
</th>
<td align="left" valign="top">
<select>
<xsl:attribute name="name"><xsl:value-of select="parameterName"/></xsl:attribute>
<xsl:if test="selectOptions/@multiple">
<xsl:attribute name="multiple">multiple</xsl:attribute>
</xsl:if>
<xsl:for-each select="selectOptions/option">
<option>
<xsl:attribute name="value"><xsl:value-of select="@id"/></xsl:attribute>
<xsl:if test="@id=//bebop:page/cms:contentPanel/cms:item/formbuilder:formInfo/formbuilder:formDefaults[@parameterName=$paramName]/formbuilder:formDefaultValue">
<xsl:attribute name="selected">selected</xsl:attribute>
</xsl:if>
<xsl:value-of select="@label"/>
</option>
</xsl:for-each>
</select>
<xsl:call-template name="printErrors"/>
</td>
</xsl:template>
</xsl:stylesheet>

View File

@ -1,81 +0,0 @@
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:formbuilder="http://www.arsdigita.com/formbuilder/1.0"
xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
xmlns:cms="http://www.arsdigita.com/cms/1.0">
<!-- The Persistent Date -->
<xsl:template match="component[defaultDomainClass='com.arsdigita.formbuilder.PersistentDate']">
<xsl:variable name="defaultYear">
<xsl:call-template name="printDateDefaultValue">
<xsl:with-param name="currentDefault" select="defaultValue/year"/>
<xsl:with-param name="paramName"><xsl:value-of select="parameterName"/>.year</xsl:with-param>
<xsl:with-param name="dateParamName"><xsl:value-of select="parameterName"/></xsl:with-param>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="defaultMonth">
<xsl:call-template name="printDateDefaultValue">
<xsl:with-param name="currentDefault" select="defaultValue/month"/>
<xsl:with-param name="paramName"><xsl:value-of select="parameterName"/>.month</xsl:with-param>
<xsl:with-param name="dateParamName"><xsl:value-of select="parameterName"/></xsl:with-param>
</xsl:call-template>
</xsl:variable>
<th align="left" valign="top">
<xsl:call-template name="printLabel"/>
</th>
<td align="left" valign="top">
<select>
<xsl:attribute name="name"><xsl:value-of select="parameterName"/>.month</xsl:attribute>
<xsl:for-each select="monthList/month">
<option>
<xsl:attribute name="value"><xsl:value-of select="@value"/></xsl:attribute>
<xsl:if test="$defaultMonth=@value">
<xsl:attribute name="selected">selected</xsl:attribute>
</xsl:if>
<xsl:value-of select="text()"/>
</option>
</xsl:for-each>
</select>
<input type="text" size="2" maxlength="2">
<xsl:attribute name="name"><xsl:value-of select="parameterName"/>.day</xsl:attribute>
<xsl:attribute name="value">
<xsl:call-template name="printDateDefaultValue">
<xsl:with-param name="currentDefault" select="defaultValue/day"/>
<xsl:with-param name="paramName"><xsl:value-of select="parameterName"/>.day</xsl:with-param>
<xsl:with-param name="dateParamName"><xsl:value-of select="parameterName"/></xsl:with-param>
</xsl:call-template>
</xsl:attribute>
</input>
<select>
<xsl:attribute name="name"><xsl:value-of select="parameterName"/>.year</xsl:attribute>
<xsl:for-each select="yearList/year">
<option>
<xsl:attribute name="value"><xsl:value-of select="@value"/></xsl:attribute>
<xsl:if test="@value=$defaultYear">
<xsl:attribute name="selected">selected</xsl:attribute>
</xsl:if>
<xsl:value-of select="text()"/>
</option>
</xsl:for-each>
</select>
<xsl:call-template name="printErrors"/>
</td>
</xsl:template>
<!-- This prints out the default value for a date -->
<xsl:template name="printDateDefaultValue">
<xsl:param name="currentDefault"><xsl:value-of select="defaultValue"/></xsl:param>
<xsl:param name="paramName"><xsl:value-of select="parameterName"/></xsl:param>
<xsl:param name="dateParamName"><xsl:value-of select="parameterName"/></xsl:param>
<xsl:choose>
<xsl:when test="//bebop:page/cms:contentPanel/cms:item/formbuilder:formInfo/formbuilder:formDefaults[@parameterName=$dateParamName]/formbuilder:formDefaultValue[@type=$paramName]"><xsl:value-of select="//bebop:page/cms:contentPanel/cms:item/formbuilder:formInfo/formbuilder:formDefaults[@parameterName=$dateParamName]/formbuilder:formDefaultValue[@type=$paramName]"/></xsl:when>
<xsl:when test="not($currentDefault='')"><xsl:value-of select="$currentDefault"/></xsl:when>
<xsl:otherwise></xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>

View File

@ -1,28 +0,0 @@
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:formbuilder="http://www.arsdigita.com/formbuilder/1.0"
xmlns:bebop="http://www.arsdigita.com/bebop/1.0">
<!-- The standard submit -->
<xsl:template match="component[defaultDomainClass='com.arsdigita.formbuilder.PersistentSubmit']">
<td colspan="2" align="center">
<input type="submit">
<xsl:attribute name="onclick">if(this.value == 'null') { this.value = 'Please Wait'; this.form.submit(); }</xsl:attribute>
<xsl:attribute name="name"><xsl:value-of select="parameterName"/></xsl:attribute>
<xsl:attribute name="value">
<xsl:choose>
<xsl:when test="defaultValue">
<xsl:value-of select="defaultValue"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="parameterName"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</input>
</td>
</xsl:template>
</xsl:stylesheet>

View File

@ -1,111 +0,0 @@
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:formbuilder="http://www.arsdigita.com/formbuilder/1.0"
xmlns:ui="http://www.arsdigita.com/ui/1.0"
xmlns:bebop="http://www.arsdigita.com/bebop/1.0">
<!-- This contains text widgets such as textfield, password, and textarea -->
<!-- The standard password form -->
<xsl:template match="component[defaultDomainClass='com.arsdigita.formbuilder.PersistentPassword']">
<th align="left" valign="top">
<xsl:call-template name="printLabel"/>
</th>
<td align="left" valign="top">
<xsl:call-template name="textFieldTemplate">
<xsl:with-param name="type" select="'password'"/>
</xsl:call-template>
<xsl:call-template name="printErrors"/>
</td>
</xsl:template>
<!-- The standard textField form -->
<xsl:template match="component[defaultDomainClass='com.arsdigita.formbuilder.PersistentTextField']">
<th align="left" valign="top">
<xsl:call-template name="printLabel"/>
</th>
<td align="left" valign="top">
<xsl:call-template name="textFieldTemplate">
<xsl:with-param name="type" select="'text'"/>
</xsl:call-template>
<xsl:call-template name="printErrors"/>
</td>
</xsl:template>
<!-- added by CS Gupta -->
<!-- The standard Email Field form -->
<xsl:template match="component[defaultDomainClass='com.arsdigita.formbuilder.PersistentEmailField']">
<th align="left" valign="top">
<xsl:call-template name="printLabel"/>
</th>
<xsl:variable name="defaultValue"><xsl:call-template name="printDefaultValue"/></xsl:variable>
<xsl:variable name="value">
<xsl:choose>
<xsl:when test="string-length($defaultValue) > 0">
<xsl:value-of select="$defaultValue"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="/bebop:page/ui:userBanner/@primaryEmail"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<td align="left" valign="top">
<xsl:call-template name="textFieldTemplate">
<xsl:with-param name="type" select="'text'"/>
<xsl:with-param name="value" select="$value"/>
</xsl:call-template>
<xsl:call-template name="printErrors"/>
</td>
</xsl:template>
<!-- a template for all of the single line text fields -->
<xsl:template name="textFieldTemplate">
<xsl:param name="type"/>
<xsl:param name="value">
<xsl:call-template name="printDefaultValue"/>
</xsl:param>
<input value="{$value}">
<!-- Default values for the dimension of a single line text field are specified here -->
<xsl:attribute name="type"><xsl:value-of select="$type"/></xsl:attribute>
<xsl:attribute name="maxlength"><xsl:value-of select="maxlength"/></xsl:attribute>
<xsl:if test="maxlength=0">
<xsl:attribute name="maxlength">30</xsl:attribute>
</xsl:if>
<xsl:attribute name="name"><xsl:value-of select="parameterName"/></xsl:attribute>
<xsl:attribute name="size"><xsl:value-of select="size"/></xsl:attribute>
<xsl:if test="size=0">
<xsl:attribute name="size">30</xsl:attribute>
</xsl:if>
</input>
</xsl:template>
<!-- Persistent Text Area -->
<xsl:template match="component[defaultDomainClass='com.arsdigita.formbuilder.PersistentTextArea']">
<th align="left" valign="top">
<xsl:call-template name="printLabel"/>
</th>
<td align="left" valign="top">
<xsl:call-template name="printErrors"/>
<textarea>
<!-- Default values for the dimension of the textarea are specified here -->
<xsl:attribute name="name"><xsl:value-of select="parameterName"/></xsl:attribute>
<xsl:attribute name="rows"><xsl:value-of select="rows"/></xsl:attribute>
<xsl:if test="rows=0">
<xsl:attribute name="rows">5</xsl:attribute>
</xsl:if>
<xsl:attribute name="cols"><xsl:value-of select="cols"/></xsl:attribute>
<xsl:if test="cols=0">
<xsl:attribute name="cols">3</xsl:attribute>
</xsl:if>
<xsl:call-template name="printDefaultValue"/>
</textarea>
</td>
</xsl:template>
</xsl:stylesheet>

View File

@ -1,148 +0,0 @@
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:formbuilder="http://www.arsdigita.com/formbuilder/1.0"
xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
xmlns:cms="http://www.arsdigita.com/cms/1.0">
<!-- In this example code, we set things up so that only the actual
widgets are called and then it is up to that widget to decide which,
if any, WidgetLabel to include. -->
<xsl:import href="PersistentDate.xsl"/>
<xsl:import href="PersistentSubmit.xsl"/>
<xsl:import href="OptionWidgets.xsl"/>
<xsl:import href="TextWidgets.xsl"/>
<xsl:template match="form">
<form>
<xsl:attribute name="name"><xsl:value-of select="name"/></xsl:attribute>
<xsl:attribute name="method">post</xsl:attribute>
<xsl:choose>
<xsl:when test="../remote = 'true'">
<xsl:attribute name="action"><xsl:value-of select="../remoteUrl"/></xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="action"><xsl:value-of select="../@formAction"/></xsl:attribute>
<input type="hidden" value="visited">
<xsl:attribute name="name">form.<xsl:value-of select="name"/></xsl:attribute>
</input>
</xsl:otherwise>
</xsl:choose>
<table>
<xsl:for-each select="component[not(defaultDomainClass='com.arsdigita.formbuilder.WidgetLabel')]" >
<xsl:sort select="link/orderNumber" data-type="number"/>
<tr>
<xsl:apply-templates select="."/>
</tr>
</xsl:for-each>
</table>
<xsl:apply-templates select="../formbuilder:pageState/bebop:pageState"/>
</form>
</xsl:template>
<!-- the stand alone form sections -->
<xsl:template match="formSection">
<form>
<xsl:attribute name="name"><xsl:value-of select="name"/></xsl:attribute>
<xsl:attribute name="method">post</xsl:attribute>
<xsl:attribute name="action"><xsl:value-of select="../formAction"/></xsl:attribute>
<xsl:for-each select="component" >
<xsl:sort select="link/orderNumber" data-type="number"/>
<tr>
<xsl:apply-templates select="."/>
</tr>
</xsl:for-each>
<xsl:apply-templates select="../formbuilder:pageState/bebop:pageState"/>
</form>
</xsl:template>
<!-- process through the form sections that are embeded within forms -->
<xsl:template match="component[objectType='com.arsdigita.cms.formbuilder.FormSectionWrapper']">
<xsl:for-each select="formSectionItem/formSection/component[not(defaultDomainClass='com.arsdigita.formbuilder.WidgetLabel')]">
<xsl:sort select="link/orderNumber" data-type="number"/>
<tr>
<xsl:apply-templates select="."/>
</tr>
</xsl:for-each>
</xsl:template>
<!-- a utility template to allow components to find and print
the appropriate label -->
<xsl:template name="printLabel">
<!-- not always the next following-sibling, so checking for previous orderNumber -->
<xsl:variable name="correspondingLabelOrderNumber" select="./link/orderNumber - 1"/>
<xsl:if test="../component[defaultDomainClass='com.arsdigita.formbuilder.WidgetLabel' and link/orderNumber = $correspondingLabelOrderNumber]">
<xsl:apply-templates select="../component[defaultDomainClass='com.arsdigita.formbuilder.WidgetLabel' and link/orderNumber = $correspondingLabelOrderNumber]" />
</xsl:if>
</xsl:template>
<!-- a utility template to print out error messages -->
<xsl:template name="printErrors">
<xsl:param name="parameterName"><xsl:value-of select="parameterName"/></xsl:param>
<xsl:if test="//bebop:page/cms:contentPanel/cms:item/formbuilder:formInfo/formbuilder:formError[@id=$parameterName]">
<font color="red"><xsl:value-of select="//bebop:page/cms:contentPanel/cms:item/formbuilder:formInfo/formbuilder:formError/@message"/></font><br/>
</xsl:if>
</xsl:template>
<!-- This prints out the default value for the parameter
When there is only one value, it prints it. If there are multiple values,
it prints them seperated by a ";" -->
<xsl:template name="printDefaultValue">
<xsl:param name="currentDefault"><xsl:value-of select="defaultValue"/></xsl:param>
<xsl:param name="paramName"><xsl:value-of select="parameterName"/></xsl:param>
<xsl:choose>
<xsl:when test="//bebop:page/cms:contentPanel/cms:item/formbuilder:formInfo/formbuilder:formDefaults[@parameterName=$paramName]"><xsl:for-each select="//bebop:page/cms:contentPanel/cms:item/formbuilder:formInfo/formbuilder:formDefaults[@parameterName=$paramName]/formbuilder:formDefaultValue"><xsl:if test="not(position()=1)">;</xsl:if><xsl:value-of select="text()"/></xsl:for-each></xsl:when>
<xsl:when test="not($currentDefault='')"><xsl:value-of select="$currentDefault"/></xsl:when>
<xsl:otherwise></xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- The standard label -->
<xsl:template match="component[defaultDomainClass='com.arsdigita.formbuilder.WidgetLabel']">
<xsl:value-of select="label"/>
</xsl:template>
<!-- The hidden variable -->
<xsl:template match="component[defaultDomainClass='com.arsdigita.formbuilder.PersistentHidden']">
<input type="hidden">
<xsl:attribute name="value"><xsl:value-of select="defaultValue"/></xsl:attribute>
<xsl:attribute name="name"><xsl:value-of select="parameterName"/></xsl:attribute>
</input>
</xsl:template>
<!-- Unique ID generator -->
<xsl:template match="component[defaultDomainClass='com.arsdigita.formbuilder.HiddenIDGenerator']">
<input type="hidden">
<xsl:attribute name="value"><xsl:value-of select="defaultValue"/></xsl:attribute>
<xsl:attribute name="name"><xsl:value-of select="parameterName"/></xsl:attribute>
</input>
</xsl:template>
<!-- The Persistent Text Description -->
<xsl:template match="component[defaultDomainClass='com.arsdigita.formbuilder.PersistentText']">
<td colspan="2" align="left">
<p><xsl:value-of disable-output-escaping="yes" select="description"/></p>
</td>
</xsl:template>
<!-- The Persistent Text Heading -->
<xsl:template match="component[defaultDomainClass='com.arsdigita.formbuilder.PersistentHeading']">
<td colspan="2" align="left">
<p><xsl:value-of disable-output-escaping="yes" select="description"/></p>
</td>
</xsl:template>
<!--
PersistentDeditor.java
PersistentLabel.java
-->
</xsl:stylesheet>

View File

@ -1,4 +0,0 @@
<hr size="1" width="67%" align="center" noshade>
<p align="right"><%= new java.util.Date() %>
</body>
</html>

View File

@ -1,25 +0,0 @@
<%@ page
import="com.arsdigita.versioning.VersioningServlet.GraphPrinter"
%>
<%@ include file="header.jspf" %>
<h1>Versioning Dependence Graph</h1>
<blockquote><pre class="programlisting">
<%
GraphPrinter printer = (GraphPrinter) request.getAttribute("graphPrinter");
if ( printer == null ) {
throw new ServletException("couldn't find the printer attribute");
}
printer.setWriter(out);
printer.printGraph();
%>
</pre></blockquote>
<div align="center">
<a href="main">Main</a>
</div>
<%@ include file="footer.jspf" %>

View File

@ -1,6 +0,0 @@
<html>
<head>
<title><%= (String) request.getAttribute("title") %></title>
<link href="vlog.css" rel="stylesheet" type="text/css"/>
</head>
<body>

View File

@ -1,56 +0,0 @@
<%@ page
import="com.arsdigita.versioning.VersioningServlet.VersionedObjects,
com.arsdigita.persistence.OID,
java.net.URLEncoder"
%>
<%@ include file="header.jspf" %>
<form action="main" method="GET">
<span>Object type: <input type="text" name="objectType" maxlength="40"> </span>
<span><input type="submit" name="search" value=" Search ">
<input type="hidden" name="cmd" value="typeSearch">
</form>
<%
VersionedObjects oids = (VersionedObjects) request.getAttribute("versionedObjects");
if ( oids!= null && oids.size() > 0 ) {
%>
<h1>OIDs</h1>
<%
}
%>
<table border="1" cellpadding="2" cellspacing="0" align="center" width="80%">
<tr>
<th>Data Object</th>
<th colspan="2">Show Txns</th>
</tr>
<%
if ( oids != null ) {
while ( oids.hasNext() ) {
String serOID = (String) oids.next();
String strOID = oids.getOID().toString();
String encoded = URLEncoder.encode(serOID);
String href = "txns?cmd=showTxns&amp;oid=" + encoded;
String taggedHref = href + "&amp;tagged=yes";
%>
<tr>
<td><%= strOID %></a></td>
<td><a href="<%= href %>">affecting</a></td>
<td><a href="<%= taggedHref %>">tagged</a></td>
</tr>
<%
}
}
%>
</table>
<div align="center">
<a href="graph?cmd=graph&amp;graphType=versioning">Versioning Dependency Graph</a>
</div>
<%@ include file="footer.jspf" %>

View File

@ -1,31 +0,0 @@
<%@ page
autoFlush="true"
contentType="text/plain"
import="com.arsdigita.versioning.VersioningServlet.RollbackLogger,
com.arsdigita.persistence.OID,
com.arsdigita.util.AssertionError,
java.io.IOException,
java.io.PrintWriter,
java.math.BigInteger"
%>
<%
RollbackLogger rbl = (RollbackLogger) request.getAttribute("logger");
if ( rbl == null ) {
throw new ServletException("couldn't find the logger attribute");
}
%>
Rolling back <%= rbl.getOID() %> to txnID=<%= rbl.getTxnID() %>
<%
rbl.setWriter(out);
try {
rbl.rollback();
} catch (RuntimeException ex) {
rbl.printException(ex);
} catch (AssertionError er) {
rbl.printException(er);
}
%>

View File

@ -1,50 +0,0 @@
<%@ page
import="com.arsdigita.versioning.Tag,
com.arsdigita.versioning.Transaction,
com.arsdigita.versioning.TransactionCollection,
com.arsdigita.persistence.OID,
com.arsdigita.developersupport.Debug,
java.math.BigInteger,
java.util.Date"
%>
<%@ include file="header.jspf" %>
<%
TransactionCollection txnColl =
(TransactionCollection) request.getAttribute("txns");
if ( txnColl == null ) {
throw new ServletException("couldn't find the txns attribute");
}
OID oid = (OID) request.getAttribute("oid");
if ( oid == null ) {
throw new ServletException("couldn't find the oid attribute");
}
String encodedOID = (String) request.getAttribute("encodedOID");
%>
<h1>Txns for <%= oid.toString() %></h1>
<table border="1" cellpadding="2" cellspacing="0" align="center" width="80%">
<%
while ( txnColl.next() ) {
Transaction txn = txnColl.getTransaction();
BigInteger id = txn.getID();
String strID = id.toString();
Date date = txn.getTimestamp();
String strDate = String.valueOf(date);
String href = "rollback?cmd=rollback&amp;txnID=" + id + "&amp;oid=" + encodedOID;
%>
<tr>
<td><a href="<%= href %>"><%= id %></a></td>
<td><%= date %></td>
</tr>
<%
}
%>
</table>
<%@ include file="footer.jspf" %>

View File

@ -1,60 +0,0 @@
body {
background: white;
color: black;
margin-left: 3%;
margin-right: 3%;
}
td {
padding-left: 8px;
margin-top: 0px;
margin-bottom: 0px;
font-family: arial, helvetica;
font-size: x-small;
}
p {
font-family: georgia, arial, helvetica;
font-size: x-small;
}
th {
font-family: arial, helvetica;
text-align: left;
padding-left: 8px;
font-size: x-small;
background-color: #878175;
color: white;
}
h1 {
font-family: arial, helvetica;
font-weight: bold;
margin-bottom: 4px;
}
h2 {
font-family: arial, helvetica;
font-size: small;
font-weight: bold;
margin-bottom: 4px;
margin-top: 4px;
}
pre {
display: block;
font-family: monospace;
white-space: pre;
margin: 0%;
padding-top: 0.5ex;
padding-bottom: 0.5ex;
padding-left: 1ex;
padding-right: 1ex;
width: 100%;
}
pre.programlisting {
background: WhiteSmoke;
color: black;
border: 1px solid black;
}

View File

@ -1,5 +0,0 @@
Used by:
[pb@shuttle ROOT]$ grep -R packages/formbuilder/xsl/ *
static/content-types/com/arsdigita/cms/contenttypes/FormItem.xsl:
<xsl:import href="../../../../../../packages/formbuilder/xsl/formbuilder.xsl"/>

View File

@ -678,7 +678,8 @@ publish-to-fs-servers = "http://servlet1/", "http://servlet2/"
publish-to-fs-source = "http://servlet1/" publish-to-fs-source = "http://servlet1/"
publish-to-fs-this-server = "http://servlet1/" publish-to-fs-this-server = "http://servlet1/"
search-engine = intermedia search-engine = intermedia
template-root = /packages/content-section/templates # old: template-root = /packages/content-section/templates
template-root = /templates/ccm-cms/content-section
# Portal initialization file # Portal initialization file
portal-url = /portal/ portal-url = /portal/

View File

@ -1,28 +1,23 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:admin="http://www.arsdigita.com/admin-ui/1.0" xmlns:admin="http://www.arsdigita.com/admin-ui/1.0"
xmlns:bebop="http://www.arsdigita.com/bebop/1.0" xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
xmlns:portal="http://www.uk.arsdigita.com/portal/1.0" xmlns:portal="http://www.uk.arsdigita.com/portal/1.0"
xmlns:portlet="http://www.uk.arsdigita.com/portlet/1.0" xmlns:portlet="http://www.uk.arsdigita.com/portlet/1.0"
exclude-result-prefixes="xsl admin bebop portal portlet" exclude-result-prefixes="xsl admin bebop portal portlet"
version="1.0"> version="1.0">
<xsl:import href="login-portlet.xsl"/>
<xsl:import href="directory-portlet.xsl"/>
<xsl:import href="content-sections-portlet.xsl"/>
<xsl:import href="time-of-day-portlet.xsl"/>
<xsl:import href="freeform-html-portlet.xsl"/>
<xsl:import href="rss-feed-portlet.xsl"/>
<xsl:import href="tasklist-portlet.xsl"/>
<xsl:import href="application-directory-portlet.xsl"/>
<xsl:import href="workspace-directory-portlet.xsl"/>
<xsl:import href="content-item-portlet.xsl"/>
<xsl:import href="login-portlet.xsl"/>
<xsl:import href="directory-portlet.xsl"/>
<xsl:import href="content-sections-portlet.xsl"/>
<xsl:import href="time-of-day-portlet.xsl"/>
<xsl:import href="freeform-html-portlet.xsl"/>
<xsl:import href="rss-feed-portlet.xsl"/>
<xsl:import href="tasklist-portlet.xsl"/>
<xsl:import href="application-directory-portlet.xsl"/>
<xsl:import href="workspace-directory-portlet.xsl"/>
<xsl:import href="content-item-portlet.xsl"/>
</xsl:stylesheet> </xsl:stylesheet>

View File

@ -16,9 +16,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* *
*/ */
package com.arsdigita.london.contenttypes;
import java.util.ArrayList; package com.arsdigita.london.contenttypes;
import com.arsdigita.cms.ContentPage; import com.arsdigita.cms.ContentPage;
import com.arsdigita.cms.ContentSection; import com.arsdigita.cms.ContentSection;
@ -28,36 +27,65 @@ import com.arsdigita.london.contenttypes.ui.AddContactPropertiesStep;
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard; import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
import com.arsdigita.globalization.GlobalizedMessage; import com.arsdigita.globalization.GlobalizedMessage;
import com.arsdigita.runtime.DomainInitEvent; import com.arsdigita.runtime.DomainInitEvent;
import java.util.ArrayList;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
/** /**
* Initializer class to initialize <code>ContentType Contact</code>. * Executes at each system startup and initializes the Contact content type.
*
* Defines the content type specific properties and just uses the super class
* methods to register the content type with the (transient) content type store
* (map). This is done by runtimeRuntime startup method which runs the init()
* methods of all initializers (this one just using the parent implementation).
* *
* @author Shashin Shinde <a href="mailto:sshinde@redhat.com">sshinde@redhat.com</a> * @author Shashin Shinde <a href="mailto:sshinde@redhat.com">sshinde@redhat.com</a>
* @version $Id: ContactInitializer.java 287 2005-02-22 00:29:02Z sskracic $ * @version $Id: ContactInitializer.java 287 2005-02-22 00:29:02Z sskracic $
*/ */
public class ContactInitializer extends ContentTypeInitializer { public class ContactInitializer extends ContentTypeInitializer {
/** Private Logger instance for debugging purpose. */
private static final Logger logger = Logger.getLogger( private static final Logger logger = Logger.getLogger(
ContactInitializer.class); ContactInitializer.class);
/**
* Constructor, sets the PDL manifest file and object type string.
*/
public ContactInitializer() { public ContactInitializer() {
super("ccm-ldn-types-contact.pdl.mf", Contact.BASE_DATA_OBJECT_TYPE); super("ccm-ldn-types-contact.pdl.mf", Contact.BASE_DATA_OBJECT_TYPE);
} }
/**
* Retrieve location of this content type's internal default theme
* stylesheet(s) which concomitantly serve as a fallback if a custom theme
* is engaged.
*
* Custom themes usually will provide their own stylesheet(s) and their own
* access method, but may not support every content type.
*
* Overwrites parent method with AgendaItem specific value for use by the
* parent class worker methods.
*
* @return String array of XSL stylesheet files of the internal default theme
*/
@Override @Override
public String[] getStylesheets() { public String[] getStylesheets() {
return new String[]{ return new String[]{
"/static/content-types/com/arsdigita/london/contenttypes/Contact.xsl",}; INTERNAL_THEME_TYPES_DIR + "ldn/Contact.xsl",};
} }
/**
* Retrieves fully qualified traversal adapter file name.
* @return
*/
@Override @Override
public String getTraversalXML() { public String getTraversalXML() {
return return
"/WEB-INF/traversal-adapters/com/arsdigita/london/contenttypes/Contact.xml"; "/WEB-INF/traversal-adapters/com/arsdigita/london/contenttypes/Contact.xml";
} }
private static ArrayList phoneTypesList = new ArrayList(10);
private static ArrayList phoneTypesList = new ArrayList(10);
static { static {
logger.debug("Static initalizer starting..."); logger.debug("Static initalizer starting...");
phoneTypesList.add("Office"); phoneTypesList.add("Office");

View File

@ -15,35 +15,58 @@
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
package com.arsdigita.london.contenttypes; package com.arsdigita.london.contenttypes;
import com.arsdigita.cms.contenttypes.ContentTypeInitializer; import com.arsdigita.cms.contenttypes.ContentTypeInitializer;
/** /**
* Initializer class to initialize <code>ContentType ESDService</code>. * Executes at each system startup and initializes the ESDService content type.
*
* Defines the content type specific properties and just uses the super class * Defines the content type specific properties and just uses the super class
* methods to register the content type with the (transient) content type store * methods to register the content type with the (transient) content type store
* (map). * (map). This is done by runtimeRuntime startup method which runs the init()
* methods of all initializers (this one just using the parent implementation).
* *
* @author Shashin Shinde <a href="mailto:sshinde@redhat.com">sshinde@redhat.com</a> * @author Shashin Shinde <a href="mailto:sshinde@redhat.com">sshinde@redhat.com</a>
* @version $Id: ESDServiceInitializer.java 287 2005-02-22 00:29:02Z sskracic $ * @version $Id: ESDServiceInitializer.java 287 2005-02-22 00:29:02Z sskracic $
*/ */
public class ESDServiceInitializer extends ContentTypeInitializer { public class ESDServiceInitializer extends ContentTypeInitializer {
/**
* Constructor, sets the PDL manifest file and object type string.
*/
public ESDServiceInitializer() { public ESDServiceInitializer() {
super("ccm-cms-types-esdservice.pdl.mf", ESDService.BASE_DATA_OBJECT_TYPE); super("ccm-cms-types-esdservice.pdl.mf", ESDService.BASE_DATA_OBJECT_TYPE);
} }
/**
* Retrieve location of this content type's internal default theme
* stylesheet(s) which concomitantly serve as a fallback if a custom theme
* is engaged.
*
* Custom themes usually will provide their own stylesheet(s) and their own
* access method, but may not support every content type.
*
* Overwrites parent method with AgendaItem specific value for use by the
* parent class worker methods.
*
* @return String array of XSL stylesheet files of the internal default theme
*/
@Override @Override
public String[] getStylesheets() { public String[] getStylesheets() {
return new String [] { return new String [] {
"/static/content-types/com/arsdigita/london/contenttypes/ESDService.xsl", INTERNAL_THEME_TYPES_DIR + "ldn/ESDService.xsl",
}; };
} }
/**
* Retrieves fully qualified traversal adapter file name.
* @return
*/
@Override @Override
public String getTraversalXML() { public String getTraversalXML() {
return "/WEB-INF/traversal-adapters/com/arsdigita/london/contenttypes/ESDService.xml"; return "/WEB-INF/traversal-adapters/com/arsdigita/london/contenttypes/ESDService.xml";
} }
} }

View File

@ -18,7 +18,7 @@
<xsl:import href="../../bebop/xsl/DimensionalNavbar.xsl"/> <xsl:import href="../../bebop/xsl/DimensionalNavbar.xsl"/>
<xsl:import href="../../toolbox/xsl/ControlBar.xsl"/> <xsl:import href="../../toolbox/xsl/ControlBar.xsl"/>
<xsl:import href="../../portlets/xsl/freeform-html-portlet.xsl"/> <xsl:import href="../../portlets/xsl/freeform-html-portlet.xsl"/>
<xsl:import href="../../portlets/xsl/time-of-day-portlet.xsl"/> <!-- <xsl:import href="../../portlets/xsl/time-of-day-portlet.xsl"/> -->
<xsl:import href="../../portlets/xsl/rss-feed-portlet.xsl"/> <xsl:import href="../../portlets/xsl/rss-feed-portlet.xsl"/>
<xsl:output method="html" indent="yes"/> <xsl:output method="html" indent="yes"/>

View File

@ -36,7 +36,7 @@ import com.arsdigita.portalworkspace.portlet.FlashPortletInitializer;
import com.arsdigita.portalworkspace.portlet.FreeformHTMLPortlet; import com.arsdigita.portalworkspace.portlet.FreeformHTMLPortlet;
import com.arsdigita.portalworkspace.portlet.LoginPortlet; import com.arsdigita.portalworkspace.portlet.LoginPortlet;
import com.arsdigita.portalworkspace.portlet.RSSFeedPortlet; import com.arsdigita.portalworkspace.portlet.RSSFeedPortlet;
import com.arsdigita.portalworkspace.portlet.TimeOfDayPortlet; // import com.arsdigita.portlet.TimeOfDayPortlet;
import com.arsdigita.portalworkspace.portlet.MyWorkspacesPortlet; import com.arsdigita.portalworkspace.portlet.MyWorkspacesPortlet;
import com.arsdigita.portalworkspace.portlet.WorkspaceNavigatorPortlet; import com.arsdigita.portalworkspace.portlet.WorkspaceNavigatorPortlet;
import com.arsdigita.portalworkspace.portlet.WorkspaceSummaryPortlet; import com.arsdigita.portalworkspace.portlet.WorkspaceSummaryPortlet;
@ -62,6 +62,7 @@ import com.arsdigita.xml.XML;
*/ */
public class Initializer extends CompoundInitializer { public class Initializer extends CompoundInitializer {
/** Private Logger instance for debugging purpose. */
private static final Logger s_log = Logger.getLogger(Initializer.class); private static final Logger s_log = Logger.getLogger(Initializer.class);
/** /**
@ -168,6 +169,7 @@ public class Initializer extends CompoundInitializer {
} }
}); });
/* MOVED to ccm-portlet-collection
e.getFactory().registerInstantiator( e.getFactory().registerInstantiator(
TimeOfDayPortlet.BASE_DATA_OBJECT_TYPE, TimeOfDayPortlet.BASE_DATA_OBJECT_TYPE,
new ACSObjectInstantiator() { new ACSObjectInstantiator() {
@ -175,6 +177,7 @@ public class Initializer extends CompoundInitializer {
return new TimeOfDayPortlet(dataObject); return new TimeOfDayPortlet(dataObject);
} }
}); });
*/
// WorkspaceDirectoryPortlet, imports ccm-ldn-rss // WorkspaceDirectoryPortlet, imports ccm-ldn-rss
// e.getFactory().registerInstantiator( // e.getFactory().registerInstantiator(

View File

@ -28,7 +28,7 @@ import com.arsdigita.portalworkspace.portlet.FreeformHTMLPortlet;
import com.arsdigita.portalworkspace.portlet.LoginPortlet; import com.arsdigita.portalworkspace.portlet.LoginPortlet;
import com.arsdigita.portalworkspace.portlet.MyWorkspacesPortlet ; import com.arsdigita.portalworkspace.portlet.MyWorkspacesPortlet ;
import com.arsdigita.portalworkspace.portlet.RSSFeedPortlet; import com.arsdigita.portalworkspace.portlet.RSSFeedPortlet;
import com.arsdigita.portalworkspace.portlet.TimeOfDayPortlet; // import com.arsdigita.portlet.TimeOfDayPortlet;
import com.arsdigita.portalworkspace.portlet.WorkspaceNavigatorPortlet; import com.arsdigita.portalworkspace.portlet.WorkspaceNavigatorPortlet;
import com.arsdigita.portalworkspace.portlet.WorkspaceSummaryPortlet; import com.arsdigita.portalworkspace.portlet.WorkspaceSummaryPortlet;
import com.arsdigita.portal.PortletType; import com.arsdigita.portal.PortletType;
@ -60,6 +60,7 @@ import org.apache.log4j.Logger;
*/ */
public class Loader extends PackageLoader { public class Loader extends PackageLoader {
/** Private Logger instance for debugging purpose. */
private static final Logger s_log = Logger.getLogger(Loader.class); private static final Logger s_log = Logger.getLogger(Loader.class);
private StringParameter m_url = new StringParameter( private StringParameter m_url = new StringParameter(
@ -112,7 +113,7 @@ public class Loader extends PackageLoader {
loadLoginPortlet(); loadLoginPortlet();
loadMyWorkspacesPortlet(); loadMyWorkspacesPortlet();
loadRSSFeedPortlet(); loadRSSFeedPortlet();
loadTimeOfDayPortlet(); // loadTimeOfDayPortlet();
loadWorkspaceNavigatorPortlet(); loadWorkspaceNavigatorPortlet();
loadWorkspaceSummaryPortlet(); loadWorkspaceSummaryPortlet();
} }
@ -264,12 +265,12 @@ public class Loader extends PackageLoader {
/** /**
* *
*/ */
private void loadTimeOfDayPortlet() { // private void loadTimeOfDayPortlet() {
PortletType type = PortletType.createPortletType("Time of Day", //PortletType type = PortletType.createPortletType("Time of Day",
PortletType.WIDE_PROFILE, // PortletType.WIDE_PROFILE,
TimeOfDayPortlet.BASE_DATA_OBJECT_TYPE); // TimeOfDayPortlet.BASE_DATA_OBJECT_TYPE);
type.setDescription("Displays the current date and time"); // type.setDescription("Displays the current date and time");
} // }
private void loadWorkspaceNavigatorPortlet() { private void loadWorkspaceNavigatorPortlet() {
PortletType type = PortletType.createPortletType( PortletType type = PortletType.createPortletType(

View File

@ -1,10 +1,10 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:admin="http://www.arsdigita.com/admin-ui/1.0"
xmlns:admin="http://www.arsdigita.com/admin-ui/1.0" xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
xmlns:bebop="http://www.arsdigita.com/bebop/1.0" xmlns:portal="http://www.uk.arsdigita.com/portal/1.0"
xmlns:portal="http://www.uk.arsdigita.com/portal/1.0" xmlns:portlet="http://www.uk.arsdigita.com/portlet/1.0"
xmlns:portlet="http://www.uk.arsdigita.com/portlet/1.0"> version="1.0">
<xsl:import href="../../bebop/xsl/bebop.xsl"/> <xsl:import href="../../bebop/xsl/bebop.xsl"/>
<xsl:import href="../../ui/xsl/ui.xsl"/> <xsl:import href="../../ui/xsl/ui.xsl"/>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"> version="1.0">
<xsl:import href="application-directory-portlet.xsl"/> <xsl:import href="application-directory-portlet.xsl"/>
<xsl:import href="content-directory-portlet.xsl"/> <xsl:import href="content-directory-portlet.xsl"/>
@ -9,7 +9,9 @@
<xsl:import href="login-portlet.xsl"/> <xsl:import href="login-portlet.xsl"/>
<!-- MyWorkspacesPortlet - xsl file missing --> <!-- MyWorkspacesPortlet - xsl file missing -->
<xsl:import href="rss-feed-portlet.xsl"/> <xsl:import href="rss-feed-portlet.xsl"/>
<xsl:import href="time-of-day-portlet.xsl"/>
<!-- time of day in separate portlet collection package -->
<!-- <xsl:import href="time-of-day-portlet.xsl"/> -->
<!-- WorkspaceNavigatorPortlet - xsl file missing --> <!-- WorkspaceNavigatorPortlet - xsl file missing -->
<!-- WorkspaceSummaryPortlet - xsl file missing --> <!-- WorkspaceSummaryPortlet - xsl file missing -->

View File

@ -0,0 +1,23 @@
<?xml version="1.0"?>
<ccm:application xmlns:ccm="http://ccm.redhat.com/ccm-project"
name="ccm-portlet-collection"
prettyName="Portlel Collection"
version="6.6.0"
release="1"
webapp="ROOT">
<ccm:dependencies>
<ccm:requires name="ccm-core" version="6.6.0" relation="ge"/>
<ccm:requires name="ccm-cms" version="6.6.0" relation="ge"/>
<ccm:requires name="ccm-subsite" version="6.6.0" relation="ge"/>
<ccm:requires name="ccm-ldn-util" version="6.6.0" relation="ge"/>
</ccm:dependencies>
<ccm:contacts>
<ccm:contact uri="http://www.redhat.com/software/rhea" type="website"/>
<ccm:contact uri="mailto:rhea@redhat.com" type="support"/>
</ccm:contacts>
<ccm:description>
A collection of portlets which serve generic tasks and do not depend on
specific CCM packages.
</ccm:description>
</ccm:application>

View File

@ -0,0 +1,2 @@
-- @ ddl/oracle-se/create.sql
-- @ ddl/oracle-se/deferred.sql

View File

@ -0,0 +1,4 @@
-- begin;
-- \i ddl/postgres/create.sql
-- \i ddl/postgres/deferred.sql
-- end;

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<registry>
<!--
<config class="com.arsdigita.portalworkspace.WorkspaceConfig"
storage="ccm-portalworkspace/portal.properties"/>
-->
</registry>

View File

@ -0,0 +1,24 @@
<load>
<requires>
<table name="inits"/>
<table name="acs_objects"/>
<initializer class="com.arsdigita.core.Initializer"/>
<!--
<table name="cms_items"/>
<initializer class="com.arsdigita.cms.Initializer"/>
<initializer class="com.arsdigita.london.util.Initializer"/>
-->
<!-- <initializer class="com.arsdigita.navigation.Initializer"/> -->
<!-- <initializer class="com.arsdigita.london.rss.Initializer"/> -->
</requires>
<provides>
<!--
<table name=""/>
-->
<initializer class="com.arsdigita.portlet.PortletCollectionInitializer"/>
</provides>
<scripts>
<schema directory="ccm-portlet-collection"/>
<data class="com.arsdigita.portlet.PortletCollectionLoader"/>
</scripts>
</load>

View File

@ -0,0 +1,282 @@
/*
* Copyright (C) 2001-2004 Red Hat Inc. All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package com.arsdigita.portlet;
import com.arsdigita.bebop.RequestLocal;
import com.arsdigita.db.DbHelper;
import com.arsdigita.domain.DomainObject;
import com.arsdigita.domain.DomainObjectInstantiator;
import com.arsdigita.domain.xml.TraversalHandler;
import com.arsdigita.kernel.ACSObjectInstantiator;
import com.arsdigita.kernel.ResourceType;
import com.arsdigita.kernel.ResourceTypeConfig;
import com.arsdigita.kernel.ui.ResourceConfigComponent;
import com.arsdigita.kernel.ui.ResourceConfigFormSection;
import com.arsdigita.portal.PortletType;
// import com.arsdigita.portalworkspace.portlet.ApplicationDirectoryPortlet;
// import com.arsdigita.portalworkspace.portlet.ContentDirectoryPortlet;
// import com.arsdigita.portalworkspace.portlet.FlashPortletInitializer;
// import com.arsdigita.portalworkspace.portlet.FreeformHTMLPortlet;
// import com.arsdigita.portalworkspace.portlet.LoginPortlet;
// import com.arsdigita.portalworkspace.portlet.RSSFeedPortlet;
// import com.arsdigita.portalworkspace.portlet.MyWorkspacesPortlet;
// import com.arsdigita.portalworkspace.portlet.WorkspaceNavigatorPortlet;
// import com.arsdigita.portalworkspace.portlet.WorkspaceSummaryPortlet;
// import com.arsdigita.portalworkspace.ui.admin.WorkspaceConfigFormSection;
// import com.arsdigita.portalworkspace.ui.portlet.ContentDirectoryPortletEditor;
// import com.arsdigita.portalworkspace.ui.portlet.FreeformHTMLPortletEditor;
// import com.arsdigita.portalworkspace.ui.portlet.RSSFeedPortletEditor;
// import com.arsdigita.portalworkspace.ui.portlet.RSSFeedPortletEditorForm;
import com.arsdigita.persistence.DataObject;
// import com.arsdigita.persistence.pdl.ManifestSource;
// import com.arsdigita.persistence.pdl.NameFilter;
import com.arsdigita.runtime.CompoundInitializer;
import com.arsdigita.runtime.DomainInitEvent;
import com.arsdigita.runtime.PDLInitializer;
import com.arsdigita.runtime.RuntimeConfig;
import com.arsdigita.xml.XML;
import org.apache.log4j.Logger;
/**
* Initializes the portlets of the portlet collection package
*
* @version $Id: PortletCollectionInitializer.java 2070 2010-01-28 08:47:41Z pboy $
*/
public class PortletCollectionInitializer extends CompoundInitializer {
private static final Logger s_log = Logger.getLogger(PortletCollectionInitializer.class);
/**
* Constructor
*
*/
public PortletCollectionInitializer() {
final String url = RuntimeConfig.getConfig().getJDBCURL();
final int database = DbHelper.getDatabaseFromURL(url);
/*
add(new PDLInitializer(new ManifestSource("ccm-portalworkspace.pdl.mf",
new NameFilter(DbHelper.getDatabaseSuffix(database),
"pdl"))));
*/
}
/**
*
* @param e
*/
@Override
public void init(DomainInitEvent e) {
super.init(e);
/*
e.getFactory().registerInstantiator(
ApplicationDirectoryPortlet.BASE_DATA_OBJECT_TYPE,
new ACSObjectInstantiator() {
@Override
public DomainObject doNewInstance(DataObject dataObject) {
return new ApplicationDirectoryPortlet(dataObject);
}
});
*/
/*
e.getFactory().registerInstantiator(
ContentDirectoryPortlet.BASE_DATA_OBJECT_TYPE,
new ACSObjectInstantiator() {
public DomainObject doNewInstance(DataObject dataObject) {
return new ContentDirectoryPortlet(dataObject);
}
});
*/
/*
e.getFactory().registerInstantiator(
FreeformHTMLPortlet.BASE_DATA_OBJECT_TYPE,
new ACSObjectInstantiator() {
public DomainObject doNewInstance(DataObject dataObject) {
return new FreeformHTMLPortlet(dataObject);
}
});
*/
/*
e.getFactory().registerInstantiator(
LoginPortlet.BASE_DATA_OBJECT_TYPE,
new ACSObjectInstantiator() {
@Override
public DomainObject doNewInstance(DataObject dataObject) {
return new LoginPortlet(dataObject);
}
});
*/
/*
e.getFactory().registerInstantiator(
MyWorkspacesPortlet.BASE_DATA_OBJECT_TYPE,
new ACSObjectInstantiator() {
@Override
public DomainObject doNewInstance(DataObject dataObject) {
return new MyWorkspacesPortlet(dataObject);
}
});
*/
/*
e.getFactory().registerInstantiator(
RSSFeedPortlet.BASE_DATA_OBJECT_TYPE,
new ACSObjectInstantiator() {
@Override
public DomainObject doNewInstance(DataObject dataObject) {
return new RSSFeedPortlet(dataObject);
}
});
*/
// ----- Processing TimeOf DayPortlet -----
/* Initialize the Time Of Day portlet */
e.getFactory().registerInstantiator(
TimeOfDayPortlet.BASE_DATA_OBJECT_TYPE,
new ACSObjectInstantiator() {
@Override
public DomainObject doNewInstance(DataObject dataObject) {
return new TimeOfDayPortlet(dataObject);
}
});
/* Register internal default themes's stylesheet which concomitantly
* serves as a fallback if a custom theme is used without supporting
* this portlet. */
PortletType.registerXSLFile(
TimeOfDayPortlet.BASE_DATA_OBJECT_TYPE,
PortletType.INTERNAL_THEME_PORTLET_DIR + "time-of-day-portlet.xsl");
/*
e.getFactory().registerInstantiator(
WorkspaceNavigatorPortlet.BASE_DATA_OBJECT_TYPE,
new ACSObjectInstantiator() {
@Override
public DomainObject doNewInstance(DataObject dataObject) {
return new WorkspaceNavigatorPortlet(dataObject);
}
});
*/
/*
e.getFactory().registerInstantiator(
WorkspaceSummaryPortlet.BASE_DATA_OBJECT_TYPE,
new ACSObjectInstantiator() {
@Override
public DomainObject doNewInstance(DataObject dataObject) {
return new WorkspaceSummaryPortlet(dataObject);
}
});
*/
/*
new ResourceTypeConfig(ContentDirectoryPortlet.BASE_DATA_OBJECT_TYPE) {
@Override
public ResourceConfigFormSection getCreateFormSection(
final ResourceType resType,
final RequestLocal parentAppRL) {
final ResourceConfigFormSection config =
new ContentDirectoryPortletEditor(resType,
parentAppRL);
return config;
}
@Override
public ResourceConfigFormSection getModifyFormSection(
final RequestLocal application) {
final ContentDirectoryPortletEditor config =
new ContentDirectoryPortletEditor(application);
return config;
}
};
*/
/*
new ResourceTypeConfig(RSSFeedPortlet.BASE_DATA_OBJECT_TYPE) {
@Override
public ResourceConfigFormSection getCreateFormSection(
final ResourceType resType,
final RequestLocal parentAppRL) {
final RSSFeedPortletEditorForm config =
new RSSFeedPortletEditorForm(resType, parentAppRL);
return config;
}
@Override
public ResourceConfigFormSection getModifyFormSection(
final RequestLocal application) {
final RSSFeedPortletEditorForm config =
new RSSFeedPortletEditorForm(application);
return config;
}
@Override
public ResourceConfigComponent getCreateComponent(
final ResourceType resType,
final RequestLocal parentAppRL) {
final ResourceConfigComponent config =
new RSSFeedPortletEditor(resType, parentAppRL);
return config;
}
@Override
public ResourceConfigComponent getModifyComponent(
final RequestLocal application) {
final RSSFeedPortletEditor config =
new RSSFeedPortletEditor(application);
return config;
}
};
*/
/*
new ResourceTypeConfig(FreeformHTMLPortlet.BASE_DATA_OBJECT_TYPE) {
@Override
public ResourceConfigFormSection getCreateFormSection(
final ResourceType resType,
final RequestLocal parentAppRL) {
final ResourceConfigFormSection config =
new FreeformHTMLPortletEditor(resType, parentAppRL);
return config;
}
@Override
public ResourceConfigFormSection getModifyFormSection(
final RequestLocal application) {
final FreeformHTMLPortletEditor config =
new FreeformHTMLPortletEditor(application);
return config;
}
};
*/
/*
FlashPortletInitializer.initialize();
*/
}
}

View File

@ -0,0 +1,165 @@
/*
* Copyright (C) 2001-2004 Red Hat Inc. All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package com.arsdigita.portlet;
import com.arsdigita.kernel.Kernel;
import com.arsdigita.kernel.KernelExcursion;
import com.arsdigita.kernel.ResourceType;
import com.arsdigita.loader.PackageLoader;
// import com.arsdigita.portalworkspace.portlet.ApplicationDirectoryPortlet;
// import com.arsdigita.portalworkspace.portlet.ContentDirectoryPortlet;
// import com.arsdigita.portalworkspace.portlet.FreeformHTMLPortlet;
// import com.arsdigita.portalworkspace.portlet.LoginPortlet;
// import com.arsdigita.portalworkspace.portlet.MyWorkspacesPortlet ;
// import com.arsdigita.portalworkspace.portlet.RSSFeedPortlet;
// import com.arsdigita.portlet.TimeOfDayPortlet;
// import com.arsdigita.portalworkspace.portlet.WorkspaceNavigatorPortlet;
// import com.arsdigita.portalworkspace.portlet.WorkspaceSummaryPortlet;
import com.arsdigita.portal.PortletType;
import com.arsdigita.runtime.ScriptContext;
import com.arsdigita.util.Assert;
import com.arsdigita.util.parameter.BooleanParameter;
import com.arsdigita.util.parameter.Parameter;
import com.arsdigita.util.parameter.StringParameter;
import com.arsdigita.web.Application;
import com.arsdigita.web.ApplicationType;
import org.apache.log4j.Logger;
/**
* Executes nonrecurring at install time and loads (and configures ) all the
* portlets of the protlet collection in a default configuration.
*
* @author Justin Ross &lt;jross@redhat.com&gt;
* @author Peter Boy <pboy@barkhof.uni-bremen.de>
* @version $Id: Loader.java 2070 2010-01-28 08:47:41Z pboy $
*/
public class PortletCollectionLoader extends PackageLoader {
/** Private Logger instance for debugging purpose. */
private static final Logger s_log = Logger.getLogger(PortletCollectionLoader.class);
/**
* Standard constructor loads/registers the configuration parameter.
*/
public PortletCollectionLoader() {
/*
register(m_isPublic);
register(m_url);
register(m_title);
*/
}
/**
* Run script invoked by com.arsdigita.packing loader script.
*
* @param ctx
*/
public void run(final ScriptContext ctx) {
new KernelExcursion() {
public void excurse() {
setEffectiveParty(Kernel.getSystemParty());
// loadApplicationDirectoryPortlet();
// loadContentDirectoryPortlet();
// loadFreeformHTMLPortlet();
// loadLoginPortlet();
// loadMyWorkspacesPortlet();
// loadRSSFeedPortlet();
loadTimeOfDayPortlet();
// loadWorkspaceNavigatorPortlet();
// loadWorkspaceSummaryPortlet();
}
}.run();
}
/**
*
*/
/*
private void loadApplicationDirectoryPortlet() {
PortletType type = PortletType.createPortletType(
"Application Directory", PortletType.WIDE_PROFILE,
ApplicationDirectoryPortlet.BASE_DATA_OBJECT_TYPE);
type.setDescription("Displays a list of portal workspace applications");
}
private void loadContentDirectoryPortlet() {
PortletType type = PortletType.createPortletType("Content Directory",
PortletType.WIDE_PROFILE,
ContentDirectoryPortlet.BASE_DATA_OBJECT_TYPE);
type.setDescription("Displays the content directory categories");
}
private void loadFreeformHTMLPortlet() {
PortletType type = PortletType.createPortletType("Freeform HTML",
PortletType.WIDE_PROFILE,
FreeformHTMLPortlet.BASE_DATA_OBJECT_TYPE);
type.setDescription("Displays a freeform block of HTML");
}
private void loadLoginPortlet() {
PortletType type = PortletType.createPortletType("Site Login",
PortletType.WIDE_PROFILE, LoginPortlet.BASE_DATA_OBJECT_TYPE);
type.setDescription("Display a login form or user details");
}
private void loadMyWorkspacesPortlet() {
PortletType type = PortletType.createPortletType("My Workspaces",
PortletType.WIDE_PROFILE, MyWorkspacesPortlet.BASE_DATA_OBJECT_TYPE);
type.setDescription("MyWorkspaces: Display ????");
}
private void loadRSSFeedPortlet() {
PortletType type = PortletType.createPortletType("RSS Feed",
PortletType.WIDE_PROFILE, RSSFeedPortlet.BASE_DATA_OBJECT_TYPE);
type.setDescription("Displays an RSS Feed");
}
*/
/**
*
*/
private void loadTimeOfDayPortlet() {
PortletType type = PortletType.createPortletType("Time of Day",
PortletType.WIDE_PROFILE,
TimeOfDayPortlet.BASE_DATA_OBJECT_TYPE);
type.setDescription("Displays the current date and time");
}
/*
private void loadWorkspaceNavigatorPortlet() {
PortletType type = PortletType.createPortletType(
"Workspace Navigator Portlet", PortletType.WIDE_PROFILE,
WorkspaceNavigatorPortlet.BASE_DATA_OBJECT_TYPE);
type.setDescription("Displays ??");
}
private void loadWorkspaceSummaryPortlet() {
PortletType type = PortletType.createPortletType(
"Workspace Summary Portlet", PortletType.WIDE_PROFILE,
WorkspaceSummaryPortlet.BASE_DATA_OBJECT_TYPE);
type.setDescription("Displays ???");
}
*/
}

View File

@ -13,10 +13,10 @@
* *
*/ */
package com.arsdigita.portalworkspace.portlet; package com.arsdigita.portlet;
import com.arsdigita.bebop.portal.AbstractPortletRenderer; import com.arsdigita.bebop.portal.AbstractPortletRenderer;
import com.arsdigita.portalworkspace.ui.portlet.TimeOfDayPortletRenderer; import com.arsdigita.portlet.ui.TimeOfDayPortletRenderer;
import com.arsdigita.persistence.DataObject; import com.arsdigita.persistence.DataObject;
import com.arsdigita.portal.Portlet; import com.arsdigita.portal.Portlet;

View File

@ -13,16 +13,18 @@
* *
*/ */
package com.arsdigita.portalworkspace.ui.portlet; package com.arsdigita.portlet.ui;
import java.util.Date;
import com.arsdigita.bebop.PageState; import com.arsdigita.bebop.PageState;
import com.arsdigita.bebop.portal.AbstractPortletRenderer; import com.arsdigita.bebop.portal.AbstractPortletRenderer;
import com.arsdigita.portalworkspace.portlet.TimeOfDayPortlet; import com.arsdigita.portal.PortletType;
import com.arsdigita.portalworkspace.ui.PortalConstants; import com.arsdigita.portlet.TimeOfDayPortlet;
// import com.arsdigita.portalworkspace.ui.PortalConstants;
import com.arsdigita.xml.Element; import com.arsdigita.xml.Element;
import java.util.Date;
public class TimeOfDayPortletRenderer extends AbstractPortletRenderer { public class TimeOfDayPortletRenderer extends AbstractPortletRenderer {
private TimeOfDayPortlet m_portlet; private TimeOfDayPortlet m_portlet;
@ -32,7 +34,7 @@ public class TimeOfDayPortletRenderer extends AbstractPortletRenderer {
public void generateBodyXML(PageState state, Element parent) { public void generateBodyXML(PageState state, Element parent) {
Element date = parent.newChildElement("portlet:timeOfDay", Element date = parent.newChildElement("portlet:timeOfDay",
PortalConstants.PORTLET_XML_NS); PortletType.PORTLET_XML_NS);
date.addAttribute("date", (new Date()).toString()); date.addAttribute("date", (new Date()).toString());
} }
} }

View File

@ -678,7 +678,8 @@ publish-to-fs-servers = "http://servlet1/", "http://servlet2/"
publish-to-fs-source = "http://servlet1/" publish-to-fs-source = "http://servlet1/"
publish-to-fs-this-server = "http://servlet1/" publish-to-fs-this-server = "http://servlet1/"
search-engine = intermedia search-engine = intermedia
template-root = /packages/content-section/templates # old: template-root = /packages/content-section/templates
template-root = /templates/ccm-cms/content-section
# Portal initialization file # Portal initialization file
portal-url = /portal/ portal-url = /portal/

View File

@ -26,7 +26,8 @@ import com.arsdigita.london.terms.ui.AbstractAssignedTerms;
/** /**
* *
* Invoked by jsp * Invoked by jsp
* (e.g. packages/content-section/templates/default/aplaws-item.jsp) * (e.g. templates/ccm-cms/content-section/default/aplaws-item.jsp
* previously: packages/content-section/templates/default/aplaws-item.jsp)
*/ */
public class AssignedItemTerms extends AbstractAssignedTerms { public class AssignedItemTerms extends AbstractAssignedTerms {

View File

@ -14,9 +14,9 @@
webapp="ROOT" webapp="ROOT"
xsi:schemaLocation="http://ccm.redhat.com/ccm-project file:tools-ng/common/xsd/project.xsd"> xsi:schemaLocation="http://ccm.redhat.com/ccm-project file:tools-ng/common/xsd/project.xsd">
<ccm:databases> <ccm:databases>
<ccm:database name="postgres"/> <ccm:database name="postgres"/>
</ccm:databases> </ccm:databases>
<ccm:build> <ccm:build>
@ -95,6 +95,8 @@
<ccm:application name="ccm-sci-personalpublications"/> <ccm:application name="ccm-sci-personalpublications"/>
<ccm:application name="ccm-sci-publications"/> <ccm:application name="ccm-sci-publications"/>
<ccm:application name="ccm-sci-types-department"/>
<ccm:application name="ccm-sci-types-institute"/>
<ccm:application name="ccm-sci-types-member"/> <ccm:application name="ccm-sci-types-member"/>
<ccm:application name="ccm-sci-types-project"/> <ccm:application name="ccm-sci-types-project"/>
@ -107,11 +109,10 @@
<!-- Content Types --> <!-- Content Types -->
<!-- <!--
<ccm:application name="ccm-cms-types-agenda"/> <ccm:application name="ccm-cms-types-agenda"/>
<ccm:application name="ccm-cms-types-faqitem"/>
--> -->
<ccm:application name="ccm-cms-types-faqitem"/>
<ccm:application name="ccm-cms-types-glossaryitem"/> <ccm:application name="ccm-cms-types-glossaryitem"/>
<ccm:application name="ccm-cms-types-htmlform"/> <ccm:application name="ccm-cms-types-htmlform"/>
<!--
<ccm:application name="ccm-cms-types-inlinesite"/> <ccm:application name="ccm-cms-types-inlinesite"/>
<ccm:application name="ccm-cms-types-job"/> <ccm:application name="ccm-cms-types-job"/>
<ccm:application name="ccm-cms-types-legalnotice"/> <ccm:application name="ccm-cms-types-legalnotice"/>
@ -120,9 +121,20 @@
<ccm:application name="ccm-cms-types-pressrelease"/> <ccm:application name="ccm-cms-types-pressrelease"/>
<ccm:application name="ccm-cms-types-service"/> <ccm:application name="ccm-cms-types-service"/>
<ccm:application name="ccm-cms-types-siteproxy"/> <ccm:application name="ccm-cms-types-siteproxy"/>
<ccm:application name="ccm-cms-types-xmlfeed"/> <!-- package survey is currently broken
<ccm:application name="ccm-cms-types-survey"/>
--> -->
<ccm:application name="ccm-cms-types-xmlfeed"/>
<!-- Portlets -->
<!-- bookmarks error: no such resource: ccm-wsx-bookmarks-portlet.pdl.mf
<ccm:application name="ccm-portlet-bookmarks"/> -->
<!-- portlet collection: missing pdl file
<ccm:application name="ccm-portlet-collection"/>
portlet latestnews depends not just on types news, but rss and
several others.
<ccm:application name="ccm-portlet-latestnews"/>
-->
<!-- Applications --> <!-- Applications -->
<!-- <!--
<ccm:application name="ccm-auth-http"/> <ccm:application name="ccm-auth-http"/>
@ -146,16 +158,13 @@
--> -->
</ccm:build>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- Scientific CMS list of OBSOLETE modules --> <!-- Scientific CMS list of OBSOLETE modules -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- Content Types --> <!-- Content Types -->
<!-- Without known funcionality <!-- Without known funcionality -->
<ccm:application name="ccm-cms-types-motditem"/> --> <ccm:application name="ccm-cms-types-motditem"/>
<!-- Applications --> <!-- Applications -->
<!-- currently doesn't work for unknown reason <!-- currently doesn't work for unknown reason
@ -169,11 +178,17 @@
<!-- <ccm:application name="ccm-ldn-aplaws"/> --> <!-- <ccm:application name="ccm-ldn-aplaws"/> -->
<!-- In it's current implementation very ldn / aplaws specific <!-- In it's current implementation very ldn / aplaws specific
<ccm:application name="ccm-ldn-atoz"/> <ccm:application name="ccm-ldn-atoz"/>
<ccm:application name="ccm-ldn-dublin"/> --> <ccm:application name="ccm-ldn-dublin"/>
<ccm:application name="ccm-ldn-types-contact"/>
<ccm:application name="ccm-ldn-types-esdservice"/> -->
<!-- tools will be downloaded from trunk, but does not <!-- tools will be downloaded from trunk, but does not
contain java code to be compiled! contain java code to be compiled!
<ccm:application name="tools"/> --> <ccm:application name="tools"/> -->
</ccm:build>
</ccm:project> </ccm:project>

View File

@ -678,7 +678,8 @@ publish-to-fs-servers = "http://servlet1/", "http://servlet2/"
publish-to-fs-source = "http://servlet1/" publish-to-fs-source = "http://servlet1/"
publish-to-fs-this-server = "http://servlet1/" publish-to-fs-this-server = "http://servlet1/"
search-engine = intermedia search-engine = intermedia
template-root = /packages/content-section/templates # old: template-root = /packages/content-section/templates
template-root = /templates/ccm-cms/content-section
# Portal initialization file # Portal initialization file
portal-url = /portal/ portal-url = /portal/

View File

@ -26,7 +26,8 @@ import com.arsdigita.london.terms.ui.AbstractAssignedTerms;
/** /**
* *
* Invoked by jsp * Invoked by jsp
* (e.g. packages/content-section/templates/default/aplaws-item.jsp) * (e.g. templates/ccm-cms/content-section/default/aplaws-item.jsp
* previously: packages/content-section/templates/default/aplaws-item.jsp)
*/ */
public class AssignedItemTerms extends AbstractAssignedTerms { public class AssignedItemTerms extends AbstractAssignedTerms {

View File

@ -1,28 +1,23 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:admin="http://www.arsdigita.com/admin-ui/1.0" xmlns:admin="http://www.arsdigita.com/admin-ui/1.0"
xmlns:bebop="http://www.arsdigita.com/bebop/1.0" xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
xmlns:portal="http://www.uk.arsdigita.com/portal/1.0" xmlns:portal="http://www.uk.arsdigita.com/portal/1.0"
xmlns:portlet="http://www.uk.arsdigita.com/portlet/1.0" xmlns:portlet="http://www.uk.arsdigita.com/portlet/1.0"
exclude-result-prefixes="xsl admin bebop portal portlet" exclude-result-prefixes="xsl admin bebop portal portlet"
version="1.0"> version="1.0">
<xsl:import href="login-portlet.xsl"/>
<xsl:import href="directory-portlet.xsl"/>
<xsl:import href="content-sections-portlet.xsl"/>
<xsl:import href="time-of-day-portlet.xsl"/>
<xsl:import href="freeform-html-portlet.xsl"/>
<xsl:import href="rss-feed-portlet.xsl"/>
<xsl:import href="tasklist-portlet.xsl"/>
<xsl:import href="application-directory-portlet.xsl"/>
<xsl:import href="workspace-directory-portlet.xsl"/>
<xsl:import href="content-item-portlet.xsl"/>
<xsl:import href="login-portlet.xsl"/>
<xsl:import href="directory-portlet.xsl"/>
<xsl:import href="content-sections-portlet.xsl"/>
<xsl:import href="time-of-day-portlet.xsl"/>
<xsl:import href="freeform-html-portlet.xsl"/>
<xsl:import href="rss-feed-portlet.xsl"/>
<xsl:import href="tasklist-portlet.xsl"/>
<xsl:import href="application-directory-portlet.xsl"/>
<xsl:import href="workspace-directory-portlet.xsl"/>
<xsl:import href="content-item-portlet.xsl"/>
</xsl:stylesheet> </xsl:stylesheet>

View File

@ -1,12 +1,11 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:admin="http://www.arsdigita.com/admin-ui/1.0"
xmlns:admin="http://www.arsdigita.com/admin-ui/1.0" xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
xmlns:bebop="http://www.arsdigita.com/bebop/1.0" xmlns:portal="http://www.uk.arsdigita.com/portal/1.0"
xmlns:portal="http://www.uk.arsdigita.com/portal/1.0" xmlns:portlet="http://www.uk.arsdigita.com/portlet/1.0"
xmlns:portlet="http://www.uk.arsdigita.com/portlet/1.0" exclude-result-prefixes="xsl admin bebop portal portlet"
exclude-result-prefixes="xsl admin bebop portal portlet" version="1.0">
version="1.0">
<xsl:template match="portlet:timeOfDay"> <xsl:template match="portlet:timeOfDay">
<xsl:value-of select="@date"/> <xsl:value-of select="@date"/>

View File

@ -60,7 +60,8 @@ public class CollectedVolumeInitializer extends ContentTypeInitializer {
*/ */
@Override @Override
public String[] getStylesheets() { public String[] getStylesheets() {
return new String[]{"INTERNAL_THEME_TYPES_DIR + sci/CollectedVolume.xsl"}; return new String[]{
INTERNAL_THEME_TYPES_DIR + "sci/CollectedVolume.xsl"};
} }
/** /**

View File

@ -20,12 +20,21 @@
package com.arsdigita.cms.contenttypes; package com.arsdigita.cms.contenttypes;
/** /**
* Executes at each system startup and initializes the Journal content type,
* part of the ScientificCMS extension.
*
* Defines the content type specific properties and just uses the super class
* methods to register the content type with the (transient) content type store
* (map). This is done by runtimeRuntime startup method which runs the init()
* methods of all initializers (this one just using the parent implementation).
* *
* @author Jens Pelzetter * @author Jens Pelzetter
*/ */
public class JournalInitializer extends ContentTypeInitializer { public class JournalInitializer extends ContentTypeInitializer {
/** /**
* Constructor, sets the PDL manifest file and object type string.
*
* The pdl.mf file used here is empty, since the * The pdl.mf file used here is empty, since the
* {@link PublicationInitializer} loads all things using the pdl.mf file * {@link PublicationInitializer} loads all things using the pdl.mf file
* of the module. Also, it may causes on silly errors in the load-bundle * of the module. Also, it may causes on silly errors in the load-bundle
@ -35,14 +44,32 @@ public class JournalInitializer extends ContentTypeInitializer {
super("empty.pdl.mf", Journal.BASE_DATA_OBJECT_TYPE); super("empty.pdl.mf", Journal.BASE_DATA_OBJECT_TYPE);
} }
/**
* Retrieve location of this content type's internal default theme
* stylesheet(s) which concomitantly serve as a fallback if a custom theme
* is engaged.
*
* Custom themes usually will provide their own stylesheet(s) and their own
* access method, but may not support every content type.
*
* Overwrites parent method with AgendaItem specific value for use by the
* parent class worker methods.
*
* @return String array of XSL stylesheet files of the internal default theme
*/
@Override @Override
public String[] getStylesheets() { public String[] getStylesheets() {
return new String[]{ return new String[]{
"/static/content-types/com/arsdigita/cms/contenttypes/Journal.xsl"}; INTERNAL_THEME_TYPES_DIR + "sci/Journal.xsl"};
} }
/**
* Retrieves fully qualified traversal adapter file name.
* @return
*/
@Override @Override
public String getTraversalXML() { public String getTraversalXML() {
return "/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/Journal.xml"; return
"/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/Journal.xml";
} }
} }

View File

@ -20,12 +20,21 @@
package com.arsdigita.cms.contenttypes; package com.arsdigita.cms.contenttypes;
/** /**
* Executes at each system startup and initializes the Monograph content type,
* part of the ScientificCMS extension.
*
* Defines the content type specific properties and just uses the super class
* methods to register the content type with the (transient) content type store
* (map). This is done by runtimeRuntime startup method which runs the init()
* methods of all initializers (this one just using the parent implementation).
* *
* @author Jens Pelzetter * @author Jens Pelzetter
*/ */
public class MonographInitializer extends ContentTypeInitializer { public class MonographInitializer extends ContentTypeInitializer {
/** /**
* Constructor, sets the PDL manifest file and object type string.
*
* The pdl.mf file used here is empty, since the * The pdl.mf file used here is empty, since the
* {@link PublicationInitializer} loads all things using the pdl.mf file * {@link PublicationInitializer} loads all things using the pdl.mf file
* of the module. Also, it may causes on silly errors in the load-bundle * of the module. Also, it may causes on silly errors in the load-bundle
@ -35,14 +44,32 @@ public class MonographInitializer extends ContentTypeInitializer {
super("empty.pdl.mf", Monograph.BASE_DATA_OBJECT_TYPE); super("empty.pdl.mf", Monograph.BASE_DATA_OBJECT_TYPE);
} }
/**
* Retrieve location of this content type's internal default theme
* stylesheet(s) which concomitantly serve as a fallback if a custom theme
* is engaged.
*
* Custom themes usually will provide their own stylesheet(s) and their own
* access method, but may not support every content type.
*
* Overwrites parent method with AgendaItem specific value for use by the
* parent class worker methods.
*
* @return String array of XSL stylesheet files of the internal default theme
*/
@Override @Override
public String[] getStylesheets() { public String[] getStylesheets() {
return new String[]{"/static/content-types/com/arsdigita/cms/contenttypes/Monograph.xsl"}; return new String[]{ INTERNAL_THEME_TYPES_DIR + "sci/Monograph.xsl" };
} }
/**
* Retrieves fully qualified traversal adapter file name.
* @return
*/
@Override @Override
public String getTraversalXML() { public String getTraversalXML() {
return "/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/PublicationWithPublisher.xml"; return
"/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/PublicationWithPublisher.xml";
} }
} }

View File

@ -20,30 +20,56 @@
package com.arsdigita.cms.contenttypes; package com.arsdigita.cms.contenttypes;
/** /**
* Executes at each system startup and initializes the Proceedings content type,
* part of the ScientificCMS extension.
*
* Defines the content type specific properties and just uses the super class
* methods to register the content type with the (transient) content type store
* (map). This is done by runtimeRuntime startup method which runs the init()
* methods of all initializers (this one just using the parent implementation).
* *
* @author Jens Pelzetter * @author Jens Pelzetter
*/ */
public class ProceedingsInitializer extends ContentTypeInitializer { public class ProceedingsInitializer extends ContentTypeInitializer {
/** /**
* Constructor, sets the PDL manifest file and object type string.
*
* The pdl.mf file used here is empty, since the * The pdl.mf file used here is empty, since the
* {@link PublicationInitializer} loads all things using the pdl.mf file * {@link PublicationInitializer} loads all things using the pdl.mf file
* of the module. Also, it may causes on silly errors in the load-bundle * of the module. Also, it may causes on silly errors in the load-bundle
* step if the same pdl.mf file is used in more than one initializer. * step if the same pdl.mf file is used in more than one initializer.
*/ */
public ProceedingsInitializer() { public ProceedingsInitializer() {
super("empty.pdl.mf", Proceedings.BASE_DATA_OBJECT_TYPE); super("empty.pdl.mf", Proceedings.BASE_DATA_OBJECT_TYPE);
} }
/**
* Retrieve location of this content type's internal default theme
* stylesheet(s) which concomitantly serve as a fallback if a custom theme
* is engaged.
*
* Custom themes usually will provide their own stylesheet(s) and their own
* access method, but may not support every content type.
*
* Overwrites parent method with AgendaItem specific value for use by the
* parent class worker methods.
*
* @return String array of XSL stylesheet files of the internal default theme
*/
@Override @Override
public String[] getStylesheets() { public String[] getStylesheets() {
return new String[] {"/static/content-types/com/arsdigita/cms/contenttypes/Proceedings.xsl"}; return new String[] { INTERNAL_THEME_TYPES_DIR + "sci/Proceedings.xsl"};
} }
/**
* Retrieves fully qualified traversal adapter file name.
* @return
*/
@Override @Override
public String getTraversalXML() { public String getTraversalXML() {
return "/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/Proceedings.xml"; return
"/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/Proceedings.xml";
} }
} }

View File

@ -44,10 +44,18 @@ public class PublicationInitializer extends ContentTypeInitializer {
/** Private Logger instance for debugging purpose. */ /** Private Logger instance for debugging purpose. */
private final Logger logger = Logger.getLogger(PublicationInitializer.class); private final Logger logger = Logger.getLogger(PublicationInitializer.class);
/**
* Constructor, sets the PDL manifest file and object type string.
*/
public PublicationInitializer() { public PublicationInitializer() {
super("ccm-sci-publications.pdl.mf", Publication.BASE_DATA_OBJECT_TYPE); super("ccm-sci-publications.pdl.mf", Publication.BASE_DATA_OBJECT_TYPE);
} }
/**
* Initializes the domain coupling machinery
*
* @param event
*/
@Override @Override
public void init(final DomainInitEvent event) { public void init(final DomainInitEvent event) {
super.init(event); super.init(event);

View File

@ -20,12 +20,21 @@
package com.arsdigita.cms.contenttypes; package com.arsdigita.cms.contenttypes;
/** /**
* Executes at each system startup and initializes the PublicationWithPublisher
* content type, part of the ScientificCMS extension.
*
* Defines the content type specific properties and just uses the super class
* methods to register the content type with the (transient) content type store
* (map). This is done by runtimeRuntime startup method which runs the init()
* methods of all initializers (this one just using the parent implementation).
* *
* @author Jens Pelzetter * @author Jens Pelzetter
*/ */
public class PublicationWithPublisherInitializer extends ContentTypeInitializer { public class PublicationWithPublisherInitializer extends ContentTypeInitializer {
/** /**
* Constructor, sets the PDL manifest file and object type string.
*
* The pdl.mf file used here is empty, since the * The pdl.mf file used here is empty, since the
* {@link PublicationInitializer} loads all things using the pdl.mf file * {@link PublicationInitializer} loads all things using the pdl.mf file
* of the module. Also, it may causes on silly errors in the load-bundle * of the module. Also, it may causes on silly errors in the load-bundle
@ -35,14 +44,33 @@ public class PublicationWithPublisherInitializer extends ContentTypeInitializer
super("empty.pdl.mf", PublicationWithPublisher.BASE_DATA_OBJECT_TYPE); super("empty.pdl.mf", PublicationWithPublisher.BASE_DATA_OBJECT_TYPE);
} }
/**
* Retrieve location of this content type's internal default theme
* stylesheet(s) which concomitantly serve as a fallback if a custom theme
* is engaged.
*
* Custom themes usually will provide their own stylesheet(s) and their own
* access method, but may not support every content type.
*
* Overwrites parent method with AgendaItem specific value for use by the
* parent class worker methods.
*
* @return String array of XSL stylesheet files of the internal default theme
*/
@Override @Override
public String[] getStylesheets() { public String[] getStylesheets() {
return new String[]{"/static/content-types/com/arsdigita/cms/contenttypes/PublicationWithPublisher.xsl"}; return new String[]{
INTERNAL_THEME_TYPES_DIR + "sci/PublicationWithPublisher.xsl"};
} }
/**
* Retrieves fully qualified traversal adapter file name.
* @return
*/
@Override @Override
public String getTraversalXML() { public String getTraversalXML() {
return "/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/PublicationWithPublisher.xml"; return
"/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/PublicationWithPublisher.xml";
} }
} }

View File

@ -20,12 +20,21 @@
package com.arsdigita.cms.contenttypes; package com.arsdigita.cms.contenttypes;
/** /**
* Executes at each system startup and initializes the Publisher content type,
* part of the ScientificCMS extension.
*
* Defines the content type specific properties and just uses the super class
* methods to register the content type with the (transient) content type store
* (map). This is done by runtimeRuntime startup method which runs the init()
* methods of all initializers (this one just using the parent implementation).
* *
* @author Jens Pelzetter * @author Jens Pelzetter
*/ */
public class PublisherInitializer extends ContentTypeInitializer { public class PublisherInitializer extends ContentTypeInitializer {
/** /**
* Constructor, sets the PDL manifest file and object type string.
*
* The pdl.mf file used here is empty, since the * The pdl.mf file used here is empty, since the
* {@link PublicationInitializer} loads all things using the pdl.mf file * {@link PublicationInitializer} loads all things using the pdl.mf file
* of the module. Also, it may causes on silly errors in the load-bundle * of the module. Also, it may causes on silly errors in the load-bundle
@ -35,11 +44,29 @@ public class PublisherInitializer extends ContentTypeInitializer {
super("empty.pdl.mf", Publisher.BASE_DATA_OBJECT_TYPE); super("empty.pdl.mf", Publisher.BASE_DATA_OBJECT_TYPE);
} }
/**
* Retrieve location of this content type's internal default theme
* stylesheet(s) which concomitantly serve as a fallback if a custom theme
* is engaged.
*
* Custom themes usually will provide their own stylesheet(s) and their own
* access method, but may not support every content type.
*
* Overwrites parent method with AgendaItem specific value for use by the
* parent class worker methods.
*
* @return String array of XSL stylesheet files of the internal default theme
*/
@Override @Override
public String[] getStylesheets() { public String[] getStylesheets() {
return new String[]{"/static/content-types/com/arsdigita/cms/contenttypes/Publisher.xsl"}; return new String[]{
INTERNAL_THEME_TYPES_DIR + "sci/Publisher.xsl" };
} }
/**
* Retrieves fully qualified traversal adapter file name.
* @return
*/
@Override @Override
public String getTraversalXML() { public String getTraversalXML() {
//return "/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/Publisher.xml"; //return "/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/Publisher.xml";

View File

@ -20,12 +20,21 @@
package com.arsdigita.cms.contenttypes; package com.arsdigita.cms.contenttypes;
/** /**
* Executes at each system startup and initializes the Review content type,
* part of the ScientificCMS extension.
*
* Defines the content type specific properties and just uses the super class
* methods to register the content type with the (transient) content type store
* (map). This is done by runtimeRuntime startup method which runs the init()
* methods of all initializers (this one just using the parent implementation).
* *
* @author Jens Pelzetter * @author Jens Pelzetter
*/ */
public class ReviewInitializer extends ContentTypeInitializer { public class ReviewInitializer extends ContentTypeInitializer {
/** /**
* Constructor, sets the PDL manifest file and object type string.
*
* The pdl.mf file used here is empty, since the * The pdl.mf file used here is empty, since the
* {@link PublicationInitializer} loads all things using the pdl.mf file * {@link PublicationInitializer} loads all things using the pdl.mf file
* of the module. Also, it may causes on silly errors in the load-bundle * of the module. Also, it may causes on silly errors in the load-bundle
@ -35,14 +44,32 @@ public class ReviewInitializer extends ContentTypeInitializer {
super("empty.pdl.mf", Review.BASE_DATA_OBJECT_TYPE); super("empty.pdl.mf", Review.BASE_DATA_OBJECT_TYPE);
} }
/**
* Retrieve location of this content type's internal default theme
* stylesheet(s) which concomitantly serve as a fallback if a custom theme
* is engaged.
*
* Custom themes usually will provide their own stylesheet(s) and their own
* access method, but may not support every content type.
*
* Overwrites parent method with AgendaItem specific value for use by the
* parent class worker methods.
*
* @return String array of XSL stylesheet files of the internal default theme
*/
@Override @Override
public String[] getStylesheets() { public String[] getStylesheets() {
return new String[]{"/static/content-types/com/arsdigita/cms/contenttypes/Review.xsl"}; return new String[]{ INTERNAL_THEME_TYPES_DIR + "sci/Review.xsl" };
} }
/**
* Retrieves fully qualified traversal adapter file name.
* @return
*/
@Override @Override
public String getTraversalXML() { public String getTraversalXML() {
return "/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/Publication.xml"; return
"/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/Publication.xml";
} }
} }

View File

@ -21,26 +21,53 @@
package com.arsdigita.cms.contenttypes; package com.arsdigita.cms.contenttypes;
/** /**
* Initializer for {@link SciAuthor} * Executes at each system startup and initializes the SciAuthor content type,
* part of the ScientificCMS extension.
*
* Defines the content type specific properties and just uses the super class
* methods to register the content type with the (transient) content type store
* (map). This is done by runtimeRuntime startup method which runs the init()
* methods of all initializers (this one just using the parent implementation).
* *
* @author Jens Pelzetter * @author Jens Pelzetter
*/ */
public class SciAuthorInitializer extends ContentTypeInitializer { public class SciAuthorInitializer extends ContentTypeInitializer {
/**
* Constructor, sets the PDL manifest file and object type string.
*/
public SciAuthorInitializer() { public SciAuthorInitializer() {
super("empty.pdl.mf", SciAuthor.BASE_DATA_OBJECT_TYPE); super("empty.pdl.mf", SciAuthor.BASE_DATA_OBJECT_TYPE);
} }
/**
* Retrieve location of this content type's internal default theme
* stylesheet(s) which concomitantly serve as a fallback if a custom theme
* is engaged.
*
* Custom themes usually will provide their own stylesheet(s) and their own
* access method, but may not support every content type.
*
* Overwrites parent method with AgendaItem specific value for use by the
* parent class worker methods.
*
* @return String array of XSL stylesheet files of the internal default theme
*/
@Override @Override
public String[] getStylesheets() { public String[] getStylesheets() {
return new String[] { return new String[] {
"/static/content-types/com/arsdigita/cms/contenttypes/SciAuthor.xsl" INTERNAL_THEME_TYPES_DIR + "sci/SciAuthor.xsl"
}; };
} }
/**
* Retrieves fully qualified traversal adapter file name.
* @return
*/
@Override @Override
public String getTraversalXML() { public String getTraversalXML() {
return "/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/SciAuthor.xml"; return
"/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/SciAuthor.xml";
} }
} }

View File

@ -17,15 +17,27 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* *
*/ */
package com.arsdigita.cms.contenttypes; package com.arsdigita.cms.contenttypes;
/** /**
* Executes at each system startup and initializes the Series content type,
* part of the ScientificCMS extension.
*
* Defines the content type specific properties and just uses the super class
* methods to register the content type with the (transient) content type store
* (map). This is done by runtimeRuntime startup method which runs the init()
* methods of all initializers (this one just using the parent implementation).
* *
* @author Jens Pelzetter * @author Jens Pelzetter
*/ */
public class SeriesInitializer extends ContentTypeInitializer { public class SeriesInitializer extends ContentTypeInitializer {
/** /**
* Constructor, sets the PDL manifest file and object type string.
*
* The pdl.mf file used here is empty, since the * The pdl.mf file used here is empty, since the
* {@link PublicationInitializer} loads all things using the pdl.mf file * {@link PublicationInitializer} loads all things using the pdl.mf file
* of the module. Also, it may causes on silly errors in the load-bundle * of the module. Also, it may causes on silly errors in the load-bundle
@ -35,11 +47,28 @@ public class SeriesInitializer extends ContentTypeInitializer {
super("empty.pdl.mf", Series.BASE_DATA_OBJECT_TYPE); super("empty.pdl.mf", Series.BASE_DATA_OBJECT_TYPE);
} }
/**
* Retrieve location of this content type's internal default theme
* stylesheet(s) which concomitantly serve as a fallback if a custom theme
* is engaged.
*
* Custom themes usually will provide their own stylesheet(s) and their own
* access method, but may not support every content type.
*
* Overwrites parent method with AgendaItem specific value for use by the
* parent class worker methods.
*
* @return String array of XSL stylesheet files of the internal default theme
*/
@Override @Override
public String[] getStylesheets() { public String[] getStylesheets() {
return new String[]{"/static/content-types/com/arsdigita/cms/contenttypes/Series.xsl"}; return new String[]{INTERNAL_THEME_TYPES_DIR + "sci/Series.xsl"};
} }
/**
* Retrieves fully qualified traversal adapter file name.
* @return
*/
@Override @Override
public String getTraversalXML() { public String getTraversalXML() {
return "/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/Series.xml"; return "/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/Series.xml";

View File

@ -17,15 +17,25 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* *
*/ */
package com.arsdigita.cms.contenttypes; package com.arsdigita.cms.contenttypes;
/** /**
* Executes at each system startup and initializes the UnPublished content type,
* part of the ScientificCMS extension.
*
* Defines the content type specific properties and just uses the super class
* methods to register the content type with the (transient) content type store
* (map). This is done by runtimeRuntime startup method which runs the init()
* methods of all initializers (this one just using the parent implementation).
* *
* @author Jens Pelzetter * @author Jens Pelzetter
*/ */
public class UnPublishedInitializer extends ContentTypeInitializer { public class UnPublishedInitializer extends ContentTypeInitializer {
/** /**
* Constructor, sets the PDL manifest file and object type string.
*
* The pdl.mf file used here is empty, since the * The pdl.mf file used here is empty, since the
* {@link PublicationInitializer} loads all things using the pdl.mf file * {@link PublicationInitializer} loads all things using the pdl.mf file
* of the module. Also, it may causes on silly errors in the load-bundle * of the module. Also, it may causes on silly errors in the load-bundle
@ -35,11 +45,28 @@ public class UnPublishedInitializer extends ContentTypeInitializer {
super("empty.pdl.mf", UnPublished.BASE_DATA_OBJECT_TYPE); super("empty.pdl.mf", UnPublished.BASE_DATA_OBJECT_TYPE);
} }
/**
* Retrieve location of this content type's internal default theme
* stylesheet(s) which concomitantly serve as a fallback if a custom theme
* is engaged.
*
* Custom themes usually will provide their own stylesheet(s) and their own
* access method, but may not support every content type.
*
* Overwrites parent method with AgendaItem specific value for use by the
* parent class worker methods.
*
* @return String array of XSL stylesheet files of the internal default theme
*/
@Override @Override
public String[] getStylesheets() { public String[] getStylesheets() {
return new String[]{"/static/content-types/com/arsdigita/cms/contenttypes/UnPublished.xsl"}; return new String[]{ INTERNAL_THEME_TYPES_DIR + "sci/UnPublished.xsl" };
} }
/**
* Retrieves fully qualified traversal adapter file name.
* @return
*/
@Override @Override
public String getTraversalXML() { public String getTraversalXML() {
return "/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/Publication.xml"; return "/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/Publication.xml";

View File

@ -20,12 +20,21 @@
package com.arsdigita.cms.contenttypes; package com.arsdigita.cms.contenttypes;
/** /**
* Executes at each system startup and initializes the WorkingPaper content type,
* part of the ScientificCMS extension.
*
* Defines the content type specific properties and just uses the super class
* methods to register the content type with the (transient) content type store
* (map). This is done by runtimeRuntime startup method which runs the init()
* methods of all initializers (this one just using the parent implementation).
* *
* @author Jens Pelzetter * @author Jens Pelzetter
*/ */
public class WorkingPaperInitializer extends ContentTypeInitializer { public class WorkingPaperInitializer extends ContentTypeInitializer {
/** /**
* Constructor, sets the PDL manifest file and object type string.
*
* The pdl.mf file used here is empty, since the * The pdl.mf file used here is empty, since the
* {@link PublicationInitializer} loads all things using the pdl.mf file * {@link PublicationInitializer} loads all things using the pdl.mf file
* of the module. Also, it may causes on silly errors in the load-bundle * of the module. Also, it may causes on silly errors in the load-bundle
@ -35,14 +44,32 @@ public class WorkingPaperInitializer extends ContentTypeInitializer {
super("empty.pdl.mf", WorkingPaper.BASE_DATA_OBJECT_TYPE); super("empty.pdl.mf", WorkingPaper.BASE_DATA_OBJECT_TYPE);
} }
/**
* Retrieve location of this content type's internal default theme
* stylesheet(s) which concomitantly serve as a fallback if a custom theme
* is engaged.
*
* Custom themes usually will provide their own stylesheet(s) and their own
* access method, but may not support every content type.
*
* Overwrites parent method with AgendaItem specific value for use by the
* parent class worker methods.
*
* @return String array of XSL stylesheet files of the internal default theme
*/
@Override @Override
public String[] getStylesheets() { public String[] getStylesheets() {
return new String[]{"/static/content-types/com/arsdigita/cms/contenttypes/WorkingPaper.xsl"}; return new String[]{ INTERNAL_THEME_TYPES_DIR + "sci/WorkingPaper.xsl" };
} }
/**
* Retrieves fully qualified traversal adapter file name.
* @return
*/
@Override @Override
public String getTraversalXML() { public String getTraversalXML() {
return "/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/WorkingPaper.xml"; return
"/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/WorkingPaper.xml";
} }
} }

View File

@ -1,3 +1,23 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
package com.arsdigita.cms.contenttypes; package com.arsdigita.cms.contenttypes;
import com.arsdigita.cms.ContentType; import com.arsdigita.cms.ContentType;
@ -11,17 +31,32 @@ import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
import com.arsdigita.runtime.DomainInitEvent; import com.arsdigita.runtime.DomainInitEvent;
/** /**
* Executes at each system startup and initializes the SciDepartment
* content type, part of the ScientificCMS extension.
*
* Defines the content type specific properties and just uses the super class
* methods to register the content type with the (transient) content type store
* (map). This is done by runtimeRuntime startup method which runs the init()
* methods of all initializers (this one just using the parent implementation).
* *
* @author Jens Pelzetter * @author Jens Pelzetter
* @version $Id$ * @version $Id$
*/ */
public class SciDepartmentInitializer extends ContentTypeInitializer { public class SciDepartmentInitializer extends ContentTypeInitializer {
/**
* Constructor, sets the PDL manifest file and object type string.
*/
public SciDepartmentInitializer() { public SciDepartmentInitializer() {
super("ccm-sci-types-department.pdl.mf", super("ccm-sci-types-department.pdl.mf",
SciDepartment.BASE_DATA_OBJECT_TYPE); SciDepartment.BASE_DATA_OBJECT_TYPE);
} }
/**
* Initializes the domain coupling machinery
*
* @param event
*/
@Override @Override
public void init(final DomainInitEvent event) { public void init(final DomainInitEvent event) {
super.init(event); super.init(event);
@ -81,15 +116,33 @@ public class SciDepartmentInitializer extends ContentTypeInitializer {
} }
} }
/**
* Retrieve location of this content type's internal default theme
* stylesheet(s) which concomitantly serve as a fallback if a custom theme
* is engaged.
*
* Custom themes usually will provide their own stylesheet(s) and their own
* access method, but may not support every content type.
*
* Overwrites parent method with AgendaItem specific value for use by the
* parent class worker methods.
*
* @return String array of XSL stylesheet files of the internal default theme
*/
@Override @Override
public String[] getStylesheets() { public String[] getStylesheets() {
return new String[]{ return new String[]{
"/static/content-types/com/arsdigita/cms/contenttypes/SciDepartment.xsl" INTERNAL_THEME_TYPES_DIR + "sci/SciDepartment.xsl"
}; };
} }
/**
* Retrieves fully qualified traversal adapter file name.
* @return
*/
@Override @Override
public String getTraversalXML() { public String getTraversalXML() {
return "/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/SciDepartment.xml"; return
"/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/SciDepartment.xml";
} }
} }

View File

@ -1,3 +1,23 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
package com.arsdigita.cms.contenttypes; package com.arsdigita.cms.contenttypes;
import com.arsdigita.cms.ContentType; import com.arsdigita.cms.ContentType;
@ -11,17 +31,32 @@ import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
import com.arsdigita.runtime.DomainInitEvent; import com.arsdigita.runtime.DomainInitEvent;
/** /**
* Executes at each system startup and initializes the SciInstitute
* content type, part of the ScientificCMS extension.
*
* Defines the content type specific properties and just uses the super class
* methods to register the content type with the (transient) content type store
* (map). This is done by runtimeRuntime startup method which runs the init()
* methods of all initializers (this one just using the parent implementation).
* *
* @author Jens Pelzetter * @author Jens Pelzetter
* @version $Id$ * @version $Id$
*/ */
public class SciInstituteInitializer extends ContentTypeInitializer { public class SciInstituteInitializer extends ContentTypeInitializer {
/**
* Constructor, sets the PDL manifest file and object type string.
*/
public SciInstituteInitializer() { public SciInstituteInitializer() {
super("ccm-sci-types-institute.pdl.mf", super("ccm-sci-types-institute.pdl.mf",
SciInstitute.BASE_DATA_OBJECT_TYPE); SciInstitute.BASE_DATA_OBJECT_TYPE);
} }
/**
* Initializes the domain coupling machinery
*
* @param event
*/
@Override @Override
public void init(final DomainInitEvent event) { public void init(final DomainInitEvent event) {
super.init(event); super.init(event);
@ -91,15 +126,33 @@ public class SciInstituteInitializer extends ContentTypeInitializer {
} }
} }
/**
* Retrieve location of this content type's internal default theme
* stylesheet(s) which concomitantly serve as a fallback if a custom theme
* is engaged.
*
* Custom themes usually will provide their own stylesheet(s) and their own
* access method, but may not support every content type.
*
* Overwrites parent method with AgendaItem specific value for use by the
* parent class worker methods.
*
* @return String array of XSL stylesheet files of the internal default theme
*/
@Override @Override
public String[] getStylesheets() { public String[] getStylesheets() {
return new String[]{ return new String[]{
"/static/content-types/com/arsdigita/cms/contenttypes/SciInstitute.xsl" INTERNAL_THEME_TYPES_DIR + "sci/SciInstitute.xsl"
}; };
} }
/**
* Retrieves fully qualified traversal adapter file name.
* @return
*/
@Override @Override
public String getTraversalXML() { public String getTraversalXML() {
return "/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/SciInstitute.xml"; return
"/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/SciInstitute.xml";
} }
} }

Some files were not shown because too many files have changed in this diff Show More