Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.lyo.server.oauth.core.consumer
Interface ConsumerStore

All Known Implementing Classes:
  AbstractConsumerStore, FileSystemConsumerStore, RdfConsumerStore

    public interface ConsumerStore

Manages persistence of OAuth consumers.

Author:
  Samuel Padgett

Method Summary
`LyoOAuthConsumer` | `addConsumer(LyoOAuthConsumer consumer)` Adds a new consumer.
`void` | `closeConsumerStore()` Closes the consumer store.
`Collection<LyoOAuthConsumer>` | `getAllConsumers()` Gets all OAuth consumers.
`LyoOAuthConsumer` | `getConsumer(net.oauth.OAuthMessage requestMessage)` Gets the consumer for this message.
`LyoOAuthConsumer` | `getConsumer(String consumerKey)` Gets the consumer for a key.
`LyoOAuthConsumer` | `removeConsumer(String consumerKey)` Removes a consumer.
`LyoOAuthConsumer` | `updateConsumer(LyoOAuthConsumer consumer)` Updates a consumer.

Method Detail

### getConsumer

    LyoOAuthConsumer getConsumer(net.oauth.OAuthMessage requestMessage)
                                 throws net.oauth.OAuthException,
                                        IOException,
                                        ConsumerStoreException

  Gets the consumer for this message.

  Parameters:
    `requestMessage` - the OAuth message
  Returns:
    the consumer
  Throws:
    `net.oauth.OAuthException` - if the OAuth message does not contain a consumer key
    `IOException` - on errors reading the message
    `ConsumerStoreException` - on other errors

### getAllConsumers

    Collection<LyoOAuthConsumer> getAllConsumers()
                                                 throws ConsumerStoreException

  Gets all OAuth consumers.

  Returns:
    all OAuth consumers, provisional and approved
  Throws:
    `ConsumerStoreException` - on errors

### getConsumer

    LyoOAuthConsumer getConsumer(String consumerKey)
                                 throws ConsumerStoreException

  Gets the consumer for a key.

  Parameters:
    `consumerKey` - the consumer key
  Returns:
    the consumer or null if there is no consumer for this key
  Throws:
    `ConsumerStoreException` - on errors

### addConsumer

    LyoOAuthConsumer addConsumer(LyoOAuthConsumer consumer)
                                 throws ConsumerStoreException

  Adds a new consumer.

  Parameters:
    `consumer` - the consumer
  Returns:
    the previous consumer associated with this key or null if there wasn't one
  Throws:
    `ConsumerStoreException`

### removeConsumer

    LyoOAuthConsumer removeConsumer(String consumerKey)
                                    throws ConsumerStoreException

  Removes a consumer.

  Parameters:
    `key` - the consumer key
  Returns:
    the removed consumer or null if it wasn't previously in the store
  Throws:
    `ConsumerStoreException` - on errors

### updateConsumer

    LyoOAuthConsumer updateConsumer(LyoOAuthConsumer consumer)
                                    throws ConsumerStoreException

  Updates a consumer.

  Parameters:
    `consumer` - the consumer
  Returns:
    the same consumer or null if it wasn't previously in the store
  Throws:
    `ConsumerStoreException` - on errors

### closeConsumerStore

    void closeConsumerStore()

  Closes the consumer store. It is unavailable for further use.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2013. All Rights Reserved.