Interface ServiceMessageTranslator

    • Method Detail

      • translate

        @NotNull
        java.util.List<BuildMessage1> translate​(@NotNull
                                                SRunningBuild runningBuild,
                                                @NotNull
                                                BuildMessage1 originalMessage,
                                                @NotNull
                                                ServiceMessage serviceMessage)
                                         throws TranslateMessageException

        Called to translate service message to a number of usual messages.

        Note: no attempts should be made to use the build log from the running build to log some messages SBuild.getBuildLog(), instead the translator should return all the messages which should be inserted into the build log instead of the processed service message.

        Parameters:
        runningBuild - running build
        originalMessage - original message from which service message was created
        serviceMessage - service message
        Returns:
        a list of translated messages
        Throws:
        TranslateMessageException - since 2018.2, when there is a error translating the message or the message has an incorrect format
      • getServiceMessageName

        @NotNull
        java.lang.String getServiceMessageName()
        Returns name of the service message supported by this translator. Only service messages with such name will be passed to the translator.
        Returns:
        see above.
      • requireAttributes

        static void requireAttributes​(@NotNull
                                      ServiceMessage serviceMessage,
                                      java.lang.String... attributes)
                               throws TranslateMessageException
        Parameters:
        serviceMessage - service messages
        attributes - list of attributes which must be present in the service message
        Throws:
        TranslateMessageException
        Since:
        2019.1