public static class LocalisedCheckReport.LocalisedReportEntry extends CheckReport.ReportEntry
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<java.util.Locale,java.lang.String> |
localisedMessage
The localised message of this report entry.
|
| Modifier | Constructor and Description |
|---|---|
protected |
LocalisedReportEntry(int entryNumber,
java.lang.String checkID,
CheckReport.ResultType reportEntryType,
java.lang.String defaultMessage,
java.util.Map<java.util.Locale,java.lang.String> localisedMessage,
java.net.URI... affectedElements)
Constructs the report entry with the designated parameters.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<java.util.Locale,java.lang.String> |
getAllMessages()
Gets the localised message(s) for all (preferred) locales.
|
java.lang.String |
getMessage(java.util.Collection<java.util.Locale> locales)
Gets the localised message of the check report entry corresponding to the designated locales
preferring previous locales.
|
java.lang.String |
getMessage(java.util.Locale locale)
Gets the localised message of the check report entry corresponding to the designated locale
or one of its fallback.
|
getAffectedADEPT2ProcessElements, getCheckID, getEntryNumber, getMessage, getReportEntryTypeprotected final java.util.Map<java.util.Locale,java.lang.String> localisedMessage
protected LocalisedReportEntry(int entryNumber,
java.lang.String checkID,
CheckReport.ResultType reportEntryType,
java.lang.String defaultMessage,
java.util.Map<java.util.Locale,java.lang.String> localisedMessage,
java.net.URI... affectedElements)
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 entrypublic java.util.Map<java.util.Locale,java.lang.String> getAllMessages()
getMessage(Locale) or
getMessage(Collection).public java.lang.String getMessage(java.util.Locale locale)
locale - The locale for which to get the message of the check report entry.public java.lang.String getMessage(java.util.Collection<java.util.Locale> locales)
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.