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 TypeMethodDescriptionvoid
add
(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 GomFormElement
findEditor
(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 GomModule
Returns the brokergetUid()
Get the unique identifier of this provider.int
hashCode()
boolean
Indicates, 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) void
setDefaults
(Data data) Set the default values for all editors based on the given data.void
setFormDefaults
(@Nullable FormData formData) Set the default values for all editors based on the given form data.void
setGomElementTag
(@NotNull String name) Sets the tag name, the instance gets produced for.void
setIncludeConfiguration
(GomIncludeConfiguration includeConfiguration) Set the configuration for an included element.final void
setSpecialistsBroker
(@NotNull SpecialistsBroker specialistsBroker) Set the broker to be used by this employer.void
Set the unique identifier for this provider.int
size()
void
validate
(GomCheckable.Context context) Validate the element against the given context.void
verify()
Verify the element to be fulfill its syntactic constraints.static GomModule
with
(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, subList
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods 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:SpecialistsEmployer
Set the broker to be used by this employer.- Specified by:
setSpecialistsBroker
in interfaceSpecialistsEmployer
- Parameters:
specialistsBroker
- The specialists broker.
-
get
Description copied from interface:GomEditorProvider
Getter for GomElements.- Specified by:
get
in interfaceGomEditorProvider
- Specified by:
get
in interfaceList<GomElement>
- Specified by:
get
in classAbstractList<GomElement>
-
size
public int size()- Specified by:
size
in interfaceCollection<GomElement>
- Specified by:
size
in interfaceList<GomElement>
- Specified by:
size
in classAbstractCollection<GomElement>
-
set
- Specified by:
set
in interfaceList<GomElement>
- Overrides:
set
in classAbstractList<GomElement>
-
add
- Specified by:
add
in interfaceList<GomElement>
- Overrides:
add
in classAbstractList<GomElement>
-
remove
- Specified by:
remove
in interfaceList<GomElement>
- Overrides:
remove
in classAbstractList<GomElement>
-
getSpecialistsBroker
Returns the broker- Since:
- 4.2.105
-
getGomElementTag
Description copied from interface:GomElement
Get the tag name, the instance was produced for.- Specified by:
getGomElementTag
in interfaceGomElement
- Returns:
- The name of the tag.
-
setGomElementTag
Description copied from interface:GomElement
Sets the tag name, the instance gets produced for.- Specified by:
setGomElementTag
in interfaceGomElement
- Parameters:
name
- The name of the tag.
-
hasRepresentation
public boolean hasRepresentation()Description copied from interface:GomElement
Indicates, that the element has a representation to be displayed in a form.
A representation usually corresponds to a registered editor component.- Specified by:
hasRepresentation
in interfaceGomElement
- Returns:
true
, if a representation is available.
-
getUid
Description copied from interface:GomEditorProvider
Get the unique identifier of this provider.- Specified by:
getUid
in interfaceGomEditorProvider
- Returns:
- The provider's UID.
-
setUid
Description copied from interface:GomEditorProvider
Set the unique identifier for this provider.- Specified by:
setUid
in interfaceGomEditorProvider
- Parameters:
uid
- The identifier to be used for this provider.
-
getIncludeConfiguration
Description copied from interface:GomElement
Get the configuration, if this is an included element.- Specified by:
getIncludeConfiguration
in interfaceGomElement
- Returns:
- The configuration for including the element.
-
setIncludeConfiguration
Description copied from interface:GomElement
Set the configuration for an included element.- Specified by:
setIncludeConfiguration
in interfaceGomElement
- Parameters:
includeConfiguration
- The configuration to set.
-
verify
Description copied from interface:GomCheckable
Verify the element to be fulfill its syntactic constraints.- Specified by:
verify
in interfaceGomCheckable
- Throws:
IllegalStateException
- If the element is not correctly set up.
-
validate
Description copied from interface:GomCheckable
Validate the element against the given context.- Specified by:
validate
in 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:GomEditorProvider
Look up a GOM editor element within this provider.- Specified by:
findEditor
in interfaceGomEditorProvider
- Parameters:
name
- The name of the editor.- Returns:
- The matching editor or
null
.
-
appendEditorNames
Description copied from interface:GomEditorProvider
Append the names of all local and children's editors to the given list of names and return the list. Ifnames
isnull
, returns a new list.- Specified by:
appendEditorNames
in interfaceGomEditorProvider
- Parameters:
names
- A list of names or null.- Returns:
- The list of editor names, maybe empty.
-
forms
Description copied from interface:GomEditorProvider
Returns an iterable on all form elements within this provider.- Specified by:
forms
in interfaceGomEditorProvider
- Returns:
- A list of form elements, maybe empty.
-
setDefaults
Description copied from interface:GomEditorProvider
Set the default values for all editors based on the given data.- Specified by:
setDefaults
in interfaceGomEditorProvider
- Parameters:
data
- The data providing default values.
-
setFormDefaults
Description copied from interface:GomEditorProvider
Set the default values for all editors based on the given form data.- Specified by:
setFormDefaults
in interfaceGomEditorProvider
- Parameters:
formData
- The form data providing default values.
-
getMonoglotVariant
-
equals
- Specified by:
equals
in interfaceCollection<GomElement>
- Specified by:
equals
in interfaceList<GomElement>
- Overrides:
equals
in classAbstractList<GomElement>
-
hashCode
public int hashCode()- Specified by:
hashCode
in interfaceCollection<GomElement>
- Specified by:
hashCode
in interfaceList<GomElement>
- Overrides:
hashCode
in classAbstractList<GomElement>
-
getGomElementMappings
Description copied from interface:GomList
Get 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:
getGomElementMappings
in interfaceGomList<GomElement>
- Returns:
- The list of child tags.
-