Package jenkins.model
Class CauseOfInterruption.UserInterruption
- java.lang.Object
-
- jenkins.model.CauseOfInterruption
-
- jenkins.model.CauseOfInterruption.UserInterruption
-
- All Implemented Interfaces:
Serializable
- Enclosing class:
- CauseOfInterruption
public static final class CauseOfInterruption.UserInterruption extends CauseOfInterruption
Indicates that the build was interrupted from UI.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class jenkins.model.CauseOfInterruption
CauseOfInterruption.UserInterruption
-
-
Constructor Summary
Constructors Constructor Description UserInterruption(User user)UserInterruption(String userId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)StringgetShortDescription()Human readable description of why the build is cancelled.UsergetUser()Gets user, who caused the interruption.StringgetUserId()Gets ID of the user, who interrupted the build.UsergetUserOrNull()Gets user, who caused the interruption.inthashCode()voidprint(TaskListener listener)Report a line to the listener about this cause.
-
-
-
Method Detail
-
getUserId
@NonNull public String getUserId()
Gets ID of the user, who interrupted the build.- Returns:
- User ID
- Since:
- 2.31
-
getUser
@NonNull public User getUser()
Gets user, who caused the interruption.- Returns:
- User instance if it can be located.
Result of
User.getUnknown()otherwise
-
getUserOrNull
@CheckForNull public User getUserOrNull()
Gets user, who caused the interruption.- Returns:
- User or
nullif it has not been found - Since:
- 2.31
-
getShortDescription
public String getShortDescription()
Description copied from class:CauseOfInterruptionHuman readable description of why the build is cancelled.- Specified by:
getShortDescriptionin classCauseOfInterruption
-
print
public void print(TaskListener listener)
Description copied from class:CauseOfInterruptionReport a line to the listener about this cause.- Overrides:
printin classCauseOfInterruption
-
-