Class CmsSchemaInfo.Field

java.lang.Object
org.opencms.jsp.util.CmsSchemaInfo.Field
All Implemented Interfaces:
I_CmsInfoWrapper
Enclosing class:
CmsSchemaInfo

public class CmsSchemaInfo.Field extends Object implements I_CmsInfoWrapper
Represents information about a single field in a content schema.
  • Constructor Details

    • Field

      public Field(CmsXmlContentDefinition contentDef)
      Creates a new instance for the root level of a schema.
      Parameters:
      contentDef - the content definition
    • Field

      public Field(I_CmsXmlSchemaType field, String path)
      Creates a new instance.
      Parameters:
      field - the schema type for the field
      path - the path of the field
  • Method Details

    • getChildren

      Gets the nested fields, if any.
      Returns:
      the nested fields
    • getContentDefinition

      Gets the content definition.
      Returns:
      the content definition
    • getDefaultValue

      Gets the default value.
      Returns:
      the default value
    • getDescription

      Gets the description.
      Specified by:
      getDescription in interface I_CmsInfoWrapper
      Returns:
      the description
    • getDescriptionKey

      Gets the description key.
      Specified by:
      getDescriptionKey in interface I_CmsInfoWrapper
      Returns:
      the description key
    • getDescriptionRaw

      Gets the raw configured description.
      Specified by:
      getDescriptionRaw in interface I_CmsInfoWrapper
      Returns:
      the raw configured description
    • getDisplayName

      Gets the display name.
      Returns:
      the display name
    • getDisplayNameKey

      Gets the display name key.
      Returns:
      the display name key
    • getDisplayNameRaw

      Gets the raw configured string for the display name.
      Returns:
      the raw display name
    • getIsChoice

      public boolean getIsChoice()
      Checks if this is a choice type.
      Returns:
      true if this is a choice type
    • getIsNestedContent

      public boolean getIsNestedContent()
      Checks if this is a nested content type.
      Returns:
      true if this is a nested content type
    • getMaxOccurs

      public int getMaxOccurs()
      Gets the maximum number of occurrences.
      Returns:
      the maximum number of occurrences
    • getMinOccurs

      public int getMinOccurs()
      Gets the minimum number of occurrences.
      Returns:
      the minimum number of occurrences
    • getName

      public String getName()
      Gets the field name.
      Returns:
      the name
    • getParsedSelectOptions

      Tries to interpret the widget configuration as a select option configuration and returns the list of select options if this succeeds, and null otherwise.
      Returns:
      the list of parsed select options, or null if the widget configuration couldn't be interpreted that way
    • getType

      public String getType()
      Gets the field type.
      Returns:
      the type
    • getValidationError

      Gets the validation error message.
      Returns:
      the validation error message
    • getValidationErrorKey

      Gets the validation error localization key.
      Returns:
      the validation error localization key
    • getValidationWarning

      Gets the validation warning message.
      Returns:
      the validation warning message
    • getValidationWarningKey

      Gets the validation warning message key.
      Returns:
      the validation warning message key
    • getVisibility

      Gets the visibility configuration string for the field.
      Returns:
      the visibility configuration string
    • getWidget

      public String getWidget()
      Gets the widget.
      Returns:
      the widget
    • getWidgetConfig

      Gets the widget configuration.
      Returns:
      the widget configuration