Class AbstractGomFormElement
java.lang.Object
de.espirit.firstspirit.access.store.templatestore.gom.AbstractGomElement
de.espirit.firstspirit.access.store.templatestore.gom.AbstractGomFormElement
- All Implemented Interfaces:
GomCheckable,GomElement,GomFormElement,GomHideable,GomLangInfoProvider,GomSearchRelevancy,LineBreakable,Serializable
- Direct Known Subclasses:
AbstractGomDom,AbstractGomSelect,AbstractGomTableTemplateElement,AbstractGomTextualFormElement,GomButton,GomContentAreaList,GomDataset,GomDate,GomFile,GomInvalid,GomLink,GomPageRef,GomPermission,GomReference,GomSectionList,GomToggle
@NonExtendable
public abstract class AbstractGomFormElement
extends AbstractGomElement
implements GomFormElement, GomCheckable, LineBreakable, GomSearchRelevancy
Abstract class defining most common features of a form element.
For using an extended language information container when subclassing,
the extended container must subclass DefaultGomLangInfos and
override getLangInfos()!
- Since:
- 4.0.17
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface de.espirit.firstspirit.access.store.templatestore.gom.GomCheckable
GomCheckable.Context -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanConvenience method: Indicates, whether empty values are allowedbooleanbreaks()Convenience method: Indicates whether to break after this form elementprotected AbstractGomFormElementclone()Creates a clone of this form element.@NotNull ConvertEntityConvenience method: Provides a non-null setting for entity conversion@Nullable Stringdescription(String lang) Convenience method: Provides the description for this form element in the requested languagebooleanConvenience method: Indicates whether to fill the form horizontally with this form elementIndicates, whether the form element allows to stay empty.Provides the mode for entity conversions.EditorValue<?>Provides the editor containing the default value for this form element.getHFill()Indicates, whether to horizontally fill a form by this form element.Indicates, whether this form element is visible in the form.getLabel()Deprecated.since 4.0.17 originally replaced by LangInfos-Tag, now for hiding in GOM and enable attribute to tag conversion.Provides language dependent information on this form element, like a label and description for multiple languages.getName()Provide the form element name following specific rules.Indicates, whether the next form element should follow in the same line as this one.Provides the mode for handling preset value for this form element.Provides the relevancy level of this GOM element's value wrt. indexing.Indicates, whether to have separate values in different languages.booleanisHidden()Convenience method: Indicates, whether to hide this component from the formConvenience method: Returns the forms name instead of anulllabel@NotNull Stringname()Convenience method: Provides the textual name of this form element@NotNull Presetpreset()Convenience method: Provides the preset mode for this form element as a non-null valuevoidsetAllowEmpty(YesNo allowEmpty) Sets whether empty is allowed for this form element.voidsetConvertEntities(ConvertEntity convertEntities) Sets the mode for entity conversions.voidsetDefaultValue(EditorValue<?> editorValue) Sets the editor providing the default value for this form element.voidSets, whether to horizontally fill a form by this form element.voidSets the form element to be hidden or not.voidDeprecated.since 4.0.17 originally replaced by LangInfos-Tag, now for hiding in GOM and enable attribute to tag conversion.final voidsetLabelAndDescription(@NotNull String lang, @Nullable String label, @Nullable String description) Sets the label and description for a specific language.voidsetName(Designator name) Sets the form element name.voidsetNoBreak(YesNo noBreak) Set whether the next form element should follow immediately in the same line as this one.voidSets the preset mode to be used for default values.voidsetSearchRelevancy(@Nullable Relevancy relevancy) Sets the relevancy level for this GOM element.voidsetUseLanguages(YesNo useLanguages) Sets whether to use different values in each language or not.booleanConvenience method: Indicates whether to use separate values in each languagevoidvalidate(GomCheckable.Context context) Validates the form element's state with respect to the given context.voidverify()Verifies the form element's state.Methods inherited from class de.espirit.firstspirit.access.store.templatestore.gom.AbstractGomElement
getDefaultTag, getGomElementTag, getIncludeConfiguration, hasRepresentation, setGomElementTag, setIncludeConfigurationMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.espirit.firstspirit.access.store.templatestore.gom.GomElement
getGomElementTag, getIncludeConfiguration, hasRepresentation, setGomElementTag, setIncludeConfiguration
-
Constructor Details
-
AbstractGomFormElement
public AbstractGomFormElement()
-
-
Method Details
-
getName
Provide the form element name following specific rules.- Specified by:
getNamein interfaceGomFormElement- Returns:
- A name designator.
- Since:
- 4.0.17
-
setName
Sets the form element name.- Specified by:
setNamein interfaceGomFormElement- Parameters:
name- The name designator.- Since:
- 4.0.17
-
getConvertEntities
Provides the mode for entity conversions.- Returns:
- The entity conversion mode. Default is
none. - Since:
- 4.0.17
-
setConvertEntities
Sets the mode for entity conversions.- Parameters:
convertEntities- The conversion mode.- Since:
- 4.0.17
-
getHFill
Indicates, whether to horizontally fill a form by this form element.- Returns:
YES, if set to fill horizontally. Default isno.- Since:
- 4.0.17
-
setHFill
Sets, whether to horizontally fill a form by this form element.- Parameters:
hfill-YES, if order to fill horizontally.- Since:
- 4.0.17
-
getUseLanguages
Indicates, whether to have separate values in different languages.- Returns:
YES, if it has separate values. Default isYesNo.YES.- Since:
- 4.0.17
-
setUseLanguages
Sets whether to use different values in each language or not.- Parameters:
useLanguages-YES, to allow for separate values.- Since:
- 4.0.17
-
getNoBreak
Indicates, whether the next form element should follow in the same line as this one.- Returns:
YES, to make the next form element follow. Defaults toYesNo.NO.- Since:
- 4.0.17
-
setNoBreak
Set whether the next form element should follow immediately in the same line as this one.- Parameters:
noBreak-YES, to make the next element follow in line.- Since:
- 4.0.17
-
getAllowEmpty
Indicates, whether the form element allows to stay empty.- Specified by:
getAllowEmptyin interfaceGomFormElement- Returns:
YES, if empty is allowed. Defaults toYesNo.YES.- Since:
- 4.0.17
-
setAllowEmpty
Sets whether empty is allowed for this form element.- Specified by:
setAllowEmptyin interfaceGomFormElement- Parameters:
allowEmpty-YES, if empty shall be allowed.- Since:
- 4.0.17
-
getHidden
Indicates, whether this form element is visible in the form.- Specified by:
getHiddenin interfaceGomFormElement- Returns:
YES, if hidden. Defaults tono.- Since:
- 4.0.44
-
setHidden
Sets the form element to be hidden or not.- Specified by:
setHiddenin interfaceGomFormElement- Parameters:
hidden-YES, to hide the form element.- Since:
- 4.0.44
-
getPreset
Provides the mode for handling preset value for this form element.- Specified by:
getPresetin interfaceGomFormElement- Returns:
- The preset mode. Defaults to
default. - Since:
- 4.0.55
-
setPreset
Sets the preset mode to be used for default values.- Specified by:
setPresetin interfaceGomFormElement- Parameters:
preset- The preset mode.- Since:
- 4.0.55
-
getLangInfos
Provides language dependent information on this form element, like a label and description for multiple languages.- Specified by:
getLangInfosin interfaceGomLangInfoProvider- Returns:
- A language information container.
- Since:
- 4.0.17
-
getSearchRelevancy
Provides the relevancy level of this GOM element's value wrt. indexing.- Specified by:
getSearchRelevancyin interfaceGomSearchRelevancy- Returns:
- The relevancy level.
- Since:
- 5.2.305
-
setSearchRelevancy
Sets the relevancy level for this GOM element.- Specified by:
setSearchRelevancyin interfaceGomSearchRelevancy- Parameters:
relevancy- The relevancy level.- Since:
- 5.2.305
-
verify
Verifies the form element's state. In this generic part, checks for the required name and language information.- Specified by:
verifyin interfaceGomCheckable- Throws:
IllegalStateException- if any requirement is violated.- Since:
- 4.2.8
-
validate
Validates the form element's state with respect to the given context. This generic stub does not check anything.- Specified by:
validatein interfaceGomCheckable- Parameters:
context- The context to validate for, must not benull.- Throws:
GomValidationError- if any requirement is violated.- Since:
- 4.0.17
-
clone
Creates a clone of this form element. -
getDefaultValue
Provides the editor containing the default value for this form element.- Specified by:
getDefaultValuein interfaceGomFormElement- Returns:
- The default value container.
- Since:
- 4.0.17
-
setDefaultValue
Sets the editor providing the default value for this form element.- Specified by:
setDefaultValuein interfaceGomFormElement- Parameters:
editorValue- The default value provding container.- Since:
- 4.0.17
-
name
Convenience method: Provides the textual name of this form element- Specified by:
namein interfaceGomFormElement- Returns:
- The element's name.
- Since:
- 4.0.17
-
convertEntities
Convenience method: Provides a non-null setting for entity conversion- Specified by:
convertEntitiesin interfaceGomFormElement- Returns:
- The entity conversion setting.
- Since:
- 4.0.17
-
fillsHorizontally
public boolean fillsHorizontally()Convenience method: Indicates whether to fill the form horizontally with this form element- Specified by:
fillsHorizontallyin interfaceGomFormElement- Returns:
true, if to fill horizontally.- Since:
- 4.0.17
-
usesLanguages
public boolean usesLanguages()Convenience method: Indicates whether to use separate values in each language- Specified by:
usesLanguagesin interfaceGomFormElement- Returns:
true, if separate values are supported.- Since:
- 4.0.17
-
breaks
public boolean breaks()Convenience method: Indicates whether to break after this form element- Specified by:
breaksin interfaceGomFormElement- Specified by:
breaksin interfaceLineBreakable- Returns:
true, if the next form element should follow in the next line.- Since:
- 4.0.17
-
allowsEmpty
public boolean allowsEmpty()Convenience method: Indicates, whether empty values are allowed- Specified by:
allowsEmptyin interfaceGomFormElement- Returns:
true, if empty values are allowed.- Since:
- 4.0.17
-
isHidden
public boolean isHidden()Convenience method: Indicates, whether to hide this component from the form- Specified by:
isHiddenin interfaceGomHideable- Returns:
true, if hiding is requested.- Since:
- 4.0.44
-
preset
Convenience method: Provides the preset mode for this form element as a non-null value- Specified by:
presetin interfaceGomFormElement- Returns:
- The preset mode.
- Since:
- 4.0.55
-
label
Convenience method: Returns the forms name instead of anulllabel- Specified by:
labelin interfaceGomLangInfoProvider- Parameters:
lang- The language abbreviation.- Returns:
- The label.
- Since:
- 4.0.17
- See Also:
-
description
Convenience method: Provides the description for this form element in the requested language- Specified by:
descriptionin interfaceGomLangInfoProvider- Parameters:
lang- The language abbreviation.- Returns:
- The description.
- Since:
- 4.0.17
-
setLabelAndDescription
public final void setLabelAndDescription(@NotNull @NotNull String lang, @Nullable @Nullable String label, @Nullable @Nullable String description) Sets the label and description for a specific language.- Parameters:
lang- The language abbreviation.label- The label.description- The description.- Since:
- 4.0.17
-
getLabel
Deprecated.since 4.0.17 originally replaced by LangInfos-Tag, now for hiding in GOM and enable attribute to tag conversion.For GOM parsing only. Enables conversion to LangInfos-Tag. Always returns null.- Since:
- 4.0.17
-
setLabel
Deprecated.since 4.0.17 originally replaced by LangInfos-Tag, now for hiding in GOM and enable attribute to tag conversion.For GOM parsing only. Enables conversion to LangInfos-Tag.- Since:
- 4.0.17
-