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
public class FileSystemFriendStore extends AbstractFriendStore
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
Constructors Constructor Description FileSystemFriendStore(File file)
Creates a new store backed by the specified file.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<Friend>
load()
Loads friends from the underlying storage.void
store(Collection<Friend> friends)
Stores the new collection of friends.-
Methods inherited from class com.sodius.oslc.server.oauth.AbstractFriendStore
addFriend, getAllFriends, removeFriend, updateFriend
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.sodius.oslc.server.oauth.FriendStore
getFriend
-
-
-
-
Constructor Detail
-
FileSystemFriendStore
public FileSystemFriendStore(File file)
Creates a new store backed by the specified file.- Parameters:
file
- the file where to store friends.
-
-
Method Detail
-
load
public Collection<Friend> load() throws org.eclipse.lyo.server.oauth.core.consumer.ConsumerStoreException
Description copied from class:AbstractFriendStore
Loads friends from the underlying storage.- Specified by:
load
in 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:AbstractFriendStore
Stores the new collection of friends.- Specified by:
store
in classAbstractFriendStore
- Parameters:
friends
- the new collection of friends to store.- Throws:
org.eclipse.lyo.server.oauth.core.consumer.ConsumerStoreException
- on errors.
-
-