com.ibm.tws.objects.model.types
Class ResourceAvailabilityInterval

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

public class ResourceAvailabilityInterval
extends AvailabilityInterval

This class includes the information required to describe an availability interval of a z/OS resource.

The following syntax validation constraints must be met on ResourceAvailabilityInterval objects in z/OS environment:

isAvailable One of the values exposed by the YesNoDefaultOption class
Default value is YesNoDefaultOption.DEFAULT
quantity Default value is 0
connectedWorkstationLinks A list of WorkstationLink objects
See WorkstationLink for other constraints

See Also:
YesNoDefaultOption, WorkstationLink, Serialized Form

Field Summary
static java.lang.String COPYRIGHT
          Copyright.
 
Constructor Summary
ResourceAvailabilityInterval()
          Creates an empty ResourceAvailabilityInterval object.
ResourceAvailabilityInterval(boolean isStandard, long startTime, long endTime)
          Creates a ResourceAvailabilityInterval object using the "STANDARD" value as a validity interval, and specifying a start and end time.
ResourceAvailabilityInterval(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.
ResourceAvailabilityInterval(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 ResourceAvailabilityInterval object are equal to those of the given one.
 java.util.List getConnectedWorkstationLinks()
          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 ResourceAvailabilityInterval 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 ResourceAvailabilityInterval 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

ResourceAvailabilityInterval

public ResourceAvailabilityInterval()
Creates an empty ResourceAvailabilityInterval object.


ResourceAvailabilityInterval

public ResourceAvailabilityInterval(boolean isStandard,
                                    long startTime,
                                    long endTime)
Creates a ResourceAvailabilityInterval 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.

ResourceAvailabilityInterval

public ResourceAvailabilityInterval(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.

ResourceAvailabilityInterval

public ResourceAvailabilityInterval(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.

getConnectedWorkstationLinks

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

Returns:
A List of "WorkstationLink" 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 ResourceAvailabilityInterval 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 ResourceAvailabilityInterval 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 ResourceAvailabilityInterval object.

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


Copyright © 2005 IBM All Rights Reserved.