Class GomTypeRestrictedTemplates
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<T>
de.espirit.firstspirit.access.store.templatestore.gom.AbstractGomList<GomUidEntry>
de.espirit.firstspirit.access.store.templatestore.gom.lists.GomTypeRestrictedTemplates
- All Implemented Interfaces:
GomCheckable
,GomElement
,GomList<GomUidEntry>
,GomUidTypeProviding
,Serializable
,Cloneable
,Iterable<GomUidEntry>
,Collection<GomUidEntry>
,List<GomUidEntry>
,RandomAccess
public final class GomTypeRestrictedTemplates
extends AbstractGomList<GomUidEntry>
implements GomCheckable, GomUidTypeProviding
Template restriction definition container for list components.
- Since:
- 5.2.6
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Types of templates.Nested classes/interfaces inherited from interface de.espirit.firstspirit.access.store.templatestore.gom.GomCheckable
GomCheckable.Context
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The single template entry tag.static final String
The standard templates tag.Fields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionConvenience method providing defined templates as set of uids.protected String
Returns the default tag name of the component.Map<String,
Class<? extends GomElement>> Get a list of mappings from tag name to class supported by this list.getType()
Provides the type of templates allowed.TheIDProvider.UidType
of the references contained.void
Set the type of allowed templates.toString()
void
validate
(GomCheckable.Context context) Validate the element against the given context.void
verify()
Check if the list is marked as mandatory (not inherited!)Methods inherited from class de.espirit.firstspirit.access.store.templatestore.gom.AbstractGomList
getGomElementTag, getIncludeConfiguration, hasRepresentation, setGomElementTag, setIncludeConfiguration
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
Methods inherited from class java.util.AbstractCollection
containsAll
Methods inherited from class java.lang.Object
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, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
-
Field Details
-
TAG
The standard templates tag.- Since:
- 5.2.6
- See Also:
-
ENTRY_TAG
The single template entry tag.- Since:
- 5.2.6
- See Also:
-
-
Constructor Details
-
GomTypeRestrictedTemplates
public GomTypeRestrictedTemplates()
-
-
Method Details
-
getDefaultTag
Returns the default tag name of the component.- Specified by:
getDefaultTag
in classAbstractGomList<GomUidEntry>
- Since:
- 5.2.6
-
getGomElementMappings
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<GomUidEntry>
- Overrides:
getGomElementMappings
in classAbstractGomList<GomUidEntry>
- Returns:
- The list of child tags.
- Since:
- 5.2.6
-
getType
Provides the type of templates allowed.- Returns:
- The type of templates.
- Since:
- 5.2.6
-
getUidType
Description copied from interface:GomUidTypeProviding
TheIDProvider.UidType
of the references contained.- Specified by:
getUidType
in interfaceGomUidTypeProviding
- Returns:
- The associated uid type.
-
setType
Set the type of allowed templates.- Parameters:
type
- The type.- Since:
- 5.2.6
-
asNameSet
Convenience method providing defined templates as set of uids.- Returns:
- A set of uids.
- Since:
- 5.2.6
-
verify
Check if the list is marked as mandatory (not inherited!) and not empty- Specified by:
verify
in interfaceGomCheckable
- Overrides:
verify
in classAbstractGomList<GomUidEntry>
- Throws:
IllegalStateException
- If the element is not correctly set up.- Since:
- 5.2.6
-
validate
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.- Since:
- 5.2.6
-
toString
- Overrides:
toString
in classAbstractCollection<GomUidEntry>
- Since:
- 5.2.6
-