public abstract class

PreRepositoryHookContext

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

Class Overview

RepositoryHookContext specialization that is provided to PreRepositoryHook hooks

Summary

Protected Constructors
PreRepositoryHookContext(Repository repository, Settings settings)
Public Methods
abstract boolean registerCommitCallback(PreRepositoryHookCommitCallback 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 PreRepositoryHookContext (Repository repository, Settings settings)

Public Methods

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

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

Note: hooks may only register callbacks during preUpdate(PreRepositoryHookContext, RepositoryHookRequest). If a callback is registered at any other time, false is returned and the callback is ignored.

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