Class DataItem
java.lang.Object
de.rpgframework.genericrpg.data.DataItem
- Direct Known Subclasses:
ASkillGroup,ComplexDataItem,Module,RuleInterpretation
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringAn identifier within typeprotected StringDefines if this DataItem is only to be used for this language.protected static final System.Loggerprotected DataItemprotected List<PageReference> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLanguageAlternative(String lang, DataItem alt) voidassignToDataSet(DataSet set) Use getDescription(Locale)getDescription(Locale locale) getFirstParent(Locale locale) getId()<T extends DataItem>
TgetLanguageAlternative(String lang) getLocalizedString(Locale locale, String key) getLocalizedString(Locale locale, List<String> keys) getName()Use getName(Locale)getResource(String name) getShortName(Locale locale) booleanhasLanguageAlternative(String lang) booleanbooleanhasLicense(Locale locale) booleaninDataSets(Collection<DataSet> sets) static <T extends DataItem>
BinaryOperator<T> voidvoidsetParentItem(DataItem parentItem) Erstellt einen Collector, der direkt eine Liste zurückgibt mit den optimalen DataItems (bevorzugt solche mit einer Locale).toString()voidvalidate()Used in deriving classes to perform validation checks on loading, if necessary
-
Field Details
-
logger
-
parentSet
-
id
An identifier within type -
lang
Defines if this DataItem is only to be used for this language. This helps to model situations when there is a default and a deviant definition for a different language -
parentItem
-
datasets
-
languageAlternatives
-
-
Constructor Details
-
DataItem
protected DataItem()
-
-
Method Details
-
preferWithLocale
-
toListPreferringLocale
-
assignToDataSet
-
getAssignedDataSets
-
inDataSets
-
getTypeString
-
getId
-
setId
-
toString
-
getName
Use getName(Locale) -
setParentItem
-
getFirstParent
-
getLocalizedString
-
getResource
-
getLocalizedString
-
getName
-
getShortName
-
getDescription
Use getDescription(Locale) -
hasLicense
public boolean hasLicense() -
hasLicense
-
getDescription
-
getLanguage
-
validate
Used in deriving classes to perform validation checks on loading, if necessary- Throws:
DataErrorException
-
getPageReferences
- Returns:
- the parentSet
-
addLanguageAlternative
-
hasLanguageAlternative
-
getLanguageAlternative
-
getLanguageAlternatives
-