Class GomModule
- All Implemented Interfaces:
GomCheckable,GomEditorProvider,GomElement,GomList<GomElement>,SpecialistsEmployer,Serializable,Iterable<GomElement>,Collection<GomElement>,List<GomElement>
- Direct Known Subclasses:
GomGroup
@NonExtendable
public class GomModule
extends AbstractList<GomElement>
implements GomEditorProvider, GomCheckable, SpecialistsEmployer
Default GOM module implementation.
- Since:
- 4.0
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface de.espirit.firstspirit.access.store.templatestore.gom.GomCheckable
GomCheckable.Context -
Field Summary
FieldsFields inherited from class java.util.AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(int index, GomElement element) appendEditorNames(@Nullable List<String> names) Append the names of all local and children's editors to the given list of names and return the list.boolean@Nullable GomFormElementfindEditor(String name) Look up a GOM editor element within this provider.@NotNull Iterable<GomFormElement>forms()Returns an iterable on all form elements within this provider.get(int index) Getter for GomElements.Map<String,Class<? extends GomElement>> Get a list of mappings from tag name to class supported by this list.Get the tag name, the instance was produced for.Get the configuration, if this is an included element.@NotNull GomModuleReturns the brokergetUid()Get the unique identifier of this provider.inthashCode()booleanIndicates, that the element has a representation to be displayed in a form.
A representation usually corresponds to a registered editor component.remove(int index) set(int index, GomElement element) voidsetDefaults(Data data) Set the default values for all editors based on the given data.voidsetFormDefaults(@Nullable FormData formData) Set the default values for all editors based on the given form data.voidsetGomElementTag(@NotNull String name) Sets the tag name, the instance gets produced for.voidsetIncludeConfiguration(GomIncludeConfiguration includeConfiguration) Set the configuration for an included element.final voidsetSpecialistsBroker(@NotNull SpecialistsBroker specialistsBroker) Set the broker to be used by this employer.voidSet the unique identifier for this provider.intsize()voidvalidate(GomCheckable.Context context) Validate the element against the given context.voidverify()Verify the element to be fulfill its syntactic constraints.static GomModulewith(SpecialistsBroker specialistsBroker, GomElement... elements) Creates a new instance containing the given elementsMethods inherited from class java.util.AbstractList
add, addAll, clear, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subListMethods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
add, addAll, addAll, clear, contains, containsAll, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, removeAll, replaceAll, retainAll, sort, spliterator, subList, toArray, toArray
-
Field Details
-
TAG
The tag of this component- Since:
- 4.0
- See Also:
-
-
Constructor Details
-
GomModule
public GomModule()Creates a new instance- Since:
- 4.0
-
-
Method Details
-
with
Creates a new instance containing the given elements- Since:
- 4.0
-
setSpecialistsBroker
Description copied from interface:SpecialistsEmployerSet the broker to be used by this employer.- Specified by:
setSpecialistsBrokerin interfaceSpecialistsEmployer- Parameters:
specialistsBroker- The specialists broker.
-
get
Description copied from interface:GomEditorProviderGetter for GomElements.- Specified by:
getin interfaceGomEditorProvider- Specified by:
getin interfaceList<GomElement>- Specified by:
getin classAbstractList<GomElement>
-
size
public int size()- Specified by:
sizein interfaceCollection<GomElement>- Specified by:
sizein interfaceList<GomElement>- Specified by:
sizein classAbstractCollection<GomElement>
-
set
- Specified by:
setin interfaceList<GomElement>- Overrides:
setin classAbstractList<GomElement>
-
add
- Specified by:
addin interfaceList<GomElement>- Overrides:
addin classAbstractList<GomElement>
-
remove
- Specified by:
removein interfaceList<GomElement>- Overrides:
removein classAbstractList<GomElement>
-
getSpecialistsBroker
Returns the broker- Since:
- 4.2.105
-
getGomElementTag
Description copied from interface:GomElementGet the tag name, the instance was produced for.- Specified by:
getGomElementTagin interfaceGomElement- Returns:
- The name of the tag.
-
setGomElementTag
Description copied from interface:GomElementSets the tag name, the instance gets produced for.- Specified by:
setGomElementTagin interfaceGomElement- Parameters:
name- The name of the tag.
-
hasRepresentation
public boolean hasRepresentation()Description copied from interface:GomElementIndicates, that the element has a representation to be displayed in a form.
A representation usually corresponds to a registered editor component.- Specified by:
hasRepresentationin interfaceGomElement- Returns:
true, if a representation is available.
-
getUid
Description copied from interface:GomEditorProviderGet the unique identifier of this provider.- Specified by:
getUidin interfaceGomEditorProvider- Returns:
- The provider's UID.
-
setUid
Description copied from interface:GomEditorProviderSet the unique identifier for this provider.- Specified by:
setUidin interfaceGomEditorProvider- Parameters:
uid- The identifier to be used for this provider.
-
getIncludeConfiguration
Description copied from interface:GomElementGet the configuration, if this is an included element.- Specified by:
getIncludeConfigurationin interfaceGomElement- Returns:
- The configuration for including the element.
-
setIncludeConfiguration
Description copied from interface:GomElementSet the configuration for an included element.- Specified by:
setIncludeConfigurationin interfaceGomElement- Parameters:
includeConfiguration- The configuration to set.
-
verify
Description copied from interface:GomCheckableVerify the element to be fulfill its syntactic constraints.- Specified by:
verifyin interfaceGomCheckable- Throws:
IllegalStateException- If the element is not correctly set up.
-
validate
Description copied from interface:GomCheckableValidate the element against the given context.- Specified by:
validatein interfaceGomCheckable- Parameters:
context- The context to validate for, must not benull.- Throws:
GomValidationError- If the element is not plausible wrt. its context.
-
findEditor
Description copied from interface:GomEditorProviderLook up a GOM editor element within this provider.- Specified by:
findEditorin interfaceGomEditorProvider- Parameters:
name- The name of the editor.- Returns:
- The matching editor or
null.
-
appendEditorNames
Description copied from interface:GomEditorProviderAppend the names of all local and children's editors to the given list of names and return the list. Ifnamesisnull, returns a new list.- Specified by:
appendEditorNamesin interfaceGomEditorProvider- Parameters:
names- A list of names or null.- Returns:
- The list of editor names, maybe empty.
-
forms
Description copied from interface:GomEditorProviderReturns an iterable on all form elements within this provider.- Specified by:
formsin interfaceGomEditorProvider- Returns:
- A list of form elements, maybe empty.
-
setDefaults
Description copied from interface:GomEditorProviderSet the default values for all editors based on the given data.- Specified by:
setDefaultsin interfaceGomEditorProvider- Parameters:
data- The data providing default values.
-
setFormDefaults
Description copied from interface:GomEditorProviderSet the default values for all editors based on the given form data.- Specified by:
setFormDefaultsin interfaceGomEditorProvider- Parameters:
formData- The form data providing default values.
-
getMonoglotVariant
-
equals
- Specified by:
equalsin interfaceCollection<GomElement>- Specified by:
equalsin interfaceList<GomElement>- Overrides:
equalsin classAbstractList<GomElement>
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceCollection<GomElement>- Specified by:
hashCodein interfaceList<GomElement>- Overrides:
hashCodein classAbstractList<GomElement>
-
getGomElementMappings
Description copied from interface:GomListGet a list of mappings from tag name to class supported by this list.- Convention:
- The mapping shall only be created on demand and not change at runtime.
- Specified by:
getGomElementMappingsin interfaceGomList<GomElement>- Returns:
- The list of child tags.
-