Interface ServiceProviderConsumerStore
- All Known Implementing Classes:
PersistentServiceProviderConsumerStore
public interface ServiceProviderConsumerStore
Provides persistent storage for OAuth consumers. The implementation of this store should only concern itself
with the immediate task that it is being asked to perform.
-
Method Details
-
add
Add the consumer to the store.- Parameters:
consumer- theconsumerto be added, cannot be null- Throws:
StoreException- if aconsumerwith the samekeyalready existsNullPointerException- if the givenconsumerisnull
-
get
Retrieve aconsumerfrom the store whosekeyattribute is equal to thekeyparameter, oremptyif such aconsumerdoesn't exist- Parameters:
key- theconsumer key- Returns:
Consumerwhosekeyis equal to the givenkey, oremptyif such aconsumerdoesn't exist- Throws:
NullPointerException- if the givenkeyisnull
-
getAll
Retrieve all theconsumersfrom the store.- Returns:
- all the
consumersfrom the store - Throws:
StoreException- if there is a problem retrieving one or more of theconsumers
-
delete
Deletes a consumer whosekeyis equal to the givenkey- Parameters:
key- thekeyof theconsumerto be deleted- Throws:
NullPointerException- if the givenkeyisnull
-
update
Updates an existing consumer.- Parameters:
consumer- the consumer to update- Throws:
StoreException- if aconsumerwith thekeydoes not exists
-