Class CommitDiscussionCancelableCommentEvent
java.lang.Object
java.util.EventObject
com.atlassian.bitbucket.event.ApplicationEvent
com.atlassian.bitbucket.event.repository.RepositoryEvent
com.atlassian.bitbucket.event.commit.CommitDiscussionEvent
com.atlassian.bitbucket.event.commit.CommitDiscussionCommentEvent
com.atlassian.bitbucket.event.commit.CommitDiscussionCancelableCommentEvent
- All Implemented Interfaces:
CancelableEvent,CancelState,Serializable
- Direct Known Subclasses:
CommitDiscussionCommentAddRequestedEvent,CommitDiscussionCommentDeletionRequestedEvent,CommitDiscussionCommentModificationRequestedEvent,CommitDiscussionCommentReplyRequestedEvent
@TransactionAware(IMMEDIATE)
public abstract class CommitDiscussionCancelableCommentEvent
extends CommitDiscussionCommentEvent
implements CancelableEvent
Subclasses of this event are synchronous and allow callers to cancel the action and/or participate in the
transaction (by persisting related entities, for example).
- Since:
- 6.6
- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCommitDiscussionCancelableCommentEvent(Object source, CommitDiscussion discussion, Comment comment, Comment parent, CommentAction commentAction, CancelState cancelState) -
Method Summary
Modifier and TypeMethodDescriptionvoidcancel(KeyedMessage message) Cancels the operation, providing a message explaining why.booleanRetrieves a flag indicating whether the operation has been canceled.Methods inherited from class com.atlassian.bitbucket.event.commit.CommitDiscussionCommentEvent
getComment, getCommentAction, getParentMethods inherited from class com.atlassian.bitbucket.event.commit.CommitDiscussionEvent
getDiscussionMethods inherited from class com.atlassian.bitbucket.event.repository.RepositoryEvent
getRepositoryMethods inherited from class com.atlassian.bitbucket.event.ApplicationEvent
getDate, getUserMethods inherited from class java.util.EventObject
getSource, toString
-
Constructor Details
-
CommitDiscussionCancelableCommentEvent
protected CommitDiscussionCancelableCommentEvent(@Nonnull Object source, @Nonnull CommitDiscussion discussion, @Nonnull Comment comment, @Nullable Comment parent, @Nonnull CommentAction commentAction, @Nonnull CancelState cancelState)
-
-
Method Details
-
cancel
Description copied from interface:CancelStateCancels the operation, providing a message explaining why.The cancellation message is required, and should be as descriptive and clear as possible to allow end users to correct, if possible, the issue that triggered cancellation.
- Specified by:
cancelin interfaceCancelState- Parameters:
message- a descriptive message explaining why the operation has been canceled
-
isCanceled
public boolean isCanceled()Description copied from interface:CancelStateRetrieves a flag indicating whether the operation has been canceled.In situations where multiple observers have the option to cancel an operation, for example when multiple listeners receive the same
CancelableEvent, this flag can be useful for determining that another observer has already canceled the operation.- Specified by:
isCanceledin interfaceCancelState- Returns:
trueif the operation has beencanceled; otherwise,false
-