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 boolean
equals(Object o)
String
getShortDescription()
Human readable description of why the build is cancelled.User
getUser()
Gets user, who caused the interruption.String
getUserId()
Gets ID of the user, who interrupted the build.User
getUserOrNull()
Gets user, who caused the interruption.int
hashCode()
void
print(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
null
if it has not been found - Since:
- 2.31
-
getShortDescription
public String getShortDescription()
Description copied from class:CauseOfInterruption
Human readable description of why the build is cancelled.- Specified by:
getShortDescription
in classCauseOfInterruption
-
print
public void print(TaskListener listener)
Description copied from class:CauseOfInterruption
Report a line to the listener about this cause.- Overrides:
print
in classCauseOfInterruption
-
-