Class LocalisedCheckReport.LocalisedReportEntry

    • Field Detail

      • localisedMessage

        protected final Map<Locale,​String> localisedMessage
        The localised message of this report entry.
    • Constructor Detail

      • 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 report
        checkID - the check which created the entry
        reportEntryType - the type of the entry
        defaultMessage - 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 Detail

      • getAllMessages

        public Map<Locale,​String> getAllMessages()
        Gets the localised message(s) for all (preferred) locales. This does not consider fallback locales. You should usually use getMessage(Locale) or getMessage(Collection).
        Returns:
        The localised message(s) for all (preferred) locales.
      • getMessage

        public String getMessage​(Locale locale)
        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

        public String getMessage​(Collection<Locale> locales)
        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.