| com.atlassian.bitbucket.hook.repository.RepositoryHookService |
Handles the aggregation of hooks and their enabled status. Settings for these hooks are handled elsewhere.
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Create a new
SettingsBuilder which can be used to create a Settings instance. | |||||||||||
Disable the hook identified by the supplied key for the specified repository.
| |||||||||||
Enable the hook identified by the supplied key for the specified repository.
| |||||||||||
Enable the hook identified by the supplied key for the specified repository and apply the new settings.
| |||||||||||
Find all installed hooks of the specified repository with their enabled status.
| |||||||||||
Find all installed hooks of the specified
RepositoryHookType with enabled status for this repository | |||||||||||
Returns a supplier of an avatar for this hook, either one specified in the module or a default.
| |||||||||||
Find an installed hook with the specified key enabled status for this repository
| |||||||||||
Gets the settings for the specified hook and repository.
| |||||||||||
Sets the settings for the specified hook and repository.
| |||||||||||
Create a new SettingsBuilder which can be used to create a Settings instance.
Disable the hook identified by the supplied key for the specified repository.
| repository | the repository this hook is being disabled on |
|---|---|
| hookKey | the hook to be disabled |
RepositoryHook
Enable the hook identified by the supplied key for the specified repository.
| repository | the repository this hook is being enabled on |
|---|---|
| hookKey | the hook to be enabled |
RepositoryHook
Enable the hook identified by the supplied key for the specified repository and apply the new settings.
This is a convenient method which performs enable(Repository, String)
and setSettings(Repository, String, Settings) in the same transaction
| repository | the repository this hook is being enabled on |
|---|---|
| hookKey | the hook to be enabled |
| settings | the new settings. |
RepositoryHook| FormValidationException | when settings are invalid, leaving the existing version unchanged |
|---|---|
| ArgumentValidationException | if the settings to be saved are too large, the current limit is 32KB once serialized. |
Find all installed hooks of the specified repository with their enabled status.
| repository | the repository to load the hook from |
|---|---|
| pageRequest | paging options |
RepositoryHooks matching the supplied type
Find all installed hooks of the specified RepositoryHookType with enabled status for this repository
| repository | the repository to load the hook from |
|---|---|
| type | the type of hooks to be looked for |
| pageRequest | paging options |
RepositoryHooks matching the supplied type
Returns a supplier of an avatar for this hook, either one specified in the module or a default.
| hookKey | the hook key with the desired avatar |
|---|
Find an installed hook with the specified key enabled status for this repository
| repository | the repository to load the hook from |
|---|---|
| hookKey | the hook to lookup |
RepositoryHook if found. Otherwise null.
Gets the settings for the specified hook and repository.
| repository | the repository the settings apply to. |
|---|---|
| hookKey | the complete module key of the hook which the settings are associated with. |
null if no settings are stored.
Sets the settings for the specified hook and repository.
| repository | the repository the settings apply to. |
|---|---|
| hookKey | the complete module key of the hook which the settings are associated with. |
| settings | the new settings to save |
| FormValidationException | when settings are invalid, leaving the existing version unchanged |
|---|---|
| ArgumentValidationException | if the settings to be saved are too large, the current limit is 32KB once serialized. |