All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class designer.Plan

java.lang.Object
   |
   +----designer.Plan

public class Plan
extends Object
implements PlanItem
Base class of the Plans


Constructor Index

 o Plan()
Purpose: Default constructor
 o Plan(String)
Purpose: Constructor

Method Index

 o addConstraint(String)
Purpose: Creates new Constaint
Pre: none
Post: Constraint created, added to end of vector
 o addItem(PlanItem)
Purpose: Adds a new item to the plan list
Pre: duplicate name should not exist
Post: item added to planlist
 o addSpecialist(String)
Purpose: Creates a new Specialist
Pre: none
Post: Specialist created, added to end of vector
 o addTask(String)
Purpose: Creates a new Task and adds it to the end of the list
Pre: none
Post: Task created, added to end of vector
 o execute()
Purpose: Executes all tasks, specialists and constraints in the list
Pre: none
Post: return true if all plan items executed correctly, else false
 o getItemAt(int)
Purpose: Gets the individual plan items
Pre: index >= 0 && index < planList.size()
Post: rtnval == planItems
 o getName()
Purpose: Gets the name of the Plan
Pre: none
Post: returns name of selector
 o getRank()
Purpose: Runs the Sponsor to get the rank
Pre: none
Post: returns rank
 o getSponsor()
Purpose: Gets the reference to the sponsor
Pre: none
POst: retval == Sponsor
 o insertItemAt(int, PlanItem)
Purpose: inserts the object into the vector
Pre: index <= Vector.size() && (newPlanItem must be type Task, Specialist or Constraint
Post: newPlanItem inserted at index
 o removeItemAt(int)
remove a planItem from planList by its index
PRE: 0 <= index < stepList.length
POST: stepList does not include step previously at index .
 o removePlanItem(String)
remove a plan from the vector by its name
PRE: itemToRemoveName matchs name of an object in stepList
POST: vector does not include step with name itemToRemoveName
 o setPlanItemList(Vector)
Purpose: Sets the plan list to an input vector of plan items
Pre: vector must contain all elements of PlanItem type
Post plan list set
 o setSponsor(Sponsor)
Purpose: Sets the sponsor reference to a sponsor object
Pre: none
Post: sponsor reference set

Constructors

 o Plan
 public Plan(String name)
Purpose: Constructor

 o Plan
 public Plan()
Purpose: Default constructor

Methods

 o execute
 public boolean execute()
Purpose: Executes all tasks, specialists and constraints in the list
Pre: none
Post: return true if all plan items executed correctly, else false

 o getName
 public String getName()
Purpose: Gets the name of the Plan
Pre: none
Post: returns name of selector

 o getRank
 public int getRank()
Purpose: Runs the Sponsor to get the rank
Pre: none
Post: returns rank

 o addSpecialist
 public boolean addSpecialist(String name)
Purpose: Creates a new Specialist
Pre: none
Post: Specialist created, added to end of vector

 o addTask
 public boolean addTask(String name)
Purpose: Creates a new Task and adds it to the end of the list
Pre: none
Post: Task created, added to end of vector

 o addConstraint
 public boolean addConstraint(String name)
Purpose: Creates new Constaint
Pre: none
Post: Constraint created, added to end of vector

 o addItem
 public boolean addItem(PlanItem newPlanItem)
Purpose: Adds a new item to the plan list
Pre: duplicate name should not exist
Post: item added to planlist

 o insertItemAt
 public boolean insertItemAt(int index,
                             PlanItem newPlanItem)
Purpose: inserts the object into the vector
Pre: index <= Vector.size() && (newPlanItem must be type Task, Specialist or Constraint
Post: newPlanItem inserted at index

 o getItemAt
 public PlanItem getItemAt(int index)
Purpose: Gets the individual plan items
Pre: index >= 0 && index < planList.size()
Post: rtnval == planItems

 o removePlanItem
 public boolean removePlanItem(String itemToRemoveName)
remove a plan from the vector by its name
PRE: itemToRemoveName matchs name of an object in stepList
POST: vector does not include step with name itemToRemoveName

Parameters:
itemToRemove - object in vector to be removed.
Returns:
true if successful false if failed.
 o removeItemAt
 public boolean removeItemAt(int index)
remove a planItem from planList by its index
PRE: 0 <= index < stepList.length
POST: stepList does not include step previously at index .

Parameters:
stepToRemove - object in stepList to be removed.
Returns:
true if successful false if failed.
 o getSponsor
 public Sponsor getSponsor()
Purpose: Gets the reference to the sponsor
Pre: none
POst: retval == Sponsor

 o setPlanItemList
 public void setPlanItemList(Vector pil)
Purpose: Sets the plan list to an input vector of plan items
Pre: vector must contain all elements of PlanItem type
Post plan list set

 o setSponsor
 public void setSponsor(Sponsor spons)
Purpose: Sets the sponsor reference to a sponsor object
Pre: none
Post: sponsor reference set


All Packages  Class Hierarchy  This Package  Previous  Next  Index