02/28/2005
 

com.epicentric.common
Class Grouper

java.lang.Object
  |
  +--com.epicentric.common.Grouper
All Implemented Interfaces:
Serializable

Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement.

public class Grouper
extends Object
implements Serializable

Class for manipulating multiple groups of objects.

One example of the use of this class is as an aid to HTML interfaces where the user must select things from a pool of items and put them in one or more groups. For instance, if a user is asked to choose which categories of news she wants to hear about, the list of all not-yet-selected categories would be in the Grouper's 'ungrouped' items. The Grouper would store the state of which news categores the user has moved from the unselected group to the selected group.

Also for instance, if the user had a choice of whether the news category would be delivered via email or via a personalized website, the Grouper would manage two groups (besides the unselected group).

Individual groups are implemented by OrderedHashtable.

See Also:
OrderedHashtable, Serialized Form

Constructor Summary
Grouper()
          Deprecated. Empty constructor.
 
Method Summary
 OrderedHashtable getGroup(String groupKey)
          Deprecated. Returns null if the keyed group doesn't exist.
 OrderedHashtable getGroups()
          Deprecated. Return OrderedHashtable of my groups.
 OrderedHashtable getUngroupedItems()
          Deprecated. Return a OrderedHashtable object containing all my items that aren't in any other group.
 void move(String itemKey, String srcGroupKey, String destGroupKey)
          Deprecated. Move keyed item from keyed source group to keyed destination group.
 void moveFromUngrouped(String itemKey, String groupKey)
          Deprecated. Move keyed item from ungrouped items to keyed group.
 void moveToUngrouped(String itemKey, String groupKey)
          Deprecated. Remove keyed item from keyed group and put it in ungrouped items.
 void putUngroupedItem(String itemKey, Object item)
          Deprecated. Put given object at end of ungrouped items.
 void setGroup(String groupKey, OrderedHashtable group)
          Deprecated. Set the given group by the given key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Grouper

public Grouper()
Deprecated. 
Empty constructor.
Method Detail

getUngroupedItems

public OrderedHashtable getUngroupedItems()
Deprecated. 
Return a OrderedHashtable object containing all my items that aren't in any other group.

setGroup

public void setGroup(String groupKey,
                     OrderedHashtable group)
Deprecated. 
Set the given group by the given key. If group doesn't exist, it is created. If group already exists, it is overwritten.

getGroup

public OrderedHashtable getGroup(String groupKey)
Deprecated. 
Returns null if the keyed group doesn't exist.

putUngroupedItem

public void putUngroupedItem(String itemKey,
                             Object item)
Deprecated. 
Put given object at end of ungrouped items.

getGroups

public OrderedHashtable getGroups()
Deprecated. 
Return OrderedHashtable of my groups.

moveFromUngrouped

public void moveFromUngrouped(String itemKey,
                              String groupKey)
Deprecated. 
Move keyed item from ungrouped items to keyed group. Does nothing if item isn't in ungrouped items. Creates new group if keyed group doesn't exist.

moveToUngrouped

public void moveToUngrouped(String itemKey,
                            String groupKey)
Deprecated. 
Remove keyed item from keyed group and put it in ungrouped items. Does nothing if item isn't in group. Does nothing if group doesn't exist.

move

public void move(String itemKey,
                 String srcGroupKey,
                 String destGroupKey)
Deprecated. 
Move keyed item from keyed source group to keyed destination group. Does nothing if item isn't in source group. Does nothing if source group doesn't exist. Creates new group if destination group doesn't exist.

02/28/2005
 

Copyright and Trademark Notices