Class NotificationResult
java.lang.Object
org.jenkinsci.plugins.stashNotifier.NotificationResult
convenience class to capture the result of a notification.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal boolean
true if and only if the notification was successful.final String
the error message in case the notification was not successful or null, otherwise. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
NotificationResult
(boolean initSuccess, String initMessage) default constructor -
Method Summary
Modifier and TypeMethodDescriptionstatic NotificationResult
newFailure
(String message) returns a new NotificationResult instance indicating a failed notification.static NotificationResult
returns a new NotificationResult instance indicating a successful notification.
-
Field Details
-
indicatesSuccess
public final boolean indicatesSuccesstrue if and only if the notification was successful. -
message
the error message in case the notification was not successful or null, otherwise.
-
-
Constructor Details
-
NotificationResult
default constructor- Parameters:
initSuccess
- success flaginitMessage
- message in case notification was not successful
-
-
Method Details
-
newSuccess
returns a new NotificationResult instance indicating a successful notification.- Returns:
- a new NotificationResult instance indicating a successful notification
-
newFailure
returns a new NotificationResult instance indicating a failed notification.- Parameters:
message
- the message indicating why the notification failed- Returns:
- a new NotificationResult instance indicating a successful notification
-