com.atlassian.crowd.manager.webhook
Interface WebhookRegistry


public interface WebhookRegistry

A service interface that provides persistence for Webhooks.

Since:
v2.7

Method Summary
 Webhook add(Webhook webhook)
          Adds a new Webhook, if it does not exist previously.
 Iterable<Webhook> findAll()
           
 Webhook findById(long webhookId)
           
 void remove(Webhook webhook)
           
 Webhook update(Webhook webhook)
          Updates an existing Webhook.
 

Method Detail

add

Webhook add(Webhook webhook)
Adds a new Webhook, if it does not exist previously.

Parameters:
webhook -
Returns:
the new Webhook, or the existing one, if a Webhook for the same application and endpoint was previously registered.

remove

void remove(Webhook webhook)
            throws WebhookNotFoundException
Throws:
WebhookNotFoundException

findById

Webhook findById(long webhookId)
                 throws WebhookNotFoundException
Throws:
WebhookNotFoundException

findAll

Iterable<Webhook> findAll()

update

Webhook update(Webhook webhook)
               throws WebhookNotFoundException
Updates an existing Webhook.

Parameters:
webhook - a template to modify an existing Webhook. Must have an ID.
Returns:
the saved Webhook.
Throws:
WebhookNotFoundException - if there is not any Webhook with the ID of the template.


Copyright © 2014 Atlassian. All Rights Reserved.