Class FileSystemConsumerStore

java.lang.Object
com.sodius.oslc.server.oauth.FileSystemConsumerStore
All Implemented Interfaces:
org.eclipse.lyo.server.oauth.core.consumer.ConsumerStore

public class FileSystemConsumerStore extends Object implements org.eclipse.lyo.server.oauth.core.consumer.ConsumerStore
A simple RDF consumer store backed by an XML file on the filesystem. NOTE: The consumer secret is stored as Base64 and is only obfuscated, not encrypted.
Since:
3.0.0
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new store backed by the specified file.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.eclipse.lyo.server.oauth.core.consumer.LyoOAuthConsumer
    addConsumer(org.eclipse.lyo.server.oauth.core.consumer.LyoOAuthConsumer consumer)
     
    void
     
    Collection<org.eclipse.lyo.server.oauth.core.consumer.LyoOAuthConsumer>
     
    org.eclipse.lyo.server.oauth.core.consumer.LyoOAuthConsumer
     
    org.eclipse.lyo.server.oauth.core.consumer.LyoOAuthConsumer
    getConsumer(net.oauth.OAuthMessage message)
     
    Map<String,org.eclipse.lyo.server.oauth.core.consumer.LyoOAuthConsumer>
     
    org.eclipse.lyo.server.oauth.core.consumer.LyoOAuthConsumer
    removeConsumer(String identifier)
     
    void
    store(Collection<org.eclipse.lyo.server.oauth.core.consumer.LyoOAuthConsumer> consumers)
     
    org.eclipse.lyo.server.oauth.core.consumer.LyoOAuthConsumer
    updateConsumer(org.eclipse.lyo.server.oauth.core.consumer.LyoOAuthConsumer consumer)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FileSystemConsumerStore

      public FileSystemConsumerStore(File file)
      Creates a new store backed by the specified file.
      Parameters:
      file - the file where to store consumers.
  • Method Details

    • load

      public Map<String,org.eclipse.lyo.server.oauth.core.consumer.LyoOAuthConsumer> load() throws org.eclipse.lyo.server.oauth.core.consumer.ConsumerStoreException
      Throws:
      org.eclipse.lyo.server.oauth.core.consumer.ConsumerStoreException
    • store

      public void store(Collection<org.eclipse.lyo.server.oauth.core.consumer.LyoOAuthConsumer> consumers) throws org.eclipse.lyo.server.oauth.core.consumer.ConsumerStoreException
      Throws:
      org.eclipse.lyo.server.oauth.core.consumer.ConsumerStoreException
    • getAllConsumers

      public Collection<org.eclipse.lyo.server.oauth.core.consumer.LyoOAuthConsumer> getAllConsumers() throws org.eclipse.lyo.server.oauth.core.consumer.ConsumerStoreException
      Specified by:
      getAllConsumers in interface org.eclipse.lyo.server.oauth.core.consumer.ConsumerStore
      Throws:
      org.eclipse.lyo.server.oauth.core.consumer.ConsumerStoreException
    • addConsumer

      public org.eclipse.lyo.server.oauth.core.consumer.LyoOAuthConsumer addConsumer(org.eclipse.lyo.server.oauth.core.consumer.LyoOAuthConsumer consumer) throws org.eclipse.lyo.server.oauth.core.consumer.ConsumerStoreException
      Specified by:
      addConsumer in interface org.eclipse.lyo.server.oauth.core.consumer.ConsumerStore
      Throws:
      org.eclipse.lyo.server.oauth.core.consumer.ConsumerStoreException
    • removeConsumer

      public org.eclipse.lyo.server.oauth.core.consumer.LyoOAuthConsumer removeConsumer(String identifier) throws org.eclipse.lyo.server.oauth.core.consumer.ConsumerStoreException
      Specified by:
      removeConsumer in interface org.eclipse.lyo.server.oauth.core.consumer.ConsumerStore
      Throws:
      org.eclipse.lyo.server.oauth.core.consumer.ConsumerStoreException
    • updateConsumer

      public org.eclipse.lyo.server.oauth.core.consumer.LyoOAuthConsumer updateConsumer(org.eclipse.lyo.server.oauth.core.consumer.LyoOAuthConsumer consumer) throws org.eclipse.lyo.server.oauth.core.consumer.ConsumerStoreException
      Specified by:
      updateConsumer in interface org.eclipse.lyo.server.oauth.core.consumer.ConsumerStore
      Throws:
      org.eclipse.lyo.server.oauth.core.consumer.ConsumerStoreException
    • getConsumer

      public org.eclipse.lyo.server.oauth.core.consumer.LyoOAuthConsumer getConsumer(net.oauth.OAuthMessage message) throws org.eclipse.lyo.server.oauth.core.consumer.ConsumerStoreException, IOException
      Specified by:
      getConsumer in interface org.eclipse.lyo.server.oauth.core.consumer.ConsumerStore
      Throws:
      org.eclipse.lyo.server.oauth.core.consumer.ConsumerStoreException
      IOException
    • getConsumer

      public org.eclipse.lyo.server.oauth.core.consumer.LyoOAuthConsumer getConsumer(String key) throws org.eclipse.lyo.server.oauth.core.consumer.ConsumerStoreException
      Specified by:
      getConsumer in interface org.eclipse.lyo.server.oauth.core.consumer.ConsumerStore
      Throws:
      org.eclipse.lyo.server.oauth.core.consumer.ConsumerStoreException
    • closeConsumerStore

      public void closeConsumerStore()
      Specified by:
      closeConsumerStore in interface org.eclipse.lyo.server.oauth.core.consumer.ConsumerStore