Saros
Distributed Collaborative Editing and Distributed Party Programming
|
Public Member Functions | |
ColorIDSetStorage (IPreferenceStore prefStore) | |
synchronized ColorIDSet | getColorIDSet (Collection< String > ids) |
synchronized ColorIDSet | getColorIDSet (Collection< String > ids, Collection< String > additionalIds) |
synchronized int | size () |
synchronized void | updateColor (ColorIDSet set, String id, int colorID, int favoriteColorID) throws IllegalArgumentException |
String | toString () |
Package Functions | |
synchronized void | remove (long lifespan) |
This class stores ColorIDSets when ever a ColorIdSet is added it gets saved to a preference store
de.fu_berlin.inf.dpp.editor.colorstorage.ColorIDSetStorage.ColorIDSetStorage | ( | IPreferenceStore | prefStore | ) |
Creates a new ColorIdSetStorage giving a preference store for storing a string which represents the sets in memory
prefStore |
synchronized ColorIDSet de.fu_berlin.inf.dpp.editor.colorstorage.ColorIDSetStorage.getColorIDSet | ( | Collection< String > | ids | ) |
Returns the matching ColorIDSet for the given ids if possible.
ids | the ids to lookup |
synchronized ColorIDSet de.fu_berlin.inf.dpp.editor.colorstorage.ColorIDSetStorage.getColorIDSet | ( | Collection< String > | ids, |
Collection< String > | additionalIds | ||
) |
Returns the matching ColorIDSet for the given ids if possible.
ids | the ids to lookup |
additionalIds | additional ids to add |
synchronized void de.fu_berlin.inf.dpp.editor.colorstorage.ColorIDSetStorage.remove | ( | long | lifespan | ) | [package] |
Removes entries that are older than the given lifespan.
lifespan | in milliseconds |
synchronized int de.fu_berlin.inf.dpp.editor.colorstorage.ColorIDSetStorage.size | ( | ) |
String de.fu_berlin.inf.dpp.editor.colorstorage.ColorIDSetStorage.toString | ( | ) |
synchronized void de.fu_berlin.inf.dpp.editor.colorstorage.ColorIDSetStorage.updateColor | ( | ColorIDSet | set, |
String | id, | ||
int | colorID, | ||
int | favoriteColorID | ||
) | throws IllegalArgumentException |
Changes the colorID
and favoriteColorID
of a user in a set.
set | |
id | |
colorID | |
favoriteColorID |
IllegalArgumentException | when the caller tries to set a color multiple times or when he tries to add a new user. |