com.ibm.tws.objects.plan.types
Class ResourceInPlanAvailabilityInterval

java.lang.Object
  extended bycom.ibm.tws.objects.types.AvailabilityInterval
      extended bycom.ibm.tws.objects.plan.types.ResourceInPlanAvailabilityInterval
All Implemented Interfaces:
java.io.Serializable

public class ResourceInPlanAvailabilityInterval
extends AvailabilityInterval

This class includes the information required to describe the additional constraints of a resource in plan, associated to a given interval. For the moment this class is only used for TWS z/OS resources, but its usage could be extended in the future also to TWS Distributed resources

isAvailable Default value is YesNoDefaultOption.DEFAULT. Possible value are:
YesNoDefaultOption.YES
YesNoDefaultOption.NO
YesNoDefaultOption.DEFAULT
quantity Default value is 0
connectedWorkstationInPlanKeys A list of WorkstationInPlanKey
See WorkstationInPlanKey for constraints on this field

See Also:
YesNoDefaultOption, WorkstationInPlanKey, Serialized Form

Field Summary
static java.lang.String COPYRIGHT
          Copyright.
 
Constructor Summary
ResourceInPlanAvailabilityInterval()
          Creates an empty ResourceInPlanAvailabilityInterval object.
ResourceInPlanAvailabilityInterval(boolean isStandard, long startTime, long endTime)
          Creates a ResourceInPlanAvailabilityInterval object using the "STANDARD" value as a validity interval, and specifying a start and end time.
ResourceInPlanAvailabilityInterval(java.util.Date date, long startTime, long endTime)
          Creates a ResourceAvailaiblityInterval object using a specific date as a validity interval, and specifying a start and end time.
ResourceInPlanAvailabilityInterval(int dayOfWeek, long startTime, long endTime)
          Creates a ResourceAvailaiblityInterval object using a day of week as a validity interval, and specifying a start and end time.
 
Method Summary
 boolean equals(java.lang.Object object)
          Returns true if all fields of this ResourceInPlanAvailabilityInterval object are equal to those of the given one.
 java.util.List getConnectedWorkstationInPlanKeys()
          Returns the list of the connected workstations for this resource in this specifc interval.
 int getQuantity()
          Returns the resource quantity.
 int hashCode()
          Returns a hash code for this ResourceInPlanAvailabilityInterval object.
 YesNoDefaultOption isAvailable()
          Returns YesNoDefaultOption.YES if the resource is available.
 void setAvailable(YesNoDefaultOption value)
          Sets the property used to state if the resource is available.
 void setQuantity(int value)
          Sets the resource quantity.
 java.lang.String toString()
          Returns a string representation of this ResourceInPlanAvailabilityInterval object.
 
Methods inherited from class com.ibm.tws.objects.types.AvailabilityInterval
getDescription, getIntervalEndTime, getIntervalStartTime, getIntervalValidityDate, getIntervalValidityDayOfWeek, isDateIntervalType, isDayOfWeekIntervalType, isStandardIntervalType, setDescription, setIntervalEndTime, setIntervalStartTime, setIntervalValidityDate, setIntervalValidityDayOfWeek, setIntervalValidityToStandard
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
Copyright.

Constructor Detail

ResourceInPlanAvailabilityInterval

public ResourceInPlanAvailabilityInterval()
Creates an empty ResourceInPlanAvailabilityInterval object.


ResourceInPlanAvailabilityInterval

public ResourceInPlanAvailabilityInterval(boolean isStandard,
                                          long startTime,
                                          long endTime)
Creates a ResourceInPlanAvailabilityInterval object using the "STANDARD" value as a validity interval, and specifying a start and end time.

Parameters:
isStandard - True to build a standard interval.
startTime - The start time for this interval.
endTime - The end time for this interval.

ResourceInPlanAvailabilityInterval

public ResourceInPlanAvailabilityInterval(int dayOfWeek,
                                          long startTime,
                                          long endTime)
Creates a ResourceAvailaiblityInterval object using a day of week as a validity interval, and specifying a start and end time.

Parameters:
dayOfWeek - The day of week (Sunday to Saturday) when this interval is valid. Use constants from java.util.Calendar (Calendar.MONDAY, ... Calendar.SUNDAY).
startTime - The start time for this interval.
endTime - The end time for this interval.

ResourceInPlanAvailabilityInterval

public ResourceInPlanAvailabilityInterval(java.util.Date date,
                                          long startTime,
                                          long endTime)
Creates a ResourceAvailaiblityInterval object using a specific date as a validity interval, and specifying a start and end time.

Parameters:
date - The date when this interval is valid.
startTime - The start time for this interval.
endTime - The end time for this interval.
Method Detail

getQuantity

public int getQuantity()
Returns the resource quantity.

Returns:
The resource quantity.

isAvailable

public YesNoDefaultOption isAvailable()
Returns YesNoDefaultOption.YES if the resource is available.

Returns:
YesNoDefaultOption.YES if the resource is available.

getConnectedWorkstationInPlanKeys

public java.util.List getConnectedWorkstationInPlanKeys()
Returns the list of the connected workstations for this resource in this specifc interval.

Returns:
A List of "WorkstationInPlanKey" objects, representing the list of workstations that are connected to this resource for this specific interval.

setQuantity

public void setQuantity(int value)
Sets the resource quantity.

Parameters:
value - The resource quantity.

setAvailable

public void setAvailable(YesNoDefaultOption value)
Sets the property used to state if the resource is available.

Parameters:
value - YesNoDefaultOption.YES if the resource is available.

hashCode

public int hashCode()
Returns a hash code for this ResourceInPlanAvailabilityInterval object.

Overrides:
hashCode in class AvailabilityInterval
Returns:
The object's hash code.

equals

public boolean equals(java.lang.Object object)
Returns true if all fields of this ResourceInPlanAvailabilityInterval object are equal to those of the given one.

Overrides:
equals in class AvailabilityInterval
Parameters:
object - The object to be compared with this one.
Returns:
True if this object equals to the given one.

toString

public java.lang.String toString()
Returns a string representation of this ResourceInPlanAvailabilityInterval object.

Overrides:
toString in class AvailabilityInterval
Returns:
A text string including all ResourceInPlanAvailabilityInterval fields.


Copyright © 2005 IBM All Rights Reserved.