de.espirit.firstspirit.access.store.templatestore.gom
Class AbstractGomFormElement

java.lang.Object
  extended by de.espirit.firstspirit.access.store.templatestore.gom.AbstractGomElement
      extended by de.espirit.firstspirit.access.store.templatestore.gom.AbstractGomFormElement
All Implemented Interfaces:
GomCheckable, GomElement, GomFormElement, GomHideable, GomLangInfoProvider, LineBreakable, Serializable

public abstract class AbstractGomFormElement
extends AbstractGomElement
implements GomFormElement, GomCheckable, LineBreakable

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 AbstractGomFormElement.getLangInfos()!

Since:
4.0.17
See Also:
Serialized Form

Nested Class Summary
static class AbstractGomFormElement.CmsLangInfo
          Deprecated. since 4.0.17 - use GomLangInfo instead
static class AbstractGomFormElement.CmsXmlContainer
          Deprecated. since 4.0.17 - obsolete
 
Nested classes/interfaces inherited from interface de.espirit.firstspirit.access.store.templatestore.gom.GomCheckable
GomCheckable.Context
 
Constructor Summary
AbstractGomFormElement()
           
 
Method Summary
 boolean allowsEmpty()
          Indicates that empty values are allowed.
 boolean breaks()
          Indicates, that the form shall be followed by a line break.
protected  AbstractGomFormElement clone()
           
 ConvertEntity convertEntities()
          Get the mode for converting unicode characters.
 String description(String lang)
          Resolve the description for the given language or fallback.
 boolean fillsHorizontally()
          Indicates, that the form shall be filled horizontally.
 String getAccessClass()
          Deprecated. since 4.0.17 - no replacement
 YesNo getAllowEmpty()
          Indicates, whether leaving the form empty is allowed.
 AbstractGomFormElement.CmsLangInfo getCms_Lang_Info()
          Deprecated. since 4.0.17 - no replacement - noop
 String getComment()
          Deprecated. since 4.0.17 - use AbstractGomFormElement.getLangInfos().get(String).getDescription() instead
 ConvertEntity getConvertEntities()
           
 EditorValue<?> getDefaultValue()
          Get the default value for the form element.
 YesNo getHFill()
           
 YesNo getHidden()
          Indicates, whether the component will be hidden or shown.
 String getLabel()
          Deprecated. since 4.0.17 - use AbstractGomFormElement.getLangInfos().get(String).getLabel() instead
 DefaultGomLangInfos getLangInfos()
          Get the container of language information stored for this element.
 Designator getName()
          Get the name identifying the editor's value.
 YesNo getNoBreak()
           
 Preset getPreset()
          Get the mode to be applied for fallback values.
 YesNo getUseLanguages()
           
 boolean isHidden()
          Indicator for hidden elements.
 String label(String lang)
          Returns the forms name instead of a null label.
 String name()
          Get the name of this form element.
 Preset preset()
          Get the preset mode to be used.
 void setAccessClass(String name)
          Deprecated. since 4.0.17 - no replacement - calling this method will take no effect
 void setAllowEmpty(YesNo allowEmpty)
          Set, whether leaving the form empty is allowed.
 void setCms_Lang_Info(AbstractGomFormElement.CmsLangInfo langInfo)
          Deprecated. since 4.0.17 - use AbstractGomFormElement.setLabelAndDescription(String, String, String) instead
 void setComment(String comment)
          Deprecated. since 4.0.17 - use AbstractGomFormElement.getLangInfos().get(String).setDescription(String) instead
 void setConvertEntities(ConvertEntity convertEntities)
           
 void setDefaultValue(EditorValue<?> editorValue)
          Set the default value for the form element.
 void setHFill(YesNo hfill)
           
 void setHidden(YesNo hidden)
          Set, whether the form will be hidden.
 void setLabel(String label)
          Deprecated. since 4.0.17 - use AbstractGomFormElement.getLangInfos().get(String).setLabel(String) instead
protected  void setLabelAndDescription(String lang, String label, String description)
           
 void setName(Designator name)
          Set the name that identifies the editor's value.
 void setNoBreak(YesNo noBreak)
           
 void setPreset(Preset preset)
          Set the mode to be applied for fallback values.
 void setUseLanguages(YesNo useLanguages)
           
 boolean usesLanguages()
          Indicates, that the form element uses languages.
 void validate()
          Validate the class for being correctly set up.
 void validate(GomCheckable.Context context)
          Validate the element against the given context.
 void verify()
          Verify the element to be fulfill its syntactic constraints.
 
Methods inherited from class de.espirit.firstspirit.access.store.templatestore.gom.AbstractGomElement
getDefaultTag, getGomElementTag, getIncludeConfiguration, hasRepresentation, setGomElementTag, setIncludeConfiguration
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.espirit.firstspirit.access.store.templatestore.gom.GomElement
getGomElementTag, getIncludeConfiguration, hasRepresentation, setGomElementTag, setIncludeConfiguration
 

Constructor Detail

AbstractGomFormElement

public AbstractGomFormElement()
Method Detail

getName

public Designator getName()
Description copied from interface: GomFormElement
Get the name identifying the editor's value.

Specified by:
getName in interface GomFormElement
Returns:
The name.
Since:
4.0.17

setName

public void setName(Designator name)
Description copied from interface: GomFormElement
Set the name that identifies the editor's value.

Specified by:
setName in interface GomFormElement
Parameters:
name - The name.
Since:
4.0.17

getConvertEntities

public ConvertEntity getConvertEntities()
Since:
4.0.17

setConvertEntities

public void setConvertEntities(ConvertEntity convertEntities)
Since:
4.0.17

getHFill

public YesNo getHFill()
Since:
4.0.17

setHFill

public void setHFill(YesNo hfill)
Since:
4.0.17

getUseLanguages

public YesNo getUseLanguages()
Since:
4.0.17

setUseLanguages

public void setUseLanguages(YesNo useLanguages)
Since:
4.0.17

getNoBreak

public YesNo getNoBreak()
Since:
4.0.17

setNoBreak

public void setNoBreak(YesNo noBreak)
Since:
4.0.17

getAllowEmpty

public YesNo getAllowEmpty()
Description copied from interface: GomFormElement
Indicates, whether leaving the form empty is allowed.

Specified by:
getAllowEmpty in interface GomFormElement
Returns:
Definition for allowing emptiness.
Since:
4.0.17

setAllowEmpty

public void setAllowEmpty(YesNo allowEmpty)
Description copied from interface: GomFormElement
Set, whether leaving the form empty is allowed.

Specified by:
setAllowEmpty in interface GomFormElement
Parameters:
allowEmpty - Indicator for allowing emptiness.
Since:
4.0.17

getHidden

public YesNo getHidden()
Description copied from interface: GomFormElement
Indicates, whether the component will be hidden or shown.

Specified by:
getHidden in interface GomFormElement
Returns:
true, if to be hidden.
Since:
4.0.44

setHidden

public void setHidden(YesNo hidden)
Description copied from interface: GomFormElement
Set, whether the form will be hidden.

Specified by:
setHidden in interface GomFormElement
Parameters:
hidden - Indicator for the element being hidden.
Since:
4.0.44

getPreset

public Preset getPreset()
Description copied from interface: GomFormElement
Get the mode to be applied for fallback values.

Specified by:
getPreset in interface GomFormElement
Returns:
The mode to be used.
Since:
4.0.55

setPreset

public void setPreset(Preset preset)
Description copied from interface: GomFormElement
Set the mode to be applied for fallback values.

Specified by:
setPreset in interface GomFormElement
Parameters:
preset - The preset mode to be used.
Since:
4.0.55

getLangInfos

public DefaultGomLangInfos getLangInfos()
Description copied from interface: GomLangInfoProvider
Get the container of language information stored for this element.

Specified by:
getLangInfos in interface GomLangInfoProvider
Returns:
The language information container.
Since:
4.0.17

validate

public void validate()
              throws IllegalStateException
Validate the class for being correctly set up.

Specified by:
validate in interface GomElement
Throws:
IllegalStateException - If the instance is in an illegal state.
Since:
4.0

verify

public void verify()
            throws IllegalStateException
Description copied from interface: GomCheckable
Verify the element to be fulfill its syntactic constraints.

Specified by:
verify in interface GomCheckable
Throws:
IllegalStateException - If the element is not correctly set up.
Since:
4.2.8

validate

public void validate(GomCheckable.Context context)
              throws GomValidationError
Description copied from interface: GomCheckable
Validate the element against the given context.

Specified by:
validate in interface GomCheckable
Parameters:
context - The context to validate for.
Throws:
GomValidationError - If the element is not plausible wrt. its context.
Since:
4.0.17

clone

protected AbstractGomFormElement clone()
Overrides:
clone in class Object
Since:
4.1.12

getDefaultValue

public EditorValue<?> getDefaultValue()
Description copied from interface: GomFormElement
Get the default value for the form element.

Specified by:
getDefaultValue in interface GomFormElement
Returns:
The default value container or null.
Since:
4.0.17

setDefaultValue

public void setDefaultValue(EditorValue<?> editorValue)
Description copied from interface: GomFormElement
Set the default value for the form element.

Specified by:
setDefaultValue in interface GomFormElement
Parameters:
editorValue - The value container.
Since:
4.0.17

name

@NotNull
public String name()
Description copied from interface: GomFormElement
Get the name of this form element.

Specified by:
name in interface GomFormElement
Returns:
The name.
Since:
4.0.17

convertEntities

public ConvertEntity convertEntities()
Description copied from interface: GomFormElement
Get the mode for converting unicode characters.

Specified by:
convertEntities in interface GomFormElement
Returns:
The ConvertEntity mode.
Since:
4.0.17

fillsHorizontally

public boolean fillsHorizontally()
Description copied from interface: GomFormElement
Indicates, that the form shall be filled horizontally.

Specified by:
fillsHorizontally in interface GomFormElement
Returns:
true, iff to be filled.
Since:
4.0.17

usesLanguages

public boolean usesLanguages()
Description copied from interface: GomFormElement
Indicates, that the form element uses languages.

Specified by:
usesLanguages in interface GomFormElement
Returns:
true, iff it uses languages.
Since:
4.0.17

breaks

public boolean breaks()
Description copied from interface: GomFormElement
Indicates, that the form shall be followed by a line break.

Specified by:
breaks in interface GomFormElement
Specified by:
breaks in interface LineBreakable
Returns:
false, iff it shall not break.
Since:
4.0.17

allowsEmpty

public boolean allowsEmpty()
Description copied from interface: GomFormElement
Indicates that empty values are allowed.

Specified by:
allowsEmpty in interface GomFormElement
Returns:
true, if empty values are allowed.
Since:
4.0.17

isHidden

public boolean isHidden()
Description copied from interface: GomHideable
Indicator for hidden elements.

Specified by:
isHidden in interface GomHideable
Returns:
true, if the element should be hidden.
Since:
4.0.44

preset

public Preset preset()
Description copied from interface: GomFormElement
Get the preset mode to be used.

Specified by:
preset in interface GomFormElement
Returns:
The preset mode.
Since:
4.0.55

label

public String label(String lang)
Returns the forms name instead of a null label.

Specified by:
label in interface GomLangInfoProvider
Parameters:
lang - The language abbreviation.
Returns:
The label or null, if no label could be found.
Since:
4.0.17
See Also:
GomLangInfoProvider.label(String)

description

public String description(String lang)
Description copied from interface: GomLangInfoProvider
Resolve the description for the given language or fallback.

Specified by:
description in interface GomLangInfoProvider
Parameters:
lang - The langauge abbreviation.
Returns:
The description otr null, if no description could be found.
Since:
4.0.17

getLabel

@Deprecated
public String getLabel()
Deprecated. since 4.0.17 - use AbstractGomFormElement.getLangInfos().get(String).getLabel() instead

Since:
4.0.17

setLabel

@Deprecated
public void setLabel(String label)
Deprecated. since 4.0.17 - use AbstractGomFormElement.getLangInfos().get(String).setLabel(String) instead

Since:
4.0.17

getComment

@Deprecated
public String getComment()
Deprecated. since 4.0.17 - use AbstractGomFormElement.getLangInfos().get(String).getDescription() instead

Since:
4.0.17

setComment

@Deprecated
public void setComment(String comment)
Deprecated. since 4.0.17 - use AbstractGomFormElement.getLangInfos().get(String).setDescription(String) instead

Since:
4.0.17

getAccessClass

@Deprecated
public String getAccessClass()
Deprecated. since 4.0.17 - no replacement

Since:
4.0.17

setAccessClass

@Deprecated
public void setAccessClass(String name)
Deprecated. since 4.0.17 - no replacement - calling this method will take no effect

Since:
4.0.17

getCms_Lang_Info

@Deprecated
public AbstractGomFormElement.CmsLangInfo getCms_Lang_Info()
Deprecated. since 4.0.17 - no replacement - noop

Since:
4.0.17

setCms_Lang_Info

@Deprecated
public void setCms_Lang_Info(AbstractGomFormElement.CmsLangInfo langInfo)
Deprecated. since 4.0.17 - use AbstractGomFormElement.setLabelAndDescription(String, String, String) instead

Since:
4.0.17

setLabelAndDescription

protected void setLabelAndDescription(String lang,
                                      String label,
                                      String description)
Since:
4.0.17


Copyright © 2012 e-Spirit AG. All Rights Reserved. Build 4.2.480