Class RepositoryDeletionRequestedEvent
java.lang.Object
java.util.EventObject
com.atlassian.bitbucket.event.ApplicationEvent
com.atlassian.bitbucket.event.repository.RepositoryEvent
com.atlassian.bitbucket.event.repository.RepositoryDeletionRequestedEvent
- All Implemented Interfaces:
- CancelableEvent,- CancelState,- Serializable
Raised just before a 
repository is deleted. This event is synchronous, allowing listeners to
 perform clean up in the same database transaction where the repository will be deleted.
 
 This event is cancelable. A listener may prevent the repository from being deleted by
 canceling this event. Throwing an exception will not
 prevent the repository from being deleted; the exception will be logged and ignored.
- See Also:
- 
Field SummaryFields inherited from class java.util.EventObjectsource
- 
Constructor SummaryConstructorsConstructorDescriptionRepositoryDeletionRequestedEvent(Object source, Repository repository, CancelState cancelState, Iterable<Integer> forkIds) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidcancel(KeyedMessage message) Cancels repository deletion, providing a message explaining why.booleanRetrieves a flag indicating whether repository deletion has already been canceled by another listener.Methods inherited from class com.atlassian.bitbucket.event.repository.RepositoryEventgetRepositoryMethods inherited from class com.atlassian.bitbucket.event.ApplicationEventgetDate, getUserMethods inherited from class java.util.EventObjectgetSource, toString
- 
Constructor Details- 
RepositoryDeletionRequestedEventpublic RepositoryDeletionRequestedEvent(@Nonnull Object source, @Nonnull Repository repository, @Nonnull CancelState cancelState, @Nonnull Iterable<Integer> forkIds) - Parameters:
- source- the object on which the event initially occurred
- repository- repository that was deleted
- cancelState- the cancel state
- forkIds- IDs of forks
- Since:
- 5.6
 
 
- 
- 
Method Details- 
cancelCancels repository deletion, providing a message explaining why.- Specified by:
- cancelin interface- CancelState
- Parameters:
- message- a descriptive message explaining why the operation has been canceled
 
- 
isCanceledpublic boolean isCanceled()Retrieves a flag indicating whether repository deletion has already been canceled by another listener.- Specified by:
- isCanceledin interface- CancelState
- Returns:
- trueif another listener has already canceled repository deletion; otherwise,- false
 
- 
getForkIds- Returns:
- the IDs of all repositories that are forks of the repository being deleted
- Since:
- 8.0
 
 
-