public abstract class

PostRepositoryHookContext

extends RepositoryHookContext
java.lang.Object
   ↳ com.atlassian.bitbucket.hook.repository.RepositoryHookContext
     ↳ com.atlassian.bitbucket.hook.repository.PostRepositoryHookContext

Class Overview

RepositoryHookContext specialization that is provided to PostRepositoryHook hooks

Summary

Protected Constructors
PostRepositoryHookContext(Repository repository, Settings settings, boolean synchronous)
Public Methods
boolean isSynchronous()
abstract boolean registerCommitCallback(RepositoryHookCommitCallback callback, RepositoryHookCommitFilter filter, RepositoryHookCommitFilter... moreFilters)
Registers a callback to receive more information about commits added or removed.
[Expand]
Inherited Methods
From class com.atlassian.bitbucket.hook.repository.RepositoryHookContext
From class java.lang.Object

Protected Constructors

protected PostRepositoryHookContext (Repository repository, Settings settings, boolean synchronous)

Public Methods

public boolean isSynchronous ()

Returns
  • true if the hook is invoked synchronously, for instance as part of a StandardRepositoryHookTrigger#REPO_PUSH push to the repository. Only hooks annotated with SynchronousPreferred will be invoked synchronously.

public abstract boolean registerCommitCallback (RepositoryHookCommitCallback callback, RepositoryHookCommitFilter filter, RepositoryHookCommitFilter... moreFilters)

Registers a callback to receive more information about commits added or removed. See the documentation on RepositoryHookCommitCallback for details about when the callback methods are called.

Parameters
callback the callback
filter the type of commit details the callback is interested in
moreFilters other types of commit details the callback is interested in
Returns
  • true if the callback was successfully registered, otherwise false. If false is returned here, the callback will not be called