Author: mbooth Date: 2005-02-21 22:00:12 +0100 (Mon, 21 Feb 2005) New Revision: 282 Added: ccm-cms-types-htmlform/ ccm-cms-types-htmlform/trunk/ ccm-cms-types-htmlform/trunk/application.xml ccm-cms-types-htmlform/trunk/pdl/ ccm-cms-types-htmlform/trunk/pdl/com/ ccm-cms-types-htmlform/trunk/pdl/com/arsdigita/ ccm-cms-types-htmlform/trunk/pdl/com/arsdigita/cms/ ccm-cms-types-htmlform/trunk/pdl/com/arsdigita/cms/contenttypes/ ccm-cms-types-htmlform/trunk/pdl/com/arsdigita/cms/contenttypes/HTMLForm.pdl ccm-cms-types-htmlform/trunk/src/ ccm-cms-types-htmlform/trunk/src/WEB-INF/ ccm-cms-types-htmlform/trunk/src/WEB-INF/content-types/ ccm-cms-types-htmlform/trunk/src/WEB-INF/content-types/com/ ccm-cms-types-htmlform/trunk/src/WEB-INF/content-types/com/arsdigita/ ccm-cms-types-htmlform/trunk/src/WEB-INF/content-types/com/arsdigita/cms/ ccm-cms-types-htmlform/trunk/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/ ccm-cms-types-htmlform/trunk/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/HTMLForm.xml ccm-cms-types-htmlform/trunk/src/ccm-cms-types-htmlform.config ccm-cms-types-htmlform/trunk/src/ccm-cms-types-htmlform.load ccm-cms-types-htmlform/trunk/src/com/ ccm-cms-types-htmlform/trunk/src/com/arsdigita/ ccm-cms-types-htmlform/trunk/src/com/arsdigita/cms/ ccm-cms-types-htmlform/trunk/src/com/arsdigita/cms/contenttypes/ ccm-cms-types-htmlform/trunk/src/com/arsdigita/cms/contenttypes/HTMLForm.java ccm-cms-types-htmlform/trunk/src/com/arsdigita/cms/contenttypes/HTMLFormInitializer.java ccm-cms-types-htmlform/trunk/src/com/arsdigita/cms/contenttypes/HTMLFormLoader.java ccm-cms-types-htmlform/trunk/web/ ccm-cms-types-htmlform/trunk/web/static/ ccm-cms-types-htmlform/trunk/web/static/content-types/ ccm-cms-types-htmlform/trunk/web/static/content-types/com/ ccm-cms-types-htmlform/trunk/web/static/content-types/com/arsdigita/ ccm-cms-types-htmlform/trunk/web/static/content-types/com/arsdigita/cms/ ccm-cms-types-htmlform/trunk/web/static/content-types/com/arsdigita/cms/contenttypes/ ccm-cms-types-htmlform/trunk/web/static/content-types/com/arsdigita/cms/contenttypes/HTMLForm.xsl Log: Initial import from p4 @42055 Added: ccm-cms-types-htmlform/trunk/application.xml =================================================================== --- ccm-cms-types-htmlform/trunk/application.xml 2005-02-21 17:43:32 UTC (rev 281) +++ ccm-cms-types-htmlform/trunk/application.xml 2005-02-21 21:00:12 UTC (rev 282) @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> + +<ccm:application name="ccm-cms-types-htmlform" + prettyName="Red Hat CCM Content Types" + version="6.1.0" + release="3" + webapp="ROOT" + xmlns:ccm="http://ccm.redhat.com/ccm-project"> + + <ccm:dependencies> + <ccm:requires name="ccm-core" version="6.1.0"/> + <ccm:requires name="ccm-cms" version="6.1.0"/> + <ccm:requires name="ccm-cms-types-article" version="6.1.0"/> + </ccm:dependencies> + + <ccm:directories> + <ccm:directory name="pdl"/> + <ccm:directory name="src"/> + </ccm:directories> + + <ccm:contacts> + <ccm:contact uri="http://www.redhat.com/software/ccm" type="website"/> + <ccm:contact uri="mailto:cc...@re..." type="support"/> + </ccm:contacts> + + <ccm:description> + The HTML For Content Type for the Red Hat CCM CMS. + </ccm:description> +</ccm:application> Added: ccm-cms-types-htmlform/trunk/pdl/com/arsdigita/cms/contenttypes/HTMLForm.pdl =================================================================== --- ccm-cms-types-htmlform/trunk/pdl/com/arsdigita/cms/contenttypes/HTMLForm.pdl 2005-02-21 17:43:32 UTC (rev 281) +++ ccm-cms-types-htmlform/trunk/pdl/com/arsdigita/cms/contenttypes/HTMLForm.pdl 2005-02-21 21:00:12 UTC (rev 282) @@ -0,0 +1,21 @@ +// +// Copyright (C) 2001, 2002, 2003 Red Hat Inc. All Rights Reserved. +// +// The contents of this file are subject to the CCM Public +// License (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of +// the License at http://www.redhat.com/licenses/ccmpl.html +// +// Software distributed under the License is distributed on an "AS +// IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +// implied. See the License for the specific language governing +// rights and limitations under the License. +// +// $Id: //ps/apps/london/htmlform/dev/pdl/com/arsdigita/cms/contenttypes/HTMLForm.pdl#1 $ +// $DateTime: 2004/03/05 09:47:41 $ + +model com.arsdigita.cms.contenttypes; + + +object type HTMLForm extends Article { +} Property changes on: ccm-cms-types-htmlform/trunk/pdl/com/arsdigita/cms/contenttypes/HTMLForm.pdl ___________________________________________________________________ Name: svn:keywords + "Id Author DateTime" Added: ccm-cms-types-htmlform/trunk/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/HTMLForm.xml =================================================================== --- ccm-cms-types-htmlform/trunk/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/HTMLForm.xml 2005-02-21 17:43:32 UTC (rev 281) +++ ccm-cms-types-htmlform/trunk/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/HTMLForm.xml 2005-02-21 21:00:12 UTC (rev 282) @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8"?> +<ctd:content-types xmlns:ctd="http://xmlns.redhat.com/cms/content-types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.redhat.com/cms/content-types content-types.xsd"> + <ctd:content-type label="HTML Form" description="An HTML Form" objectType="com.arsdigita.cms.contenttypes.HTMLForm" classname="com.arsdigita.cms.contenttypes.HTMLForm"> + <ctd:authoring-kit createComponent="com.arsdigita.cms.ui.authoring.PageCreate"> + <ctd:authoring-step + labelKey="cms.contenttypes.shared.basic_properties.title" + labelBundle="com.arsdigita.cms.ui.CMSResources" + descriptionKey="cms.contenttypes.shared.basic_properties.description" + descriptionBundle="com.arsdigita.cms.ui.CMSResources" + component="com.arsdigita.cms.contenttypes.ui.ArticlePropertiesStep"/> + + <ctd:include href="/WEB-INF/content-types/edit-body-text-step.xml"/> + + <ctd:include href="/WEB-INF/content-types/assign-categories-step.xml"/> + </ctd:authoring-kit> + </ctd:content-type> +</ctd:content-types> Added: ccm-cms-types-htmlform/trunk/src/ccm-cms-types-htmlform.config =================================================================== --- ccm-cms-types-htmlform/trunk/src/ccm-cms-types-htmlform.config 2005-02-21 17:43:32 UTC (rev 281) +++ ccm-cms-types-htmlform/trunk/src/ccm-cms-types-htmlform.config 2005-02-21 21:00:12 UTC (rev 282) @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<registry> + <!-- nothing yet --> +</registry> Added: ccm-cms-types-htmlform/trunk/src/ccm-cms-types-htmlform.load =================================================================== --- ccm-cms-types-htmlform/trunk/src/ccm-cms-types-htmlform.load 2005-02-21 17:43:32 UTC (rev 281) +++ ccm-cms-types-htmlform/trunk/src/ccm-cms-types-htmlform.load 2005-02-21 21:00:12 UTC (rev 282) @@ -0,0 +1,16 @@ +<load> + <requires> + <table name="inits"/> + <table name="acs_objects"/> + <table name="cms_items"/> + <initializer class="com.arsdigita.cms.Initializer"/> + <table name="ct_articles"/> + <initializer class="com.arsdigita.cms.contenttypes.ArticleInitializer"/> + </requires> + <provides> + <initializer class="com.arsdigita.cms.contenttypes.HTMLFormInitializer"/> + </provides> + <scripts> + <data class="com.arsdigita.cms.contenttypes.HTMLFormLoader"/> + </scripts> +</load> Added: ccm-cms-types-htmlform/trunk/src/com/arsdigita/cms/contenttypes/HTMLForm.java =================================================================== --- ccm-cms-types-htmlform/trunk/src/com/arsdigita/cms/contenttypes/HTMLForm.java 2005-02-21 17:43:32 UTC (rev 281) +++ ccm-cms-types-htmlform/trunk/src/com/arsdigita/cms/contenttypes/HTMLForm.java 2005-02-21 21:00:12 UTC (rev 282) @@ -0,0 +1,72 @@ +/* + * Copyright (C) 2001, 2002, 2003 Red Hat Inc. All Rights Reserved. + * + * The contents of this file are subject to the CCM Public + * License (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of + * the License at http://www.redhat.com/licenses/ccmpl.html + * + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + * implied. See the License for the specific language governing + * rights and limitations under the License. + * + */ + +package com.arsdigita.cms.contenttypes; + +import com.arsdigita.domain.DataObjectNotFoundException; +import com.arsdigita.persistence.DataObject; +import com.arsdigita.persistence.OID; +import com.arsdigita.cms.ContentType; +import com.arsdigita.util.UncheckedWrapperException; +import com.arsdigita.util.Assert; + +import java.math.BigDecimal; + +/** + * This content type represents an article. + * + * @version $Revision: #1 $ $Date: 2004/03/05 $ + */ +public class HTMLForm extends Article { + + private final static org.apache.log4j.Logger s_log = + org.apache.log4j.Logger.getLogger(HTMLForm.class); + + /** Data object type for this domain object */ + public static final String BASE_DATA_OBJECT_TYPE + = "com.arsdigita.cms.contenttypes.HTMLForm"; + + /** Data object type for this domain object (for CMS compatibility) */ + public static final String TYPE + = BASE_DATA_OBJECT_TYPE; + + public HTMLForm() { + this( BASE_DATA_OBJECT_TYPE ); + } + + public HTMLForm( BigDecimal id ) + throws DataObjectNotFoundException { + this( new OID( BASE_DATA_OBJECT_TYPE, id ) ); + } + + public HTMLForm( OID id ) + throws DataObjectNotFoundException { + super( id ); + } + + public HTMLForm( DataObject obj ) { + super( obj ); + } + + public HTMLForm( String type ) { + super( type ); + } + + public void beforeSave() { + super.beforeSave(); + + Assert.exists(getContentType(), ContentType.class); + } +} Property changes on: ccm-cms-types-htmlform/trunk/src/com/arsdigita/cms/contenttypes/HTMLForm.java ___________________________________________________________________ Name: svn:keywords + "Id Author DateTime" Added: ccm-cms-types-htmlform/trunk/src/com/arsdigita/cms/contenttypes/HTMLFormInitializer.java =================================================================== --- ccm-cms-types-htmlform/trunk/src/com/arsdigita/cms/contenttypes/HTMLFormInitializer.java 2005-02-21 17:43:32 UTC (rev 281) +++ ccm-cms-types-htmlform/trunk/src/com/arsdigita/cms/contenttypes/HTMLFormInitializer.java 2005-02-21 21:00:12 UTC (rev 282) @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2001, 2002, 2003 Red Hat Inc. All Rights Reserved. + * + * The contents of this file are subject to the CCM Public + * License (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of + * the License at http://www.redhat.com/licenses/ccmpl.html + * + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + * implied. See the License for the specific language governing + * rights and limitations under the License. + * + */ + +package com.arsdigita.cms.contenttypes; + + +/** + * The CMS initializer. + * + * @author Justin Ross <jr...@re...> + * @version $Id: //ps/apps/london/htmlform/dev/src/com/arsdigita/cms/contenttypes/HTMLFormInitializer.java#2 $ + */ +public class HTMLFormInitializer extends ContentTypeInitializer { + + public HTMLFormInitializer() { + super("ccm-cms-types-htmlform.pdl.mf", HTMLForm.BASE_DATA_OBJECT_TYPE); + } + + + public String[] getStylesheets() { + return new String[] { "/static/content-types/com/arsdigita/cms/contenttypes/HTMLForm.xsl" }; + } +} Property changes on: ccm-cms-types-htmlform/trunk/src/com/arsdigita/cms/contenttypes/HTMLFormInitializer.java ___________________________________________________________________ Name: svn:keywords + "Id Author DateTime" Added: ccm-cms-types-htmlform/trunk/src/com/arsdigita/cms/contenttypes/HTMLFormLoader.java =================================================================== --- ccm-cms-types-htmlform/trunk/src/com/arsdigita/cms/contenttypes/HTMLFormLoader.java 2005-02-21 17:43:32 UTC (rev 281) +++ ccm-cms-types-htmlform/trunk/src/com/arsdigita/cms/contenttypes/HTMLFormLoader.java 2005-02-21 21:00:12 UTC (rev 282) @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2001, 2002, 2003 Red Hat Inc. All Rights Reserved. + * + * The contents of this file are subject to the CCM Public + * License (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of + * the License at http://www.redhat.com/licenses/ccmpl.html + * + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + * implied. See the License for the specific language governing + * rights and limitations under the License. + * + */ + +package com.arsdigita.cms.contenttypes; + +import com.arsdigita.cms.contenttypes.AbstractContentTypeLoader; + +/** + * Loader. + * + * @author Justin Ross <jr...@re...> + * @version $Id: //ps/apps/london/htmlform/dev/src/com/arsdigita/cms/contenttypes/HTMLFormLoader.java#1 $ + */ +public class HTMLFormLoader extends AbstractContentTypeLoader { + public final static String versionId = + "$Id: //ps/apps/london/htmlform/dev/src/com/arsdigita/cms/contenttypes/HTMLFormLoader.java#1 $" + + "$Author$" + + "$DateTime: 2004/03/05 09:47:41 $"; + + private static final String[] TYPES = { + "/WEB-INF/content-types/com/arsdigita/cms/contenttypes/HTMLForm.xml" + }; + + public String[] getTypes() { + return TYPES; + } +} Property changes on: ccm-cms-types-htmlform/trunk/src/com/arsdigita/cms/contenttypes/HTMLFormLoader.java ___________________________________________________________________ Name: svn:keywords + "Id Author DateTime" Added: ccm-cms-types-htmlform/trunk/web/static/content-types/com/arsdigita/cms/contenttypes/HTMLForm.xsl =================================================================== --- ccm-cms-types-htmlform/trunk/web/static/content-types/com/arsdigita/cms/contenttypes/HTMLForm.xsl 2005-02-21 17:43:32 UTC (rev 281) +++ ccm-cms-types-htmlform/trunk/web/static/content-types/com/arsdigita/cms/contenttypes/HTMLForm.xsl 2005-02-21 21:00:12 UTC (rev 282) @@ -0,0 +1,46 @@ +<!DOCTYPE stylesheet [ +<!ENTITY nbsp " " ><!-- no-break space = non-breaking space, U+00A0 ISOnum --> +]> + +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:cms="http://www.arsdigita.com/cms/1.0" + version="1.0"> + + <xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.HTMLForm']" mode="cms:CT_graphics" + name="cms:CT_graphics_com_arsdigita_cms_contenttypes_HTMLForm"> + <table width="435" border="0" cellspacing="0" cellpadding="0"> + <tr> + <td width="435" align="left" valign="top"> + <table width="435" border="0" cellspacing="1" cellpadding="0"> + <tr> + <td class="contentTitle" align="left" valign="top"> + <xsl:value-of select="./title"/> + </td> + </tr> + + <tr> + <td class="contentSynopsis" align="left" valign="top"> + <xsl:value-of select="./lead"/> + </td> + </tr> + + <tr> + <td class="contentText" align="left" valign="top"> + <br/><xsl:value-of disable-output-escaping="yes" select="./textAsset/content"/> + </td> + </tr> + </table> + </td> + </tr> + </table> + </xsl:template> + + <xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.HTMLForm']" mode="cms:CT_text" + name="cms:CT_text_com_arsdigita_cms_contenttypes_HTMLForm"> + <h1 class="mainTitle">HTMLForm <xsl:text disable-output-escaping="yes">&</xsl:text>gt; <xsl:value-of select="./title"/></h1> + <span class="synopsis"><xsl:value-of select="./lead" /></span><br /> + <br/> + <span class="text"><xsl:value-of disable-output-escaping="yes" select="./textAsset/content"/></span> + </xsl:template> + +</xsl:stylesheet> |