public abstract class AbstractFriendStore extends Object implements FriendStore
Constructor and Description |
---|
AbstractFriendStore() |
Modifier and Type | Method and Description |
---|---|
void |
addFriend(Friend friend)
Adds a new friend.
|
Collection<Friend> |
getAllFriends()
Gets all OAuth friends.
|
protected abstract Collection<Friend> |
load()
Loads friends from the underlying storage.
|
void |
removeFriend(String identifier)
Removes a friend.
|
protected abstract void |
store(Collection<Friend> friends)
Stores the new collection of friends.
|
void |
updateFriend(Friend friend)
Updates a friend.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFriend
protected abstract Collection<Friend> load() throws org.eclipse.lyo.server.oauth.core.consumer.ConsumerStoreException
org.eclipse.lyo.server.oauth.core.consumer.ConsumerStoreException
- on errors.protected abstract void store(Collection<Friend> friends) throws org.eclipse.lyo.server.oauth.core.consumer.ConsumerStoreException
friends
- the new collection of friends to store.org.eclipse.lyo.server.oauth.core.consumer.ConsumerStoreException
- on errors.public Collection<Friend> getAllFriends() throws org.eclipse.lyo.server.oauth.core.consumer.ConsumerStoreException
FriendStore
getAllFriends
in interface FriendStore
org.eclipse.lyo.server.oauth.core.consumer.ConsumerStoreException
- on errors.public void addFriend(Friend friend) throws org.eclipse.lyo.server.oauth.core.consumer.ConsumerStoreException
FriendStore
addFriend
in interface FriendStore
friend
- the new friend.org.eclipse.lyo.server.oauth.core.consumer.ConsumerStoreException
- on errors.public void removeFriend(String identifier) throws org.eclipse.lyo.server.oauth.core.consumer.ConsumerStoreException
FriendStore
removeFriend
in interface FriendStore
identifier
- identifier of the friend to remove.org.eclipse.lyo.server.oauth.core.consumer.ConsumerStoreException
- on errors.public void updateFriend(Friend friend) throws org.eclipse.lyo.server.oauth.core.consumer.ConsumerStoreException
FriendStore
updateFriend
in interface FriendStore
friend
- the friend to update.org.eclipse.lyo.server.oauth.core.consumer.ConsumerStoreException
- on errors.