Package io.jenkins.plugins.bootstrap5
Class MessagesViewModel
java.lang.Object
io.jenkins.plugins.bootstrap5.MessagesViewModel
- All Implemented Interfaces:
ModelObject
A view model to visualize logging messages and errors of a build step.
- Author:
- Ullrich Hafner
-
Constructor Summary
ConstructorsConstructorDescriptionMessagesViewModel(Run<?, ?> owner, String displayName, List<String> infoMessages) Creates a newMessagesViewModelwith info messages only.MessagesViewModel(Run<?, ?> owner, String displayName, List<String> infoMessages, List<String> errorMessages) Creates a newMessagesViewModelwith error and info messages. -
Method Summary
-
Constructor Details
-
MessagesViewModel
Creates a newMessagesViewModelwith info messages only.- Parameters:
owner- current build as owner of this viewdisplayName- display name of the stepinfoMessages- 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 newMessagesViewModelwith error and info messages.- Parameters:
owner- current build as owner of this viewdisplayName- display name of the stepinfoMessages- all info messages that should be shown (should not be empty)errorMessages- all error messages that should be shown (might be empty)
-
-
Method Details
-
getOwner
Returns the build as owner of this view model.- Returns:
- the owner
-
getDisplayName
- Specified by:
getDisplayNamein interfaceModelObject
-
getInfoMessages
Returns the information messages of the step.- Returns:
- the information messages
-
getErrorMessages
Returns the error messages of the step.- Returns:
- the error messages
-
hasErrors
public boolean hasErrors()Returns whether error messages are present.- Returns:
trueif there are error messages,falseif there are only info messages
-