From f36bcfd0b6a0bcc4217e80dac036d5addd248887 Mon Sep 17 00:00:00 2001 From: quasi Date: Thu, 7 Jan 2010 10:07:49 +0000 Subject: [PATCH] =?UTF-8?q?Kommentare=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.libreccm.org/ccm/trunk@323 8810af33-2d31-482b-a856-94f89814c4df --- .../com/arsdigita/cms/ContentItemXMLRenderer.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/ccm-cms/src/com/arsdigita/cms/ContentItemXMLRenderer.java b/ccm-cms/src/com/arsdigita/cms/ContentItemXMLRenderer.java index ba378cd4e..2f8c470df 100644 --- a/ccm-cms/src/com/arsdigita/cms/ContentItemXMLRenderer.java +++ b/ccm-cms/src/com/arsdigita/cms/ContentItemXMLRenderer.java @@ -11,6 +11,14 @@ import com.arsdigita.domain.DomainObjectXMLRenderer; import com.arsdigita.xml.Element; /** + * This is a special ContentItemXMLRenderer for CMS to get a more transparent + * way to handle ContentBundles during XML output. + * + * The problem was to change RelatedLinks and therefore Link to always link to + * the corresponding ContentBundle instead of the content item. To get the + * corresponding content item during XML generation, I have to test for + * ContentBundle and negotiate the language version. + * This is not possible in com.arsdigita.ccm * * @author quasi */ @@ -21,6 +29,11 @@ public class ContentItemXMLRenderer extends DomainObjectXMLRenderer { super(root); } + + // This method will be called by DomainObjectTraversal.walk() + // It's purpose is to test for ContentBundle objects and if found, replace + // that object with the negotiated version of the content item. + // Otherwise this methd will do nothing. protected void walk(final DomainObjectTraversalAdapter adapter, final DomainObject obj, final String path,