Package org.opencms.workplace.editors
Class CmsXmlContentWidgetVisitor
- java.lang.Object
-
- 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
-
-
Constructor Summary
Constructors Constructor Description CmsXmlContentWidgetVisitor(CmsObject cms)
Creates a new widget collector node visitor.CmsXmlContentWidgetVisitor(CmsObject cms, java.util.Locale locale)
Creates a new widget collector node visitor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Locale
getLocale()
Returns the locale to get the widgets from.java.util.List<I_CmsWidget>
getUniqueWidgets()
Returns the unique widgets that were found in the content.java.util.Map<java.lang.String,I_CmsXmlContentValue>
getValues()
Returns all simple values that were found in the content.java.util.Map<java.lang.String,I_CmsWidget>
getWidgets()
Returns all widgets that were found in the content.void
visit(I_CmsXmlContentValue value)
Visits the given value.
-
-
-
Constructor Detail
-
CmsXmlContentWidgetVisitor
public CmsXmlContentWidgetVisitor(CmsObject cms)
Creates a new widget collector node visitor.- Parameters:
cms
- the CMS context
-
CmsXmlContentWidgetVisitor
public CmsXmlContentWidgetVisitor(CmsObject cms, java.util.Locale locale)
Creates a new widget collector node visitor.- Parameters:
cms
- the CMS contextlocale
- 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<I_CmsWidget> 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<java.lang.String,I_CmsXmlContentValue> 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<java.lang.String,I_CmsWidget> 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 interfaceI_CmsXmlContentValueVisitor
- Parameters:
value
- the value to visit- See Also:
I_CmsXmlContentValueVisitor.visit(org.opencms.xml.types.I_CmsXmlContentValue)
-
-