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
- Direct Known Subclasses:
GomButtonLangInfos,GomDateLangInfos,GomExpressionLangInfos,GomNumberLangInfos,GomValueLangInfos
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
FieldsModifier and TypeFieldDescriptionstatic final StringDefault tag for language information entry.static final StringTag for language information container.Fields inherited from class java.util.AbstractList
modCount -
Constructor Summary
ConstructorsConstructorDescriptionConstructor 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 StringProvides 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.voidvalidate(GomCheckable.Context context) Validate the element against the given context.voidverify()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, setIncludeConfigurationMethods 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, trimToSizeMethods inherited from class java.util.AbstractCollection
containsAll, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface de.espirit.firstspirit.access.store.templatestore.gom.GomElement
getGomElementTag, getIncludeConfiguration, hasRepresentation, setGomElementTag, setIncludeConfigurationMethods 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:
getDefaultTagin classAbstractGomList<GomLangInfo>- Returns:
- The tag.
- Since:
- 4.0.17
-
get
Provide the language information entry stored at the given index.- Specified by:
getin interfaceGomLangInfos- Specified by:
getin interfaceList<GomLangInfo>- Overrides:
getin 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:
getGomElementMappingsin interfaceGomList<GomLangInfo>- Overrides:
getGomElementMappingsin classAbstractGomList<GomLangInfo>- Returns:
- Entry type mapping.
- Since:
- 4.0
-
get
Provide the language information entry for the given language.- Specified by:
getin interfaceGomLangInfos- Parameters:
lang- The language abbreviation.- Returns:
- The according language information entry.
- Since:
- 4.0.17
-
verify
Check if the list is marked as mandatory (not inherited!) and not empty- Specified by:
verifyin interfaceGomCheckable- Overrides:
verifyin 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:
validatein 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.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:
resolvein interfaceGomLangInfos- Parameters:
lang- The language abbreviation.- Returns:
- A language information entry.
- Since:
- 4.0.17
-