org.opencms.workplace.editors
Class CmsXmlContentWidgetVisitor

java.lang.Object
  extended by org.opencms.workplace.editors.CmsXmlContentWidgetVisitor
All Implemented Interfaces:
I_CmsXmlContentValueVisitor

public class CmsXmlContentWidgetVisitor
extends java.lang.Object
implements I_CmsXmlContentValueVisitor

Visitor implementation that collects the different widgets for all visited values and all widgets for the found values.

This implementation is needed when creating the html output of the xmlcontent editor CmsXmlContentEditor.

Since:
6.0.0
Version:
$Revision: 1.14 $
Author:
Andreas Zahner

Constructor Summary
CmsXmlContentWidgetVisitor()
          Creates a new widget collector node visitor.
CmsXmlContentWidgetVisitor(java.util.Locale locale)
          Creates a new widget collector node visitor.
 
Method Summary
 java.util.Locale getLocale()
          Returns the locale to get the widgets from.
 java.util.List getUniqueWidgets()
          Returns the unique widgets that were found in the content.
 java.util.Map getValues()
          Returns all simple values that were found in the content.
 java.util.Map getWidgets()
          Returns all widgets that were found in the content.
 void visit(I_CmsXmlContentValue value)
          Visits the given value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmsXmlContentWidgetVisitor

public CmsXmlContentWidgetVisitor()
Creates a new widget collector node visitor.


CmsXmlContentWidgetVisitor

public CmsXmlContentWidgetVisitor(java.util.Locale locale)
Creates a new widget collector node visitor.

Parameters:
locale - the Locale to get the widgets from
Method Detail

getLocale

public java.util.Locale getLocale()
Returns the locale to get the widgets from.

Returns:
the locale to get the widgets from

getUniqueWidgets

public java.util.List getUniqueWidgets()
Returns the unique widgets that were found in the content.

Returns:
the unique widgets that were found in the content

getValues

public java.util.Map getValues()
Returns all simple values that were found in the content.

The map key is the complete xpath of the value.

Returns:
all simple values that were found in the content

getWidgets

public java.util.Map getWidgets()
Returns all widgets that were found in the content.

The map key is the complete xpath of the corresponding value.

Returns:
all widgets that were found in the content

visit

public void visit(I_CmsXmlContentValue value)
Description copied from interface: I_CmsXmlContentValueVisitor
Visits the given value.

Specified by:
visit in interface I_CmsXmlContentValueVisitor
Parameters:
value - the value to visit
See Also:
I_CmsXmlContentValueVisitor.visit(org.opencms.xml.types.I_CmsXmlContentValue)