Package com.sodius.oslc.server.oauth
Class FileSystemFriendStore
java.lang.Object
com.sodius.oslc.server.oauth.AbstractFriendStore
com.sodius.oslc.server.oauth.FileSystemFriendStore
- All Implemented Interfaces:
FriendStore
A simple RDF friend store backed by an XML file on the filesystem.
NOTE: The consumer secret is stored as Base64 and is only obfuscated, not encrypted.
- Since:
- 1.3.0
-
Constructor Summary
ConstructorsConstructorDescriptionFileSystemFriendStore(File file) Creates a new store backed by the specified file. -
Method Summary
Modifier and TypeMethodDescriptionload()Loads friends from the underlying storage.voidstore(Collection<Friend> friends) Stores the new collection of friends.Methods inherited from class com.sodius.oslc.server.oauth.AbstractFriendStore
addFriend, getAllFriends, removeFriend, updateFriendMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.sodius.oslc.server.oauth.FriendStore
getFriend
-
Constructor Details
-
FileSystemFriendStore
Creates a new store backed by the specified file.- Parameters:
file- the file where to store friends.
-
-
Method Details
-
load
public Collection<Friend> load() throws org.eclipse.lyo.server.oauth.core.consumer.ConsumerStoreExceptionDescription copied from class:AbstractFriendStoreLoads friends from the underlying storage.- Specified by:
loadin classAbstractFriendStore- Returns:
- the loaded friends.
- Throws:
org.eclipse.lyo.server.oauth.core.consumer.ConsumerStoreException- on errors.
-
store
public void store(Collection<Friend> friends) throws org.eclipse.lyo.server.oauth.core.consumer.ConsumerStoreException Description copied from class:AbstractFriendStoreStores the new collection of friends.- Specified by:
storein classAbstractFriendStore- Parameters:
friends- the new collection of friends to store.- Throws:
org.eclipse.lyo.server.oauth.core.consumer.ConsumerStoreException- on errors.
-