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.consumerstore
Class RdfConsumerStore

    java.lang.Object
      org.eclipse.lyo.server.oauth.core.consumer.AbstractConsumerStore
          org.eclipse.lyo.server.oauth.consumerstore.RdfConsumerStore

All Implemented Interfaces:
  ConsumerStore

    public class RdfConsumerStore

extends AbstractConsumerStore

A simple RDF consumer store backed by a Jena TDB native datastore

Field Summary
`protected static String` | `CALLBACK_URL`
`protected static String` | `CONSUMER_KEY`
`protected static String` | `CONSUMER_NAME`
`protected static String` | `CONSUMER_RESOURCE`
`protected static String` | `CONSUMER_SECRET`
`protected static String` | `DB`
`protected static String` | `LYO_OAUTH_NAMESPACE`
`protected static String` | `PROVISIONAL`
`protected static String` | `TRUSTED`

Constructor Summary
`RdfConsumerStore()`
`RdfConsumerStore(com.hp.hpl.jena.query.Dataset dataset)`
`RdfConsumerStore(com.hp.hpl.jena.rdf.model.Model model)`

Method Summary
`LyoOAuthConsumer` | `addConsumer(LyoOAuthConsumer consumer)` Adds a new consumer.
`void` | `closeConsumerStore()` Closes the consumer store.
`protected void` | `createDataset()`
`protected void` | `createModel(com.hp.hpl.jena.query.Dataset dataset)`
`protected LyoOAuthConsumer` | `fromResource(com.hp.hpl.jena.rdf.model.Resource resource)`
`protected void` | `loadConsumers()`
`LyoOAuthConsumer` | `removeConsumer(String consumerKey)` Removes a consumer.
`protected void` | `removeProperties(LyoOAuthConsumer consumer)` Removes any properties previously associated with the consumer.
`protected void` | `removeProperties(String consumerKey)` Removes any properties previously associated with the consumer.
`protected com.hp.hpl.jena.rdf.model.Resource` | `toResource(LyoOAuthConsumer consumer)`
`LyoOAuthConsumer` | `updateConsumer(LyoOAuthConsumer consumer)` Updates a consumer.

Methods inherited from class org.eclipse.lyo.server.oauth.core.consumer.AbstractConsumerStore
`add, addAll, getAllConsumers, getConsumer, getConsumer, remove`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### LYO_OAUTH_NAMESPACE

    protected static final String LYO_OAUTH_NAMESPACE

See Also:
  Constant Field Values

### CONSUMER_RESOURCE

    protected static final String CONSUMER_RESOURCE

See Also:
  Constant Field Values

### CALLBACK_URL

    protected static final String CALLBACK_URL

See Also:
  Constant Field Values

### CONSUMER_NAME

    protected static final String CONSUMER_NAME

See Also:
  Constant Field Values

### CONSUMER_KEY

    protected static final String CONSUMER_KEY

See Also:
  Constant Field Values

### CONSUMER_SECRET

    protected static final String CONSUMER_SECRET

See Also:
  Constant Field Values

### PROVISIONAL

    protected static final String PROVISIONAL

See Also:
  Constant Field Values

### TRUSTED

    protected static final String TRUSTED

See Also:
  Constant Field Values

### DB

    protected static final String DB

See Also:
  Constant Field Values

Constructor Detail

### RdfConsumerStore

    public RdfConsumerStore()
                     throws ConsumerStoreException,
                            ClassNotFoundException

Throws:
  `ConsumerStoreException`
  `ClassNotFoundException`

### RdfConsumerStore

    public RdfConsumerStore(com.hp.hpl.jena.query.Dataset dataset)
                     throws ConsumerStoreException

Throws:
  `ConsumerStoreException`

### RdfConsumerStore

    public RdfConsumerStore(com.hp.hpl.jena.rdf.model.Model model)
                     throws ConsumerStoreException

Throws:
  `ConsumerStoreException`

Method Detail

### createDataset

    protected void createDataset()

### createModel

    protected void createModel(com.hp.hpl.jena.query.Dataset dataset)

### loadConsumers

    protected void loadConsumers()
                          throws ConsumerStoreException

  Throws:
    `ConsumerStoreException`

### addConsumer

    public LyoOAuthConsumer addConsumer(LyoOAuthConsumer consumer)
                                 throws ConsumerStoreException

  Description copied from interface: `ConsumerStore`
  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

    public LyoOAuthConsumer removeConsumer(String consumerKey)
                                    throws ConsumerStoreException

  Description copied from interface: `ConsumerStore`
  Removes a consumer.

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

### updateConsumer

    public LyoOAuthConsumer updateConsumer(LyoOAuthConsumer consumer)
                                    throws ConsumerStoreException

  Description copied from interface: `ConsumerStore`
  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

    public void closeConsumerStore()

  Description copied from interface: `ConsumerStore`
  Closes the consumer store. It is unavailable for further use.

  Specified by:
    `closeConsumerStore` in interface `ConsumerStore`
  Specified by:
    `closeConsumerStore` in class `AbstractConsumerStore`

### removeProperties

    protected void removeProperties(String consumerKey)

  Removes any properties previously associated with the consumer.

  Parameters:
    `consumerKey` - the consumer key

### removeProperties

    protected void removeProperties(LyoOAuthConsumer consumer)

  Removes any properties previously associated with the consumer.

  Parameters:
    `consumer` - the consumer

### toResource

    protected com.hp.hpl.jena.rdf.model.Resource toResource(LyoOAuthConsumer consumer)

### fromResource

    protected LyoOAuthConsumer fromResource(com.hp.hpl.jena.rdf.model.Resource resource)

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 © 2014. All Rights Reserved.