public class

RepositoryForkRequestedEvent

extends RepositoryCreationRequestedEvent
java.lang.Object
   ↳ java.util.EventObject
     ↳ com.atlassian.bitbucket.event.ApplicationEvent
       ↳ com.atlassian.bitbucket.event.repository.RepositoryEvent
         ↳ com.atlassian.bitbucket.event.repository.RepositoryCreationRequestedEvent
           ↳ com.atlassian.bitbucket.event.repository.RepositoryForkRequestedEvent

Class Overview

Raised just before a repository is forked. This event is synchronous, allowing listeners to perform operations in the same database transaction where the forked repository will be created.

The repository attached to the event is the fork to be created. Its origin provides the repository that will be forked to create it. Note that forks can be created in the same project as their origin or in different one, so the projects for the fork and its origin may or may not be the same.

This event is cancelable. A listener may prevent the repository from being forked by canceling this event. Throwing an exception will not prevent the repository from being forked; the exception will be logged and ignored.

Note: The repository attached to the event will not have an ID, as it has not been created yet, but it will have its origin repository available. Any listener which would like to create associations based on the repository ID must listen for the RepositoryForkedEvent instead, which will include it (but will not run in the same transaction).

Summary

[Expand]
Inherited Fields
From class java.util.EventObject
Public Constructors
RepositoryForkRequestedEvent(Object source, Repository repository, CancelState cancelState)
[Expand]
Inherited Methods
From class com.atlassian.bitbucket.event.repository.RepositoryCreationRequestedEvent
From class com.atlassian.bitbucket.event.repository.RepositoryEvent
From class com.atlassian.bitbucket.event.ApplicationEvent
From class java.util.EventObject
From class java.lang.Object
From interface com.atlassian.bitbucket.util.CancelState

Public Constructors

public RepositoryForkRequestedEvent (Object source, Repository repository, CancelState cancelState)