Klasse MessagesViewModel

java.lang.Object
io.jenkins.plugins.bootstrap5.MessagesViewModel
Alle implementierten Schnittstellen:
ModelObject

public class MessagesViewModel extends Object implements ModelObject
A view model to visualize logging messages and errors of a build step.
Autor:
Ullrich Hafner
  • Konstruktordetails

    • MessagesViewModel

      public MessagesViewModel(Run<?,?> owner, String displayName, List<String> infoMessages)
      Creates a new MessagesViewModel with info messages only.
      Parameter:
      owner - current build as owner of this view
      displayName - display name of the step
      infoMessages - all info messages that should be shown (should not be empty)
    • MessagesViewModel

      public MessagesViewModel(Run<?,?> owner, String displayName, List<String> infoMessages, List<String> errorMessages)
      Creates a new MessagesViewModel with error and info messages.
      Parameter:
      owner - current build as owner of this view
      displayName - display name of the step
      infoMessages - all info messages that should be shown (should not be empty)
      errorMessages - all error messages that should be shown (might be empty)
  • Methodendetails

    • getOwner

      public final Run<?,?> getOwner()
      Returns the build as owner of this view model.
      Gibt zurück:
      the owner
    • getDisplayName

      public String getDisplayName()
      Angegeben von:
      getDisplayName in Schnittstelle ModelObject
    • getInfoMessages

      public Collection<String> getInfoMessages()
      Returns the information messages of the step.
      Gibt zurück:
      the information messages
    • getErrorMessages

      public Collection<String> getErrorMessages()
      Returns the error messages of the step.
      Gibt zurück:
      the error messages
    • hasErrors

      public boolean hasErrors()
      Returns whether error messages are present.
      Gibt zurück:
      true if there are error messages, false if there are only info messages