Package org.opencms.jsp.util
Class CmsSchemaInfo.Field
java.lang.Object
org.opencms.jsp.util.CmsSchemaInfo.Field
- All Implemented Interfaces:
I_CmsInfoWrapper
- Enclosing class:
- CmsSchemaInfo
Represents information about a single field in a content schema.
-
Constructor Summary
ConstructorDescriptionField
(CmsXmlContentDefinition contentDef) Creates a new instance for the root level of a schema.Field
(I_CmsXmlSchemaType field, String path) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionGets the nested fields, if any.Gets the content definition.Gets the default value.Gets the description.Gets the description key.Gets the raw configured description.Gets the display name.Gets the display name key.Gets the raw configured string for the display name.boolean
Checks if this is a choice type.boolean
Checks if this is a nested content type.int
Gets the maximum number of occurrences.int
Gets the minimum number of occurrences.getName()
Gets the field name.Tries to interpret the widget configuration as a select option configuration and returns the list of select options if this succeeds, and null otherwise.getType()
Gets the field type.Gets the validation error message.Gets the validation error localization key.Gets the validation warning message.Gets the validation warning message key.Gets the visibility configuration string for the field.Gets the widget.Gets the widget configuration.
-
Constructor Details
-
Field
Creates a new instance for the root level of a schema.- Parameters:
contentDef
- the content definition
-
Field
Creates a new instance.- Parameters:
field
- the schema type for the fieldpath
- 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 interfaceI_CmsInfoWrapper
- Returns:
- the description
-
getDescriptionKey
Gets the description key.- Specified by:
getDescriptionKey
in interfaceI_CmsInfoWrapper
- Returns:
- the description key
-
getDescriptionRaw
Gets the raw configured description.- Specified by:
getDescriptionRaw
in interfaceI_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
Checks if this is a choice type.- Returns:
- true if this is a choice type
-
getIsNestedContent
Checks if this is a nested content type.- Returns:
- true if this is a nested content type
-
getMaxOccurs
Gets the maximum number of occurrences.- Returns:
- the maximum number of occurrences
-
getMinOccurs
Gets the minimum number of occurrences.- Returns:
- the minimum number of occurrences
-
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
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
Gets the widget.- Returns:
- the widget
-
getWidgetConfig
Gets the widget configuration.- Returns:
- the widget configuration
-