@TransactionAware(value=IMMEDIATE) public class PullRequestDeletionRequestedEvent extends PullRequestEvent implements CancelableEvent
pull request
is deleted
. This event is
synchronous, allowing listeners to perform operations in the same database transaction where the pull request
will be deleted.
This event is cancelable
. A listener may prevent the pull request from being deleted by
canceling
this event. Throwing an exception will not prevent the pull request
from being deleted; the exception will be logged and ignored.
PullRequestService.delete(PullRequestDeleteRequest)
,
Serialized Formsource
Constructor and Description |
---|
PullRequestDeletionRequestedEvent(Object source,
PullRequest pullRequest,
CancelState cancelState) |
Modifier and Type | Method and Description |
---|---|
void |
cancel(KeyedMessage message)
Cancels pull request deletion, providing a message explaining why.
|
boolean |
isCanceled()
Retrieves a flag indicating whether pull request creation has already been canceled by another listener.
|
getAction, getPullRequest
getDate, getUser
getSource, toString
public PullRequestDeletionRequestedEvent(@Nonnull Object source, @Nonnull PullRequest pullRequest, @Nonnull CancelState cancelState)
public void cancel(@Nonnull KeyedMessage message)
cancel
in interface CancelState
message
- a descriptive message explaining why the operation has been canceledpublic boolean isCanceled()
isCanceled
in interface CancelState
true
if another listener has already canceled pull request creation; otherwise, false
Copyright © 2019 Atlassian. All rights reserved.