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,