Package org.opencms.jsp.util
Class CmsSchemaInfo.Field
- java.lang.Object
-
- org.opencms.jsp.util.CmsSchemaInfo.Field
-
- Enclosing class:
- CmsSchemaInfo
public class CmsSchemaInfo.Field extends java.lang.Object
Represents information about a single field in a content schema.
-
-
Constructor Summary
Constructors Constructor Description Field(CmsXmlContentDefinition contentDef)
Creates a new instance for the root level of a schema.Field(I_CmsXmlSchemaType field, java.lang.String path)
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Collection<CmsSchemaInfo.Field>
getChildren()
Gets the nested fields, if any.CmsXmlContentDefinition
getContentDefinition()
Gets the content definition.java.lang.String
getDefaultValue()
Gets the default value.java.lang.String
getDescription()
Gets the description.java.lang.String
getDescriptionKey()
Gets the description key.java.lang.String
getDisplayName()
Gets the display name.java.lang.String
getDisplayNameKey()
Gets the display name key.boolean
getIsChoice()
Checks if this is a choice type.boolean
getIsNestedContent()
Checks if this is a nested content type.int
getMaxOccurs()
Gets the maximum number of occurrences.int
getMinOccurs()
Gets the minimum number of occurrences.java.lang.String
getName()
Gets the field name.java.util.List<CmsSelectWidgetOption>
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.java.lang.String
getType()
Gets the field type.java.lang.String
getValidationError()
Gets the validation error message.java.lang.String
getValidationErrorKey()
Gets the validation error localization key.java.lang.String
getValidationWarning()
Gets the validation warning message.java.lang.String
getValidationWarningKey()
Gets the validation warning message key.java.lang.String
getWidget()
Gets the widget.java.lang.String
getWidgetConfig()
Gets the widget configuration.
-
-
-
Constructor Detail
-
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, java.lang.String path)
Creates a new instance.- Parameters:
field
- the schema type for the fieldpath
- the path of the field
-
-
Method Detail
-
getChildren
public java.util.Collection<CmsSchemaInfo.Field> getChildren()
Gets the nested fields, if any.- Returns:
- the nested fields
-
getContentDefinition
public CmsXmlContentDefinition getContentDefinition()
Gets the content definition.- Returns:
- the content definition
-
getDefaultValue
public java.lang.String getDefaultValue()
Gets the default value.- Returns:
- the default value
-
getDescription
public java.lang.String getDescription()
Gets the description.- Returns:
- the description
-
getDescriptionKey
public java.lang.String getDescriptionKey()
Gets the description key.- Returns:
- the description key
-
getDisplayName
public java.lang.String getDisplayName()
Gets the display name.- Returns:
- the display name
-
getDisplayNameKey
public java.lang.String getDisplayNameKey()
Gets the display name key.- Returns:
- the display name key
-
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 java.lang.String getName()
Gets the field name.- Returns:
- the name
-
getParsedSelectOptions
public java.util.List<CmsSelectWidgetOption> 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 java.lang.String getType()
Gets the field type.- Returns:
- the type
-
getValidationError
public java.lang.String getValidationError()
Gets the validation error message.- Returns:
- the validation error message
-
getValidationErrorKey
public java.lang.String getValidationErrorKey()
Gets the validation error localization key.- Returns:
- the validation error localization key
-
getValidationWarning
public java.lang.String getValidationWarning()
Gets the validation warning message.- Returns:
- the validation warning message
-
getValidationWarningKey
public java.lang.String getValidationWarningKey()
Gets the validation warning message key.- Returns:
- the validation warning message key
-
getWidget
public java.lang.String getWidget()
Gets the widget.- Returns:
- the widget
-
getWidgetConfig
public java.lang.String getWidgetConfig()
Gets the widget configuration.- Returns:
- the widget configuration
-
-