Class DefaultGomLangInfos
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<T>
de.espirit.firstspirit.access.store.templatestore.gom.AbstractGomList<GomLangInfo>
de.espirit.firstspirit.access.store.templatestore.gom.DefaultGomLangInfos
- All Implemented Interfaces:
GomCheckable
,GomElement
,GomLangInfos
,GomList<GomLangInfo>
,Serializable
,Cloneable
,Iterable<GomLangInfo>
,Collection<GomLangInfo>
,List<GomLangInfo>
,RandomAccess
public class DefaultGomLangInfos
extends AbstractGomList<GomLangInfo>
implements GomLangInfos, GomCheckable
Generic implementation for GOM language information container.
- 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
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Default tag for language information entry.static final String
Tag for language information container.Fields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
ConstructorDescriptionConstructor defining the default language information entry type.DefaultGomLangInfos
(Class<? extends GomLangInfo> langInfoClass) Constructor defining the concrete language information entry type. -
Method Summary
Modifier and TypeMethodDescriptionget
(int index) Provide the language information entry stored at the given index.Provide the language information entry for the given language.protected String
Provides the default tag.Map<String,
Class<? extends GomElement>> Provides the mapping of tag names to entry types.Resolves the language information entry to be used for the given language.void
validate
(GomCheckable.Context context) Validate the element against the given context.void
verify()
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, 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, toString
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 de.espirit.firstspirit.access.store.templatestore.gom.GomElement
getGomElementTag, getIncludeConfiguration, hasRepresentation, setGomElementTag, setIncludeConfiguration
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
-
Field Details
-
TAG
Tag for language information container.- Since:
- 4.0.17
- See Also:
-
ENTRY_TAG
Default tag for language information entry.- Since:
- 4.0.17
- See Also:
-
-
Constructor Details
-
DefaultGomLangInfos
Constructor defining the concrete language information entry type.- Parameters:
langInfoClass
- The language information type.- Since:
- 4.0.17
-
DefaultGomLangInfos
public DefaultGomLangInfos()Constructor defining the default language information entry type.- Since:
- 4.0.17
-
-
Method Details
-
getDefaultTag
Provides the default tag.- Specified by:
getDefaultTag
in classAbstractGomList<GomLangInfo>
- Returns:
- The tag.
- Since:
- 4.0.17
-
get
Provide the language information entry stored at the given index.- Specified by:
get
in interfaceGomLangInfos
- Specified by:
get
in interfaceList<GomLangInfo>
- Overrides:
get
in classArrayList<GomLangInfo>
- Parameters:
index
- The index to look up.- Returns:
- The language information entry.
- Since:
- 4.0.17
-
getGomElementMappings
Provides the mapping of tag names to entry types.- Specified by:
getGomElementMappings
in interfaceGomList<GomLangInfo>
- Overrides:
getGomElementMappings
in classAbstractGomList<GomLangInfo>
- Returns:
- Entry type mapping.
- Since:
- 4.0
-
get
Provide the language information entry for the given language.- Specified by:
get
in interfaceGomLangInfos
- Parameters:
lang
- The language abbreviation.- Returns:
- The according language information entry.
- Since:
- 4.0.17
-
verify
- Specified by:
verify
in interfaceGomCheckable
- Overrides:
verify
in classAbstractGomList<GomLangInfo>
- Throws:
IllegalStateException
- If the element is not correctly set up.- Since:
- 5.2.21
-
validate
Validate the element against the given context.- Specified by:
validate
in interfaceGomCheckable
- Parameters:
context
- The context to validate for.- Throws:
GomValidationError
- If the element is not plausible wrt. its context.- Since:
- 5.2.21
-
resolve
Resolves the language information entry to be used for the given language. Information not stored for the requested language will be completed with information from the fallback entry.- Specified by:
resolve
in interfaceGomLangInfos
- Parameters:
lang
- The language abbreviation.- Returns:
- A language information entry.
- Since:
- 4.0.17
-