com.atlassian.crowd.manager.webhook
Class WebhookRegistryImpl

java.lang.Object
  extended by com.atlassian.crowd.manager.webhook.WebhookRegistryImpl
All Implemented Interfaces:
WebhookRegistry

@Transactional
public class WebhookRegistryImpl
extends Object
implements WebhookRegistry

A manager for Webhooks

Since:
v2.7

Constructor Summary
WebhookRegistryImpl(WebhookDAO webhookDAO)
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebhookRegistryImpl

public WebhookRegistryImpl(WebhookDAO webhookDAO)
Method Detail

add

public Webhook add(Webhook webhook)
Description copied from interface: WebhookRegistry
Adds a new Webhook, if it does not exist previously.

Specified by:
add in interface WebhookRegistry
Returns:
the new Webhook, or the existing one, if a Webhook for the same application and endpoint was previously registered.

remove

public void remove(Webhook webhook)
            throws WebhookNotFoundException
Specified by:
remove in interface WebhookRegistry
Throws:
WebhookNotFoundException

findById

public Webhook findById(long webhookId)
                 throws WebhookNotFoundException
Specified by:
findById in interface WebhookRegistry
Throws:
WebhookNotFoundException

findAll

public Iterable<Webhook> findAll()
Specified by:
findAll in interface WebhookRegistry

update

public Webhook update(Webhook webhook)
               throws WebhookNotFoundException
Description copied from interface: WebhookRegistry
Updates an existing Webhook.

Specified by:
update in interface WebhookRegistry
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 © 2013 Atlassian. All Rights Reserved.