com.prozima.pengine
Class UpdateActivityCommand

java.lang.Object
  extended by com.prozima.pengine.UpdateActivityCommand
All Implemented Interfaces:
Command

public class UpdateActivityCommand
extends java.lang.Object

Command updates the state of an already existing activity.


Constructor Summary
UpdateActivityCommand(int inProjectID, int inScheduleID, int inActivityID)
          Create the command and initialise its state.
 
Method Summary
 void addRelationship(Relationship.RelationshipType inRelType, ScheduleNode.PredecessorType inPredType, int inPredID)
          Store a predecessor relationship for the schedule node.
 void addResourceID(int inResourceID)
          Assign a resource to this activity.
 void removeRelationship(Relationship.RelationshipType inRelType, int inPredID)
          Remove a predecessor relationship for the ScheduleNode.
 void removeResourceID(int inResourceID)
          Remove a previously assigned resource from this activity.
 void setConstraint(Constraint inConstraint)
          Set the new constraint for this schedule node.
 void setEffort(int inEffort)
          Set the new effort required to complete this activity.
 void setName(java.lang.String inNewName)
          Set a new name for the schedule node.
 void setSchedulingPref(ScheduleNode.Scheduling inPref)
          Change the scheduling preference for the schedule node.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UpdateActivityCommand

public UpdateActivityCommand(int inProjectID,
                             int inScheduleID,
                             int inActivityID)
Create the command and initialise its state.

Parameters:
inProjectID - ID of project which the activity belongs to.
inActivityID - ID of the activity which is being modified.
Method Detail

addResourceID

public void addResourceID(int inResourceID)
Assign a resource to this activity.

Parameters:
inResourceID - A valid resource ID.

removeResourceID

public void removeResourceID(int inResourceID)
Remove a previously assigned resource from this activity.

Parameters:
inResourceID - Previously assigned resource ID.

setEffort

public void setEffort(int inEffort)
Set the new effort required to complete this activity.

Parameters:
inEffort - Value in [Minutes]. Cannot be negative.

addRelationship

public void addRelationship(Relationship.RelationshipType inRelType,
                            ScheduleNode.PredecessorType inPredType,
                            int inPredID)
Store a predecessor relationship for the schedule node.

Parameters:
inRelType - Type of Relationship. Cannot be null.
inPredType - Type of schedule node of the predecessor. Cannot be null or ScheduleNode.PredecessorType.ALL.
inPredID - ID of the predecessor schedule node.

removeRelationship

public void removeRelationship(Relationship.RelationshipType inRelType,
                               int inPredID)
Remove a predecessor relationship for the ScheduleNode.

Parameters:
inRelType - The type of relationship to the predecessor.
inPredID - The ID of the Predecessor.

setConstraint

public void setConstraint(Constraint inConstraint)
Set the new constraint for this schedule node.

Parameters:
inConstraint - A new constraint or null if removing an existing constraint.

setName

public void setName(java.lang.String inNewName)
Set a new name for the schedule node.

Parameters:
inNewName - New name of the schedule node. Cannot be null.

setSchedulingPref

public void setSchedulingPref(ScheduleNode.Scheduling inPref)
Change the scheduling preference for the schedule node.

Parameters:
inPref - New scheduling preference. Cannot be null.