com.ibm.tws.objects.model
Class ResourceKey

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

public class ResourceKey
extends java.lang.Object
implements TWSKey

This object represents a resource external key, including fields used to identify a resource in TWS external interfaces. Since a resource is identified by its name and by a referenced workstation or workstation class, this class includes a name attribute and a reference to a FlowTargetKey object.

See Also:
Resource, Serialized Form

Field Summary
static java.lang.String COPYRIGHT
          Copyright.
 
Constructor Summary
ResourceKey()
          Creates an empty ResourceKey.
ResourceKey(java.lang.String resourceName)
          Creates a ResourceKey with the specified name.
ResourceKey(java.lang.String resourceName, FlowTargetKey trgKey)
          Creates a ResourceKey with the specified name and workstation or workstation class key.
 
Method Summary
 boolean equals(java.lang.Object object)
          Returns true if all fields of this ResourceKey object are equal to those of the given one.
 FlowTargetKey getFlowTargetKey()
          Returns the key of the workstation or workstation class referenced by this resource.
 java.lang.String getName()
          Returns the resource name.
 int hashCode()
          Returns a hash code for this ResourceKey object.
static ResourceKey parseKey(java.lang.String key)
          Parses data from the specified string and creates a new ResourceKey.
 void setFlowTargetKey(FlowTargetKey trgKey)
          Sets the key of the workstation or workstation class referenced by this resource.
 void setName(java.lang.String value)
          Sets the resource name.
 java.lang.String toString()
          Returns a string representation of this ResourceKey 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

ResourceKey

public ResourceKey()
Creates an empty ResourceKey.


ResourceKey

public ResourceKey(java.lang.String resourceName)
Creates a ResourceKey with the specified name.

Parameters:
resourceName - The resource name.

ResourceKey

public ResourceKey(java.lang.String resourceName,
                   FlowTargetKey trgKey)
Creates a ResourceKey with the specified name and workstation or workstation class key.

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

parseKey

public static ResourceKey parseKey(java.lang.String key)
Parses data from the specified string and creates a new ResourceKey.

Parameters:
key - The string containing key data.
Returns:
A new ResourceKey, or null if the string does not contain a valid key.

getName

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

Specified by:
getName in interface TWSKey
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.

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.

equals

public boolean equals(java.lang.Object object)
Returns true if all fields of this ResourceKey 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 ResourceKey object.

Returns:
The object's hash code.

toString

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

Returns:
A text string including all ResourceKey fields.


Copyright © 2005 IBM All Rights Reserved.