com.prozima.pengine
Class Project

java.lang.Object
  extended by com.prozima.pengine.Project
All Implemented Interfaces:
java.lang.Cloneable

public class Project
extends java.lang.Object
implements java.lang.Cloneable

Stores the state of a project. Performs basic verification of the data but is essentially an unintelligent container with little functionality.


Field Summary
static int MAX_PROJECT_PRIORITY
          Maximum priority which can be assigned to any project
static int MIN_PROJECT_PRIORITY
          Minimum priority which can be assigned to any project
 
Constructor Summary
Project()
           
 
Method Summary
 Project clone()
           
 java.lang.Integer getActiveScheduleID()
          Retrieve the currently active Schedule ID.
 java.lang.Integer getID()
          Retrieve the ID of the Project.
 java.lang.String getName()
          Retrieve the name of the project.
 java.lang.Integer getPriority()
          Retrieve the priority of this project.
 java.util.List<java.lang.Integer> getScheduleIDs()
          Retrieve a list of the IDs of the schedules that make up this project.
 java.util.Date getStartDate()
          Retrieve the start date of the project.
 TimeTable getTimeTable()
          Retrieve the TimeTable for this project.
 boolean setActiveScheduleID(java.lang.Integer inID)
          Set the ID of the currently active Schedule for this project.
 boolean setID(int inID)
          Set the ID of the project.
 void setName(java.lang.String inName)
          Store the name of the project.
 boolean setPriority(java.lang.Integer inPriority)
          Set the priority of this project.
 void setStartDate(java.util.Date inDate)
          Store the start date of the project.
 boolean setTimeTable(TimeTable inTimeTable)
          Store the TimeTable for this Project.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MAX_PROJECT_PRIORITY

public static final int MAX_PROJECT_PRIORITY
Maximum priority which can be assigned to any project

See Also:
Constant Field Values

MIN_PROJECT_PRIORITY

public static final int MIN_PROJECT_PRIORITY
Minimum priority which can be assigned to any project

See Also:
Constant Field Values
Constructor Detail

Project

public Project()
Method Detail

clone

public Project clone()
              throws java.lang.CloneNotSupportedException
Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException

getActiveScheduleID

public java.lang.Integer getActiveScheduleID()
Retrieve the currently active Schedule ID.

Returns:
Currently active Schedule ID or null if no schedule is active.

getID

public java.lang.Integer getID()
Retrieve the ID of the Project.

Returns:
int containing the ID of the Project.

getName

public java.lang.String getName()
Retrieve the name of the project.

Returns:
The name of the project or null if no name was set.

getPriority

public java.lang.Integer getPriority()
Retrieve the priority of this project.

Returns:
Priority of the project or null if it was not set.

getScheduleIDs

public java.util.List<java.lang.Integer> getScheduleIDs()
Retrieve a list of the IDs of the schedules that make up this project.

Returns:
List of IDs of Schedules. List may be empty if no schedules have been added to the project. null should never be returned.

getStartDate

public java.util.Date getStartDate()
Retrieve the start date of the project.

Returns:
Start date of the project.

getTimeTable

public TimeTable getTimeTable()
Retrieve the TimeTable for this project.

Returns:
TimeTable of the Project or null if no TimeTable has been set.

setActiveScheduleID

public boolean setActiveScheduleID(java.lang.Integer inID)
Set the ID of the currently active Schedule for this project.

Parameters:
inID - of the active schedule or null if there is no active schedule.
Returns:
always returns true as doesn't check if the schedule exists.

setID

public boolean setID(int inID)
Set the ID of the project.

Returns:
Always returns true.

setName

public void setName(java.lang.String inName)
Store the name of the project.

Parameters:
inName - New name for the project. Cannot pass null.

setPriority

public boolean setPriority(java.lang.Integer inPriority)
Set the priority of this project.

Parameters:
inPriority - New priority for the project or null to clear the priority.

setStartDate

public void setStartDate(java.util.Date inDate)
Store the start date of the project. All activities and milestones must start on or after this date.

Parameters:
inDate - New start date for the project. Null can be passed to erase the currently defined start date.

setTimeTable

public boolean setTimeTable(TimeTable inTimeTable)
Store the TimeTable for this Project.

Parameters:
inTimeTable - TimeTable for this Project. null cannot be passed.
Returns:
true if the TimeTable was valid, otherwise false.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object