Class LocalisedCheckReport.LocalisedReportEntry
java.lang.Object
de.aristaflow.adept2.util.CheckReport.ReportEntry
de.aristaflow.adept2.model.common.LocalisedCheckReport.LocalisedReportEntry
- All Implemented Interfaces:
Serializable
- Enclosing class:
- LocalisedCheckReport
A report entry extension providing localised messages.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe localised message of this report entry. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedLocalisedReportEntry(int entryNumber, String checkID, CheckReport.ResultType reportEntryType, String defaultMessage, Map<Locale, String> localisedMessage, URI... affectedElements) Constructs the report entry with the designated parameters. -
Method Summary
Modifier and TypeMethodDescriptionGets the localised message(s) for all (preferred) locales.getMessage(Collection<Locale> locales) Gets the localised message of the check report entry corresponding to the designated locales preferring previous locales.getMessage(Locale locale) Gets the localised message of the check report entry corresponding to the designated locale or one of its fallback.Methods inherited from class de.aristaflow.adept2.util.CheckReport.ReportEntry
getAffectedADEPT2ProcessElements, getCheckID, getEntryNumber, getMessage, getReportEntryType
-
Field Details
-
localisedMessage
The localised message of this report entry.
-
-
Constructor Details
-
LocalisedReportEntry
protected LocalisedReportEntry(int entryNumber, String checkID, CheckReport.ResultType reportEntryType, String defaultMessage, Map<Locale, String> localisedMessage, URI... affectedElements) Constructs the report entry with the designated parameters.- Parameters:
entryNumber- the number of this entry in the reportcheckID- the check which created the entryreportEntryType- the type of the entrydefaultMessage- The default message used if no corresponding localisation is found.localisedMessage- The localised message for the corresponding locale. This should contain all preferred locales (or at least the corresponding fallbacks) of the check report.affectedElements- the process elements affected by this entry
-
-
Method Details
-
getAllMessages
Gets the localised message(s) for all (preferred) locales. This does not consider fallback locales. You should usually usegetMessage(Locale)orgetMessage(Collection).- Returns:
- The localised message(s) for all (preferred) locales.
-
getMessage
Gets the localised message of the check report entry corresponding to the designated locale or one of its fallback.- Parameters:
locale- The locale for which to get the message of the check report entry.- Returns:
- The localised message of the check report entry.
-
getMessage
Gets the localised message of the check report entry corresponding to the designated locales preferring previous locales.- Parameters:
locales- The locales for which to get the message of the check report entry with the first locale having the highest priority and the last locale the least priority.- Returns:
- The localised message of the check report entry.
-