org.datamanager.kernel
Class SimpletonList

java.lang.Object
  |
  +--java.util.Observable
        |
        +--org.datamanager.kernel.SimpletonList

public class SimpletonList
extends Observable

A SimpletonList is an abstract way to maintain an Entity that holds all the Simpletons that can be run in the system. The format for the simpleton list is an Entity that has the name "simpleton-list" and attributes that contain the classes of each Simpleton that can be loaded.

Author:
Chris Dent
, Matt Liggett , Matthew Farrellee

Field Summary
static EntityConstraint SIMPLETON_LIST_CONSTRAINT
          The EntityConstraint used to locate the simpleton list Entity
static String SIMPLETON_LIST_ENTITY_NAME
          The name of the simpleton list Entity
 
Constructor Summary
SimpletonList(Pool pool)
          Create a new SimpletonList.
 
Method Summary
 void add(Simpleton.Information information)
          Adds a LoadableSimpletonEntityValue as an attribute of the simpleton list Entity.
 int count()
          Get the count of currently available simpletons.
protected  LoadableSimpletonEntityValue[] getSimpletonEntities()
          Get all of the LoadableSimpletonEntityValues stored on the simpleton list Entity.
 Entity getSimpletonListEntity()
          Get the Entity that is being used for storage of the simpletons.
 Iterator iterator()
          Get a iterator for the simpleton list.
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SIMPLETON_LIST_ENTITY_NAME

public static final String SIMPLETON_LIST_ENTITY_NAME
The name of the simpleton list Entity

See Also:
Constant Field Values

SIMPLETON_LIST_CONSTRAINT

public static final EntityConstraint SIMPLETON_LIST_CONSTRAINT
The EntityConstraint used to locate the simpleton list Entity

Constructor Detail

SimpletonList

public SimpletonList(Pool pool)
              throws DataManagerException
Create a new SimpletonList. This will retrieve the Entity that will hold the simpleton-list. If it does not exist it will be created, and if it does exist initialize it (by clearing it).

Method Detail

add

public void add(Simpleton.Information information)
         throws DataManagerException
Adds a LoadableSimpletonEntityValue as an attribute of the simpleton list Entity.

Parameters:
information - The Simpleton.Information of the simpleton being added to the list.
DataManagerException

count

public int count()
          throws DataManagerException
Get the count of currently available simpletons.

DataManagerException

getSimpletonListEntity

public Entity getSimpletonListEntity()
Get the Entity that is being used for storage of the simpletons.


iterator

public Iterator iterator()
                  throws DataManagerException
Get a iterator for the simpleton list.

DataManagerException

getSimpletonEntities

protected LoadableSimpletonEntityValue[] getSimpletonEntities()
                                                       throws DataManagerException
Get all of the LoadableSimpletonEntityValues stored on the simpleton list Entity.

DataManagerException


See the Helium Website