edu.cmu.hcii.calo.manager.PackManager Class Reference

Inherits edu.cmu.hcii.calo.manager.AbstractManager.

Inheritance diagram for edu.cmu.hcii.calo.manager.PackManager:

Inheritance graph
[legend]
Collaboration diagram for edu.cmu.hcii.calo.manager.PackManager:

Collaboration graph
[legend]
List of all members.

Detailed Description

Manages packs, detailed lists of resources relevant to a particular Task, ScheduleItem, or other entity.

Author:
Brian Ellis


Public Member Functions

void addPack (Pack pack)
 Adds the given pack to this manager.
int countPacks ()
 Returns the number of packs maanged by this manager.
boolean hasPack (Pack pack)
 Returns true if the given pack is managed by this manager, false otherwise.
void notePackChanged (Pack pack, ResourceList oldResources, ResourceList list)
 Called by a Pack when it is changed so that the manager can notify all interested parties of the change.
void removePack (Pack pack)
 Removes a given pack from the manager.
void reset ()
 Resets this manager back to the way it was when it was first created.

Static Public Member Functions

static PackManager getManager ()
 Gets the singleton manager instance.

Private Member Functions

 PackManager ()
 Constructor.
void readObject (java.io.ObjectInputStream in) throws IOException, ClassNotFoundException
 Reads in a serialized manager.
void writeObject (java.io.ObjectOutputStream out) throws IOException
 Writes this manager to stream.

Private Attributes

Set< Packpacks
 The set of packs managed by this manager.

Static Private Attributes

static final long serialVersionUID = 7775469491476373563L
 Prevent serialization collisions.
static PackManager uniqueInstance = null
 The singleton instance of this manager.


Constructor & Destructor Documentation

edu.cmu.hcii.calo.manager.PackManager.PackManager (  )  [private]

Constructor.

Private because this is a singleton.


Member Function Documentation

static PackManager edu.cmu.hcii.calo.manager.PackManager.getManager (  )  [static]

Gets the singleton manager instance.

Returns:
the PackManager

void edu.cmu.hcii.calo.manager.PackManager.addPack ( Pack  pack  ) 

Adds the given pack to this manager.

Parameters:
pack the pack to add
See also:
java.util.Set.add(java.lang.Object)

int edu.cmu.hcii.calo.manager.PackManager.countPacks (  ) 

Returns the number of packs maanged by this manager.

Returns:
the number of packs
See also:
java.util.Set.size()

boolean edu.cmu.hcii.calo.manager.PackManager.hasPack ( Pack  pack  ) 

Returns true if the given pack is managed by this manager, false otherwise.

Parameters:
pack the pack to ask about
Returns:
whether this manager has the pack
See also:
java.util.Set.contains(java.lang.Object)

void edu.cmu.hcii.calo.manager.PackManager.notePackChanged ( Pack  pack,
ResourceList  oldResources,
ResourceList  list 
)

Called by a Pack when it is changed so that the manager can notify all interested parties of the change.

Parameters:
pack the Pack that has been altered
list 
oldResources 

void edu.cmu.hcii.calo.manager.PackManager.removePack ( Pack  pack  ) 

Removes a given pack from the manager.

Parameters:
pack the pack to remove
See also:
java.util.Set.remove(java.lang.Object)

void edu.cmu.hcii.calo.manager.PackManager.reset (  ) 

Resets this manager back to the way it was when it was first created.

void edu.cmu.hcii.calo.manager.PackManager.readObject ( java.io.ObjectInputStream  in  )  throws IOException, ClassNotFoundException [private]

Reads in a serialized manager.

Just checks against the serialVersionUID.

Parameters:
in the input stream to read from
Exceptions:
IOException 
ClassNotFoundException 

void edu.cmu.hcii.calo.manager.PackManager.writeObject ( java.io.ObjectOutputStream  out  )  throws IOException [private]

Writes this manager to stream.

Since I don't want to deal with everything below this manager being serialized and it is a singleton, I just write the ID for error checking.

Parameters:
out the output stream to write to
Exceptions:
IOException 


Member Data Documentation

final long edu.cmu.hcii.calo.manager.PackManager.serialVersionUID = 7775469491476373563L [static, private]

Prevent serialization collisions.

Reimplemented from edu.cmu.hcii.calo.manager.AbstractManager.

PackManager edu.cmu.hcii.calo.manager.PackManager.uniqueInstance = null [static, private]

The singleton instance of this manager.

Set<Pack> edu.cmu.hcii.calo.manager.PackManager.packs [private]

The set of packs managed by this manager.


The documentation for this class was generated from the following file:
Generated on Mon Aug 13 15:06:14 2007 for CALO by  doxygen 1.5.2