Saros
Distributed Collaborative Editing and Distributed Party Programming
de.fu_berlin.inf.dpp.editor.colorstorage.ColorIDSetStorage Class Reference

List of all members.

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)

Detailed Description

This class stores ColorIDSets when ever a ColorIdSet is added it gets saved to a preference store


Constructor & Destructor Documentation

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

Parameters:
prefStore

Member Function Documentation

synchronized ColorIDSet de.fu_berlin.inf.dpp.editor.colorstorage.ColorIDSetStorage.getColorIDSet ( Collection< String >  ids)

Returns the matching ColorIDSet for the given ids if possible.

Parameters:
idsthe ids to lookup
Returns:
ColorIDSet or a new set that includes all ids if no matching set was found
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.

Parameters:
idsthe ids to lookup
additionalIdsadditional ids to add
Returns:
ColorIDSet or a new set that includes all ids and additionalIds if no matching set was found
synchronized void de.fu_berlin.inf.dpp.editor.colorstorage.ColorIDSetStorage.remove ( long  lifespan) [package]

Removes entries that are older than the given lifespan.

Parameters:
lifespanin milliseconds
synchronized int de.fu_berlin.inf.dpp.editor.colorstorage.ColorIDSetStorage.size ( )
Returns:
numbers of sets registered
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.

Parameters:
set
id
colorID
favoriteColorID
Exceptions:
IllegalArgumentExceptionwhen the caller tries to set a color multiple times or when he tries to add a new user.
 All Classes Namespaces Files Functions Variables Enumerations