public abstract class

AbstractRepositoryHookRequest

extends Object
implements RepositoryHookRequest
java.lang.Object
   ↳ com.atlassian.bitbucket.hook.repository.AbstractRepositoryHookRequest
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

Base class for the various RepositoryHookRequests. Plugins that want to invoke pre-hooks or post-hooks with a custom request type can use this class as a base class to provide the common request attributes.

Summary

Nested Classes
class AbstractRepositoryHookRequest.AbstractBuilder<B extends AbstractBuilder<B>>  
Protected Constructors
AbstractRepositoryHookRequest(AbstractBuilder<?> builder)
Public Methods
@Nonnull Map<String, Object> getContext()
Retrieves any additional context that was supplied to the request.
@Nonnull Collection<RefChange> getRefChanges()
@Nonnull Repository getRepository()
@Nonnull Optional<ScmHookDetails> getScmHookDetails()
@Nonnull RepositoryHookTrigger getTrigger()
boolean isDryRun()
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.bitbucket.hook.repository.RepositoryHookRequest

Protected Constructors

protected AbstractRepositoryHookRequest (AbstractBuilder<?> builder)

Public Methods

@Nonnull public Map<String, Object> getContext ()

Retrieves any additional context that was supplied to the request. This context is intended to allow plugin developers to implement their own behavior around ref-changes. As a result, its contents are unspecified; they depend on the installed plugins.

On dry runs, the context will always be empty.

Returns
  • additional context provided when the ref-change was requested, if any

@Nonnull public Collection<RefChange> getRefChanges ()

@Nonnull public Repository getRepository ()

@Nonnull public Optional<ScmHookDetails> getScmHookDetails ()

@Nonnull public RepositoryHookTrigger getTrigger ()

public boolean isDryRun ()