Class AbstractConsumerStore
- java.lang.Object
-
- org.eclipse.lyo.server.oauth.core.consumer.AbstractConsumerStore
-
- All Implemented Interfaces:
ConsumerStore
- Direct Known Subclasses:
FileSystemConsumerStore
,RdfConsumerStore
public abstract class AbstractConsumerStore extends Object implements ConsumerStore
Manages the list of OAuth consumers.- Author:
- Samuel Padgett
-
-
Constructor Summary
Constructors Constructor Description AbstractConsumerStore()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected LyoOAuthConsumer
add(LyoOAuthConsumer consumer)
void
addAll(Collection<LyoOAuthConsumer> consumers)
abstract void
closeConsumerStore()
Closes the consumer store.Collection<LyoOAuthConsumer>
getAllConsumers()
Gets all OAuth consumers.LyoOAuthConsumer
getConsumer(String consumerKey)
Gets the consumer for a key.LyoOAuthConsumer
getConsumer(net.oauth.OAuthMessage requestMessage)
Gets the consumer for this message.protected LyoOAuthConsumer
remove(String consumerKey)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.lyo.server.oauth.core.consumer.ConsumerStore
addConsumer, removeConsumer, updateConsumer
-
-
-
-
Method Detail
-
addAll
public void addAll(Collection<LyoOAuthConsumer> consumers)
-
getAllConsumers
public Collection<LyoOAuthConsumer> getAllConsumers()
Description copied from interface:ConsumerStore
Gets all OAuth consumers.- Specified by:
getAllConsumers
in interfaceConsumerStore
- Returns:
- all OAuth consumers, provisional and approved
-
getConsumer
public LyoOAuthConsumer getConsumer(net.oauth.OAuthMessage requestMessage) throws net.oauth.OAuthException, IOException
Description copied from interface:ConsumerStore
Gets the consumer for this message.- Specified by:
getConsumer
in interfaceConsumerStore
- Parameters:
requestMessage
- the OAuth message- Returns:
- the consumer
- Throws:
net.oauth.OAuthException
- if the OAuth message does not contain a consumer keyConsumerStoreException
- on other errorsIOException
- on errors reading the message
-
getConsumer
public LyoOAuthConsumer getConsumer(String consumerKey)
Description copied from interface:ConsumerStore
Gets the consumer for a key.- Specified by:
getConsumer
in interfaceConsumerStore
- Parameters:
consumerKey
- the consumer key- Returns:
- the consumer or null if there is no consumer for this key
-
closeConsumerStore
public abstract void closeConsumerStore()
Description copied from interface:ConsumerStore
Closes the consumer store. It is unavailable for further use.- Specified by:
closeConsumerStore
in interfaceConsumerStore
-
add
protected LyoOAuthConsumer add(LyoOAuthConsumer consumer)
-
remove
protected LyoOAuthConsumer remove(String consumerKey)
-
-