com.prozima.pengine
Class Resource

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

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

Resource represents the state of a resource. A resource can perform work towards the completion of an activity. Each resource has a TimeTable which defines when the resource is available to perform work. Resources also possess a CostTable which defines the cost of using the resource to perform work.


Constructor Summary
Resource()
           
 
Method Summary
 Resource clone()
           
 CostTable getCostTable()
          Retrieve the CostTable for this resource.
 java.lang.Integer getID()
          Get the ID of this resource.
 java.lang.String getName()
          Get the name of the resource.
 TimeTable getTimeTable()
          Retrieve the TimeTable for this resource.
 boolean setCostTable(CostTable inCostTable)
          Set the cost table for this resource.
 void setID(int inID)
          Set the unique ID of this resource.
 boolean setName(java.lang.String inName)
          Set the name of this resource.
 boolean setTimeTable(TimeTable inTimeTable)
          Set the availability timetable for this Resource.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Resource

public Resource()
Method Detail

clone

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

getCostTable

public CostTable getCostTable()
Retrieve the CostTable for this resource.

Returns:
CostTable of the resource.

getID

public java.lang.Integer getID()
Get the ID of this resource.

Returns:
ID of the resource or null if it hasn't been set.

getName

public java.lang.String getName()
Get the name of the resource.

Returns:
Name of the resource or null if it has not been set.

getTimeTable

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

Returns:
Timetable of the resource.

setCostTable

public boolean setCostTable(CostTable inCostTable)
Set the cost table for this resource.

Parameters:
inCostTable - A cost table which describes how much should be charged for use of the resource.
Returns:
true if the cost table was valid and changed, otherwise false;

setID

public void setID(int inID)
Set the unique ID of this resource.

Parameters:
inID - ID of the resource.

setName

public boolean setName(java.lang.String inName)
Set the name of this resource.

Parameters:
inName - New name of the Resource. null is not a valid value.
Returns:
true if the new name was valid, otherwise false.

setTimeTable

public boolean setTimeTable(TimeTable inTimeTable)
Set the availability timetable for this Resource.

Parameters:
inTimeTable - A timetable that represents time periods when the resource is available to work. null is not a valid value.
Returns:
true if the timetable was valid, otherwise false;

toString

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