Klasse TextPage eleminieren

Traversal-Adapter angepaßt - Referenzen auf TextPage entfernt
Authorig-Step angepaßt - Refenez auf TextPageBody angepaßt
Einige Kommentare geändert

git-svn-id: https://svn.libreccm.org/ccm/trunk@673 8810af33-2d31-482b-a856-94f89814c4df
master
quasi 2011-01-08 16:35:12 +00:00
parent ba902a0081
commit 41dda78fef
7 changed files with 15 additions and 15 deletions

View File

@ -5,5 +5,5 @@
labelBundle="com.arsdigita.cms.CMSResources" labelBundle="com.arsdigita.cms.CMSResources"
descriptionKey="cms.contenttypes.shared.body_text.description" descriptionKey="cms.contenttypes.shared.body_text.description"
descriptionBundle="com.arsdigita.cms.CMSResources" descriptionBundle="com.arsdigita.cms.CMSResources"
component="com.arsdigita.cms.ui.authoring.TextPageBody"/> component="com.arsdigita.cms.ui.authoring.GenericArticleBody"/>
</ctd:authoring-kit> </ctd:authoring-kit>

View File

@ -67,7 +67,7 @@
</xrd:adapter> </xrd:adapter>
<!-- Adds a text asset --> <!-- Adds a text asset -->
<xrd:adapter objectType="com.arsdigita.cms.TextPage" extends="com.arsdigita.cms.ContentPage" traversalClass="com.arsdigita.cms.contenttypes.ContentItemTraversalAdapter"> <xrd:adapter objectType="com.arsdigita.cms.contenttypes.GenericArticle" extends="com.arsdigita.cms.ContentPage" traversalClass="com.arsdigita.cms.contenttypes.ContentItemTraversalAdapter">
<xrd:attributes rule="exclude"> <xrd:attributes rule="exclude">
<xrd:property name="/object/textAsset/id"/> <xrd:property name="/object/textAsset/id"/>
<xrd:property name="/object/textAsset/defaultDomainClass"/> <xrd:property name="/object/textAsset/defaultDomainClass"/>
@ -85,7 +85,7 @@
</xrd:adapter> </xrd:adapter>
<!-- Adds several image assets --> <!-- Adds several image assets -->
<xrd:adapter objectType="com.arsdigita.cms.contenttypes.GenericArticle" extends="com.arsdigita.cms.TextPage" traversalClass="com.arsdigita.cms.contenttypes.ContentItemTraversalAdapter"> <xrd:adapter objectType="com.arsdigita.cms.contenttypes.GenericArticle" extends="com.arsdigita.cms.contenttypes.GenericArticle" traversalClass="com.arsdigita.cms.contenttypes.ContentItemTraversalAdapter">
<xrd:attributes rule="exclude"> <xrd:attributes rule="exclude">
<xrd:property name="/object/imageCaptions/id"/> <xrd:property name="/object/imageCaptions/id"/>
<xrd:property name="/object/imageCaptions/defaultDomainClass"/> <xrd:property name="/object/imageCaptions/defaultDomainClass"/>
@ -148,7 +148,7 @@
</xrd:adapter> </xrd:adapter>
<!-- Adds a text asset --> <!-- Adds a text asset -->
<xrd:adapter objectType="com.arsdigita.cms.TextPage" extends="com.arsdigita.cms.ContentItem" traversalClass="com.arsdigita.cms.contenttypes.ContentItemTraversalAdapter"> <xrd:adapter objectType="com.arsdigita.cms.contenttypes.GenericArticle" extends="com.arsdigita.cms.ContentItem" traversalClass="com.arsdigita.cms.contenttypes.ContentItemTraversalAdapter">
<xrd:attributes rule="exclude"> <xrd:attributes rule="exclude">
<xrd:property name="/object/textAsset/id"/> <xrd:property name="/object/textAsset/id"/>
<xrd:property name="/object/textAsset/defaultDomainClass"/> <xrd:property name="/object/textAsset/defaultDomainClass"/>
@ -166,7 +166,7 @@
</xrd:adapter> </xrd:adapter>
<!-- Adds several image assets --> <!-- Adds several image assets -->
<xrd:adapter objectType="com.arsdigita.cms.contenttypes.GenericArticle" extends="com.arsdigita.cms.TextPage" traversalClass="com.arsdigita.cms.contenttypes.ContentItemTraversalAdapter"> <xrd:adapter objectType="com.arsdigita.cms.contenttypes.GenericArticle" extends="com.arsdigita.cms.contenttypes.GenericArticle" traversalClass="com.arsdigita.cms.contenttypes.ContentItemTraversalAdapter">
<xrd:attributes rule="exclude"> <xrd:attributes rule="exclude">
<xrd:property name="/object/imageCaptions/id"/> <xrd:property name="/object/imageCaptions/id"/>
<xrd:property name="/object/imageCaptions/defaultDomainClass"/> <xrd:property name="/object/imageCaptions/defaultDomainClass"/>
@ -226,7 +226,7 @@
</xrd:adapter> </xrd:adapter>
<!-- Adds a text asset --> <!-- Adds a text asset -->
<xrd:adapter objectType="com.arsdigita.cms.TextPage" extends="com.arsdigita.cms.ContentItem" traversalClass="com.arsdigita.cms.contenttypes.ContentItemTraversalAdapter"> <xrd:adapter objectType="com.arsdigita.cms.contenttypes.GenericArticle" extends="com.arsdigita.cms.ContentItem" traversalClass="com.arsdigita.cms.contenttypes.ContentItemTraversalAdapter">
<xrd:associations rule="include"> <xrd:associations rule="include">
<xrd:property name="/object/textAsset"/> <xrd:property name="/object/textAsset"/>
</xrd:associations> </xrd:associations>

View File

@ -105,7 +105,7 @@ public class TextAsset extends Asset {
//***** //*****
// NOTE: readText is no longer used (except in a test) because it // NOTE: readText is no longer used (except in a test) because it
// does no input validation. Processing for loading files is now done // does no input validation. Processing for loading files is now done
// in TextPageBody.java. // in GenericArticleBody.java.
//***** //*****
public long readText(Reader reader) throws IOException { public long readText(Reader reader) throws IOException {
//this does not work since get(CONTENT) returns a null value //this does not work since get(CONTENT) returns a null value

View File

@ -92,7 +92,7 @@ public class GenericArticle extends ContentPage {
} }
/** /**
* Return the text asset for this <code>TextPage</code>. Could return * Return the text asset for this <code>GenericArticle</code>. Could return
* null if there is no text body actually associated with the page * null if there is no text body actually associated with the page
*/ */
public TextAsset getTextAsset() { public TextAsset getTextAsset() {

View File

@ -56,7 +56,7 @@ import org.xml.sax.helpers.DefaultHandler;
* and replicated to the specified depth --&gt; * and replicated to the specified depth --&gt;
* &lt;ccm:content-item * &lt;ccm:content-item
* clone="2" * clone="2"
* helperClass="com.arsdigita.cms.installer.xml.TextPageHelper"&gt; * helperClass="com.arsdigita.cms.installer.xml.GenericArticleHelper"&gt;
* &lt;!-- ContentItems can be cloned but cannot have a depth. The * &lt;!-- ContentItems can be cloned but cannot have a depth. The
* helperClass is used to create the object described here --&gt; * helperClass is used to create the object described here --&gt;
* &lt;ccm:content-type * &lt;ccm:content-type

View File

@ -87,7 +87,7 @@ import java.util.Set;
* ... * ...
* &lt;textAsset oid="[com.arsdigita.cms.TextAsset:42]" * &lt;textAsset oid="[com.arsdigita.cms.TextAsset:42]"
* &lt;content&gt;I am the text&lt;/content&gt; * &lt;content&gt;I am the text&lt;/content&gt;
* &lt;parent oid="[com.arsdigita.cms.TextPage:13]" /&gt; * &lt;parent oid="[com.arsdigita.cms.contenttypes.GenericPage:13]" /&gt;
* ... * ...
* &lt;/textAsset&gt; * &lt;/textAsset&gt;
* ... * ...

View File

@ -81,7 +81,7 @@ import com.arsdigita.util.UncheckedWrapperException;
* classes should override the {@link #createTextAsset(PageState)} method * classes should override the {@link #createTextAsset(PageState)} method
* in to create a valid text asset. * in to create a valid text asset.
* <p> * <p>
* This component is used primarily in {@link TextPageBody} and * This component is used primarily in {@link GenericArticleBody} and
* {@link com.arsdigita.cms.ui.templates.TemplateBody} * {@link com.arsdigita.cms.ui.templates.TemplateBody}
* *
* @author Stanislav Freidin (sfreidin@arsdigita.com) * @author Stanislav Freidin (sfreidin@arsdigita.com)
@ -108,7 +108,7 @@ public abstract class TextAssetBody extends SecurityPropertyEditor
} }
/** /**
* Construct a new TextPageBody component * Construct a new GenericArticleBody component
* *
* @param assetModel The {@link ItemSelectionModel} which will * @param assetModel The {@link ItemSelectionModel} which will
* be responsible for maintaining the current asset * be responsible for maintaining the current asset
@ -117,7 +117,7 @@ public abstract class TextAssetBody extends SecurityPropertyEditor
this(assetModel,null); this(assetModel,null);
} }
/** /**
* Construct a new TextPageBody component * Construct a new GenericArticleBody component
* *
* @param assetModel The {@link ItemSelectionModel} which will * @param assetModel The {@link ItemSelectionModel} which will
* be responsible for maintaining the current asset * be responsible for maintaining the current asset
@ -163,7 +163,7 @@ public abstract class TextAssetBody extends SecurityPropertyEditor
/** /**
* Adds the options for the mime type select widget of * Adds the options for the mime type select widget of
* <code>TextPageForm</code> and sets the default mime type. * <code>GenericArticleForm</code> and sets the default mime type.
**/ **/
protected void setMimeTypeOptions(SingleSelect mimeSelect) { protected void setMimeTypeOptions(SingleSelect mimeSelect) {
FileUploadSection.addMimeOptions(mimeSelect, "text"); FileUploadSection.addMimeOptions(mimeSelect, "text");
@ -188,7 +188,7 @@ public abstract class TextAssetBody extends SecurityPropertyEditor
} }
// Create a text asset if it does not exist. // Create a text asset if it does not exist.
// This should probably be a method in TextPage ? // This should probably be a method in GenericArticle ?
protected TextAsset createOrGetTextAsset(ItemSelectionModel assetModel, protected TextAsset createOrGetTextAsset(ItemSelectionModel assetModel,
PageState s) { PageState s) {
// Get the text asset or create a new one // Get the text asset or create a new one