Class CmsContentTypeVisitor


  • public class CmsContentTypeVisitor
    extends java.lang.Object
    Visitor to read all types and attribute configurations within a content definition.

    • Constructor Detail

      • CmsContentTypeVisitor

        public CmsContentTypeVisitor​(CmsObject cms,
                                     CmsFile file,
                                     java.util.Locale locale)
        Constructor.

        Parameters:
        cms - the CMS context
        file - the content file
        locale - the content locale
    • Method Detail

      • getCollectedWidgets

        public java.util.List<I_CmsWidgetgetCollectedWidgets()
        Gets the list of widgets which have been processed by this visitor.

        Returns:
        the list of widget
      • getComplexWidgetData

        public java.util.Map<java.lang.String,​CmsComplexWidgetDatagetComplexWidgetData()
        Gets the map of complex widget configurations.

        Returns:
        a map from attribute names to complex widget configurations
      • getLabel

        public java.lang.String getLabel​(I_CmsXmlSchemaType value,
                                         java.lang.String defaultValue)
        Returns the label for this value.

        Parameters:
        value - the value
        Returns:
        the label
      • getTabInfos

        public java.util.List<CmsTabInfogetTabInfos()
        Returns the tabInfos.

        Returns:
        the tabInfos
      • hasInvisibleFields

        public boolean hasInvisibleFields()
        Returns if the visited content has invisible fields.

        Returns:
        true if the visited content has invisible fields
      • isDynamicallyLoaded

        public boolean isDynamicallyLoaded​(java.lang.String attributeName)
        Returns true if the value of the attribute is dynamically loaded.
        Parameters:
        attributeName - the attribute to check
        Returns:
        true if the value of the attribute is dynamically loaded.
      • isEditorCompatible

        public boolean isEditorCompatible​(CmsXmlContentDefinition xmlContentDefinition)
                                   throws CmsXmlException
        Checks if the content type widgets are compatible with the new content editor.

        Parameters:
        xmlContentDefinition - the content definition
        Returns:
        true if the content type widgets are compatible with the new content editor
        Throws:
        CmsXmlException - if something goes wrong reading the type widget
      • visitTypes

        public void visitTypes​(CmsXmlContentDefinition xmlContentDefinition,
                               java.util.Locale messageLocale)
        Visits all types within the XML content definition.

        Parameters:
        xmlContentDefinition - the content definition
        messageLocale - the locale
      • getLocaleSynchronizations

        protected java.util.List<java.lang.String> getLocaleSynchronizations()
        Returns the locale synchronized attribute names.

        Returns:
        the locale synchronized attribute names
      • getTypes

        protected java.util.Map<java.lang.String,​CmsTypegetTypes()
        Returns the types of the visited content definition.

        Returns:
        the types