com.ibm.tws.objects.plan
Class PromptDependencyInPlan

java.lang.Object
  extended bycom.ibm.tws.objects.plan.PromptDependencyInPlan
All Implemented Interfaces:
java.io.Serializable, TWSLink

public class PromptDependencyInPlan
extends java.lang.Object
implements TWSLink

Prompt dependencies for jobs and job streams are represented through multiple instances of the PromptDependencyInPlan class, each one referencing a PromptInPlanKey object. Dependencies from predefined prompts and ad-hoc prompts are both represented by instances of PromptDependencyInPlan. You can understand which of them belongs on each type analyzing the attribute 'type'.

The following syntax validation constraints must be met on PromptDependencyInPlan objects:

name For predefined prompts:
The name of an existing predefined prompt.
For ad-hoc prompt:
The number assigned to the ad-hoc prompt.
Adding dependencies, if the dependency is
from a predefined prompt, the correct value should be used.
else if it is from a new ad-hoc prompt this field should.
be left null.
text Not longer than 200 characters.
Required for prompt ad-hoc.
satisfied Read Only.
status Read Only.
workstationKey If present must reference to an existing Workstation
number Read Only.
type Required. No default provided.
promptStatus Read Only..

See Also:
FileInPlan, Serialized Form

Field Summary
static java.lang.String COPYRIGHT
          Copyright
 
Constructor Summary
PromptDependencyInPlan()
          Creates an empty Prompt.
PromptDependencyInPlan(Identifier id)
          Creates a Prompt Containing an Identifier
PromptDependencyInPlan(Identifier id, PromptInPlanKey key)
          Creates a Prompt containing an Identifier and a Key
PromptDependencyInPlan(PromptInPlanKey key)
          Creates a Prompt containing a key
 
Method Summary
 boolean equals(java.lang.Object object)
          equality method.
 Identifier getId()
          Returns the PromptInPlan identifier.
 PromptInPlanKey getKey()
          Return the PromptInPlan key
 java.lang.String getName()
          Returns the name of the PromptInPlan object.
 int getNumber()
          Return the PromptInPlan number
 PromptStatusType getPromptStatus()
          Returns the Status of the prompt.
 DependencyStatusType getStatus()
          Return the dependency status.
 java.lang.String getText()
          Return the text of the prompt
 PromptType getType()
          Returns the Type of this prompt.
 Identifier getWorkstationId()
          Return the Identifier of the (optional) Workstation pointed by this dependency
 WorkstationInPlanKey getWorkstationKey()
          Returns the Key of the (optional) Workstation pointed by this dependency
 int hashCode()
          Returns a hash code for this prompt object.
 boolean isLoadedFromDb()
          Return if this prompt has been loaded from the DB or not.
 boolean isSatisfied()
          Returns true if this dependency is satisfied, false otherwise
 void setId(Identifier identifier)
          Sets the Identifier of the PromptInPlan object
 void setKey(PromptInPlanKey key)
          Sets the PromptInPlan key For internal use only.
 void setLoadedFromDb(boolean b)
          Sets if this prompt has been loaded from the DB or not.
 void setNumber(int i)
          Sets the PromptInPlan number For internal use only.
 void setPromptStatus(PromptStatusType type)
          Sets the status of the prompt.
 void setSatisfied(boolean b)
          Sets if this dependency is satisfied or not.
 void setStatus(DependencyStatusType type)
          Sets the dependency status.
 void setText(java.lang.String string)
          Sets the text of the PromptInPlan object.
 void setType(PromptType type)
          Sets the type of the prompt Possible values are: Local, Global, Restart.
 void setWorkstationId(Identifier identifier)
          Sets The Identifier of the (optional) Workstation
 void setWorkstationKey(WorkstationInPlanKey key)
          Sets The key of the (optional) Workstation For internal use only.
 java.lang.String toString()
          Returns a string representation of this PromptDependencyInPlan.
 
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

PromptDependencyInPlan

public PromptDependencyInPlan()
Creates an empty Prompt.


PromptDependencyInPlan

public PromptDependencyInPlan(Identifier id,
                              PromptInPlanKey key)
Creates a Prompt containing an Identifier and a Key

Parameters:
id - The PromptInPlan Identifier.
key - The PromptInPlan key

PromptDependencyInPlan

public PromptDependencyInPlan(Identifier id)
Creates a Prompt Containing an Identifier

Parameters:
id - The PromptInPlan Identifier

PromptDependencyInPlan

public PromptDependencyInPlan(PromptInPlanKey key)
Creates a Prompt containing a key

Parameters:
key - The PromptInPlan key
Method Detail

getId

public Identifier getId()
Returns the PromptInPlan identifier.

Specified by:
getId in interface TWSLink
Returns:
The PromptInPlan identifier.
See Also:
TWSLink.getId()

getName

public java.lang.String getName()
Returns the name of the PromptInPlan object.

Returns:
the name of the PromptInPlan object
See Also:
TWSObject.getName()

getKey

public PromptInPlanKey getKey()
Return the PromptInPlan key

Returns:
the PromptInPlan key.

getNumber

public int getNumber()
Return the PromptInPlan number

Returns:
the PromptInPlan number.

getStatus

public DependencyStatusType getStatus()
Return the dependency status. Valid values are: Satisfied, Unsatisfied, Undecided.

Returns:
the dependency status.

getText

public java.lang.String getText()
Return the text of the prompt

Returns:
the text of the prompt.

getWorkstationId

public Identifier getWorkstationId()
Return the Identifier of the (optional) Workstation pointed by this dependency

Returns:
the workstation Identifier

getWorkstationKey

public WorkstationInPlanKey getWorkstationKey()
Returns the Key of the (optional) Workstation pointed by this dependency

Returns:
trhe workstation key.

setId

public void setId(Identifier identifier)
Sets the Identifier of the PromptInPlan object

Parameters:
identifier - The PromptInPlan Identifier

setKey

public void setKey(PromptInPlanKey key)
Sets the PromptInPlan key For internal use only.

Parameters:
key - The PromptInPlan key

setNumber

public void setNumber(int i)
Sets the PromptInPlan number For internal use only.

Parameters:
i - the PromptInPlan number.

setStatus

public void setStatus(DependencyStatusType type)
Sets the dependency status. For internal use only.

Parameters:
type - The dependency status.

setText

public void setText(java.lang.String string)
Sets the text of the PromptInPlan object.

Parameters:
string - the text of the PromptInPlan object.

setWorkstationId

public void setWorkstationId(Identifier identifier)
Sets The Identifier of the (optional) Workstation

Parameters:
identifier - The workstation Identifier.

setWorkstationKey

public void setWorkstationKey(WorkstationInPlanKey key)
Sets The key of the (optional) Workstation For internal use only.

Parameters:
key - The Workstation key

equals

public boolean equals(java.lang.Object object)
equality method.

Parameters:
object - The object to be compared
Returns:
true if the object is an instance of PromptDependencyInPlan and is euqal to this one.

hashCode

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

Returns:
The object's hash code.

toString

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

Returns:
A text string including all PromptDependencyInPlan fields.

isSatisfied

public boolean isSatisfied()
Returns true if this dependency is satisfied, false otherwise

Returns:
true if this dependency is satisfied, false otherwise

getType

public PromptType getType()
Returns the Type of this prompt. Possible value are: Local, Glogal, Restart.

Returns:
the type of this prompt.

setSatisfied

public void setSatisfied(boolean b)
Sets if this dependency is satisfied or not. For internal use only.

Parameters:
b - true if satisfied, false otherwise.

setType

public void setType(PromptType type)
Sets the type of the prompt Possible values are: Local, Global, Restart.

Parameters:
type - The type of the prompt.

getPromptStatus

public PromptStatusType getPromptStatus()
Returns the Status of the prompt. Possible values are: Asked, Not Asked, Answered Yes, Answered No.

Returns:
The Status of the Prompt.

setPromptStatus

public void setPromptStatus(PromptStatusType type)
Sets the status of the prompt. For internal use only.

Parameters:
type - The status of the prompt.

isLoadedFromDb

public boolean isLoadedFromDb()
Return if this prompt has been loaded from the DB or not. For internal use only.

Returns:
if this prompt has been loaded from the DB or not.

setLoadedFromDb

public void setLoadedFromDb(boolean b)
Sets if this prompt has been loaded from the DB or not. For internal use only.

Parameters:
b - true if this prompt has been loaded from the DB, false otherwise.


Copyright © 2005 IBM All Rights Reserved.