|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.lyo.server.oauth.core.consumer.AbstractConsumerStore
org.eclipse.lyo.server.oauth.consumerstore.FileSystemConsumerStore
public class FileSystemConsumerStore
A simple RDF consumer store backed by an XML file on the filesystem. NOTE: The shared consumer secret is stored as Base64 and is only obfuscated, not encrypted.
| 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 |
LYO_OAUTH_NAMESPACE
|
protected static String |
PROVISIONAL
|
protected static String |
TRUSTED
|
| Constructor Summary | |
|---|---|
FileSystemConsumerStore(com.hp.hpl.jena.rdf.model.Model model,
String oauthStoreRoot)
|
|
FileSystemConsumerStore(String oauthStoreRoot)
|
|
| Method Summary | |
|---|---|
LyoOAuthConsumer |
addConsumer(LyoOAuthConsumer consumer)
Adds a new consumer. |
void |
closeConsumerStore()
Closes the consumer store. |
protected void |
createModel()
|
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. |
protected void |
writeModel()
|
| 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 |
|---|
protected static final String LYO_OAUTH_NAMESPACE
protected static final String CONSUMER_RESOURCE
protected static final String CALLBACK_URL
protected static final String CONSUMER_NAME
protected static final String CONSUMER_KEY
protected static final String CONSUMER_SECRET
protected static final String PROVISIONAL
protected static final String TRUSTED
| Constructor Detail |
|---|
public FileSystemConsumerStore(String oauthStoreRoot)
throws SQLException,
ConsumerStoreException,
ClassNotFoundException
SQLException
ConsumerStoreException
ClassNotFoundException
public FileSystemConsumerStore(com.hp.hpl.jena.rdf.model.Model model,
String oauthStoreRoot)
throws ConsumerStoreException
ConsumerStoreException| Method Detail |
|---|
protected void createModel()
protected void writeModel()
throws FileNotFoundException
FileNotFoundException
protected void loadConsumers()
throws ConsumerStoreException
ConsumerStoreException
public LyoOAuthConsumer addConsumer(LyoOAuthConsumer consumer)
throws ConsumerStoreException
ConsumerStore
consumer - the consumer
ConsumerStoreException
public LyoOAuthConsumer removeConsumer(String consumerKey)
throws ConsumerStoreException
ConsumerStore
ConsumerStoreException - on errors
public LyoOAuthConsumer updateConsumer(LyoOAuthConsumer consumer)
throws ConsumerStoreException
ConsumerStore
consumer - the consumer
ConsumerStoreException - on errorspublic void closeConsumerStore()
ConsumerStore
closeConsumerStore in interface ConsumerStorecloseConsumerStore in class AbstractConsumerStoreprotected void removeProperties(String consumerKey)
consumerKey - the consumer keyprotected void removeProperties(LyoOAuthConsumer consumer)
consumer - the consumer
protected com.hp.hpl.jena.rdf.model.Resource toResource(LyoOAuthConsumer consumer)
throws UnsupportedEncodingException
UnsupportedEncodingException
protected LyoOAuthConsumer fromResource(com.hp.hpl.jena.rdf.model.Resource resource)
throws UnsupportedEncodingException
UnsupportedEncodingException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||