com.ibm.tws.objects.model
Class Resource

java.lang.Object
  extended bycom.ibm.tws.objects.model.Resource
All Implemented Interfaces:
java.io.Serializable, TWSObject

public class Resource
extends java.lang.Object
implements TWSObject

The Resource object, representing a TWS logical resource, wraps a ResourceHeader that in turn wraps a ResourceKey, which references the target workstation or workstation class through a FlowTargetKey.

The following syntax validation constraints must be met on Resource objects in distributed environment:

name Always required
Alphanumeric characters
'-' and '_' characters allowed
Can't start with character '-' or '_'
Blank spaces not allowed
Not longer than 8 characters
flowTargetKey Must reference an existing workstation or class
description Not longer than 120 characters
defaultConstraints See ResourceBaseConstraints for constraints on this field

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

name Always required
Not longer than 44 characters
description Not longer than 46 characters
flowTargetKey N/A
defaultConstraints See ResourceBaseConstraints for constraints on this field
resourceAvailabilityIntervals A list of ResourceAvailabilityInterval objects
See ResourceAvailabilityInterval for constraints on this field
connectedWorkstationLinks A list of WorkstationLink objects
See WorkstationLink for constraints on this field

See Also:
ResourceBaseConstraints, ResourceAvailabilityInterval, WorkstationLink, Serialized Form

Field Summary
static java.lang.String COPYRIGHT
          Copyright.
 
Constructor Summary
Resource()
          Creates an empty Resource.
Resource(ResourceHeader resourceHeader)
          Creates a Resource with the specified header.
 
Method Summary
 boolean equals(java.lang.Object object)
          Returns true if all fields of this Resource object are equal to those of the given one.
 java.util.List getConnectedWorkstationLinks()
          Returns a reference to the list of the connected workstations for this resource.
 ResourceBaseConstraints getDefaultConstraints()
          Returns the default resource constraints.
 java.lang.String getDescription()
          Returns the resource description.
 Identifier getFlowTargetId()
          Returns the identifier of the workstation or workstation class referenced by this resource.
 FlowTargetKey getFlowTargetKey()
          Returns the key of the workstation or workstation class referenced by this resource.
 ResourceHeader getHeader()
          Returns the ResourceHeader wrapped by this Resource object.
 Identifier getId()
          Returns the resource identifier.
 ResourceKey getKey()
          Returns the ResourceKey wrapped by this Resource object.
 LockData getLockData()
          Returns the resource lock data.
 ModifyData getModifyData()
          Returns the resource modification data.
 java.lang.String getName()
          Returns the resource name.
 int getNumberOfAvailabilityIntervals()
          Returns the number of availability intervals for this resource.
 int getNumberOfConnectedWorkstations()
          Returns the number of connected workstations for this resource.
 TWSHeader getObjectHeader()
          Returns the resource header as a TWS header.
 TWSKey getObjectKey()
          Returns the resource key as a TWS key.
 java.util.List getResourceAvailabilityIntervals()
          Returns a reference to the list of availability intervals for this resource.
 int hashCode()
          Returns a hash code for this Resource object.
 void setDefaultConstraints(ResourceBaseConstraints constraints)
          Sets the default resource constraints.
 void setDescription(java.lang.String value)
          Sets the resource description.
 void setFlowTargetId(Identifier identifier)
          Sets the identifier of the workstation or workstation class referenced by this resource.
 void setFlowTargetKey(FlowTargetKey trgKey)
          Sets the key of the workstation or workstation class referenced by this resource.
 void setHeader(ResourceHeader resourceHeader)
          Sets the ResourceHeader to be wrapped by this Resource object.
 void setId(Identifier identifier)
          Sets the resource identifier.
 void setKey(ResourceKey resourceKey)
          Sets the ResourceKey to be wrapped by this Resource object.
 void setLockData(LockData data)
          Sets the resource lock data.
 void setModifyData(ModifyData data)
          Sets the resource modification data.
 void setName(java.lang.String value)
          Sets the resource name.
 java.lang.String toString()
          Returns a string representation of this Resource object.
 
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

Resource

public Resource()
Creates an empty Resource.


Resource

public Resource(ResourceHeader resourceHeader)
Creates a Resource with the specified header.

Parameters:
resourceHeader - The resource header.
Method Detail

getId

public Identifier getId()
Returns the resource identifier.

Specified by:
getId in interface TWSObject
Returns:
The resource identifier.

getObjectKey

public TWSKey getObjectKey()
Returns the resource key as a TWS key.

Specified by:
getObjectKey in interface TWSObject
Returns:
The resource key as a TWS key.

getObjectHeader

public TWSHeader getObjectHeader()
Returns the resource header as a TWS header.

Specified by:
getObjectHeader in interface TWSObject
Returns:
The resource header as a TWS header.

getKey

public ResourceKey getKey()
Returns the ResourceKey wrapped by this Resource object.

Returns:
The ResourceKey wrapped by this Resource object.

getHeader

public ResourceHeader getHeader()
Returns the ResourceHeader wrapped by this Resource object.

Returns:
The ResourceHeader wrapped by this Resource object.

getName

public java.lang.String getName()
Returns the resource name.

Specified by:
getName in interface TWSObject
Returns:
The resource name.

getFlowTargetKey

public FlowTargetKey getFlowTargetKey()
Returns the key of the workstation or workstation class referenced by this resource.

Returns:
The key of the workstation or workstation class referenced by this resource.

getDescription

public java.lang.String getDescription()
Returns the resource description.

Returns:
The resource description.

getDefaultConstraints

public ResourceBaseConstraints getDefaultConstraints()
Returns the default resource constraints.

Returns:
The default resource constraints.

getModifyData

public ModifyData getModifyData()
Returns the resource modification data.

Specified by:
getModifyData in interface TWSObject
Returns:
The resource modification data.

getLockData

public LockData getLockData()
Returns the resource lock data.

Specified by:
getLockData in interface TWSObject
Returns:
The resource lock data.

getFlowTargetId

public Identifier getFlowTargetId()
Returns the identifier of the workstation or workstation class referenced by this resource.

Returns:
The identifier of the workstation or workstation class referenced by this resource.

getConnectedWorkstationLinks

public java.util.List getConnectedWorkstationLinks()
Returns a reference to the list of the connected workstations for this resource.

Returns:
A List of "WorkstationLink" objects, representing the list of connected workstations for this resource.

getNumberOfConnectedWorkstations

public int getNumberOfConnectedWorkstations()
Returns the number of connected workstations for this resource.

Returns:
The number of connected workstations for this resource.

getResourceAvailabilityIntervals

public java.util.List getResourceAvailabilityIntervals()
Returns a reference to the list of availability intervals for this resource.

Returns:
A List of "ResourceAvailabilityInterval" objects.

getNumberOfAvailabilityIntervals

public int getNumberOfAvailabilityIntervals()
Returns the number of availability intervals for this resource.

Returns:
The number of availability intervals for this resource.

setId

public void setId(Identifier identifier)
Sets the resource identifier.

Parameters:
identifier - The resource identifier.

setKey

public void setKey(ResourceKey resourceKey)
Sets the ResourceKey to be wrapped by this Resource object.

Parameters:
resourceKey - The ResourceKey to be wrapped by this Resource object.

setHeader

public void setHeader(ResourceHeader resourceHeader)
Sets the ResourceHeader to be wrapped by this Resource object.

Parameters:
resourceHeader - The ResourceHeader to be wrapped by this Resource object.

setName

public void setName(java.lang.String value)
Sets the resource name.

Parameters:
value - The resource name.

setFlowTargetKey

public void setFlowTargetKey(FlowTargetKey trgKey)
Sets the key of the workstation or workstation class referenced by this resource.

Parameters:
trgKey - The key of the workstation or workstation class referenced by this resource.

setDescription

public void setDescription(java.lang.String value)
Sets the resource description.

Parameters:
value - The resource description.

setDefaultConstraints

public void setDefaultConstraints(ResourceBaseConstraints constraints)
Sets the default resource constraints.

Parameters:
constraints - The default resource constraints.

setModifyData

public void setModifyData(ModifyData data)
Sets the resource modification data. For internal use only.

Parameters:
data - A ModifyData object.

setLockData

public void setLockData(LockData data)
Sets the resource lock data. For internal use only.

Parameters:
data - A LockData object.

setFlowTargetId

public void setFlowTargetId(Identifier identifier)
Sets the identifier of the workstation or workstation class referenced by this resource.

Parameters:
identifier - The identifier of the workstation or workstation class referenced by this resource.

equals

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

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

hashCode

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

Returns:
The object's hash code.

toString

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

Returns:
A text string including all Resource fields.


Copyright © 2005 IBM All Rights Reserved.