com.ibm.tws.objects.plan
Class PromptInPlan

java.lang.Object
  extended bycom.ibm.tws.objects.plan.PromptInPlan
All Implemented Interfaces:
java.io.Serializable, TWSHeader, TWSObject

public class PromptInPlan
extends java.lang.Object
implements TWSObject, TWSHeader

This simple object, which has no header, models all available types of prompts (predefined, ad-hoc or recovery), and wraps a PromptKey, including only the prompt name. If the prompt is not a global prompt, reference either to the job (JobInPlanKey) or to the job stream (JobStreamInPlanKey) that uses it are provided. Furthermore (optionally) a link to the Workstation where the Prompt is defined is given.

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.
workstationKey If present, reference to an existing Workstation
jobKey If present, reference to an existing Job
jobStreamKey If present, reference to an existing Job Stream
number Read Only.
text Read Only.
type Read Only.
status Read Only.
timeAsked Read Only.
timeRespond Read Only.

See Also:
JobInPlanKey, JobStreamInPlanKey, PromptInPlanKey, Serialized Form

Field Summary
static java.lang.String COPYRIGHT
          Copyright
 
Constructor Summary
PromptInPlan()
          Creates an empty Prompt.
PromptInPlan(Identifier id)
          Creates a Prompt Containing an Identifier
PromptInPlan(Identifier id, PromptInPlanKey key)
          Creates a Prompt containing an Identifier and a Key
PromptInPlan(PromptInPlanKey key)
          Creates a Prompt containing a key
 
Method Summary
 boolean equals(java.lang.Object object)
          equality method.
 Identifier getId()
          Returns the PromptInPlan identifier.
 Identifier getJobId()
          Return the Identifier of the referenced job.
 JobInPlanKey getJobKey()
          Return the Key of the referenced job.
 Identifier getJobStreamId()
          Returns the Identifier of the referenced Job Stream
 JobStreamInPlanKey getJobStreamKey()
          Returns the key of the referenced Job Stream
 PromptInPlanKey getKey()
          Return the key of this PromptInPlan object.
 LockData getLockData()
          Returns the PromptInPlan LockData.
 ModifyData getModifyData()
          Returns the PromptInPlan ModifyData.
 java.lang.String getName()
          Return the name of this PromptInPlan object.
 int getNumber()
          Returns the prompt number.
 TWSHeader getObjectHeader()
          Returns the PromptInPlan header, as a TWSHeader.
 TWSKey getObjectKey()
          Returns the PromptInPlan key, as a TWSKey
 PromptStatusType getStatus()
          Returns the Status of this Prompt.
 java.lang.String getText()
          Return the Text of this Prompt
 java.util.Date getTimeAsked()
          Return the Date this prompt has been asked
 java.util.Date getTimeRespond()
          Return the Date this Prompt has been answered.
 PromptType getType()
          Returns the type of this prompt.
 Identifier getWorkstationId()
          Return the Identifier of the referenced Workstation.
 WorkstationInPlanKey getWorkstationKey()
          Return the key of the referenced Workstation.
 int hashCode()
          Returns a hash code for this PromptInPlan object.
 void setId(Identifier identifier)
          Sets the Prompt Identifier For Internal Use only
 void setJobId(Identifier identifier)
          Sets the referenced Job Identifier.
 void setJobKey(JobInPlanKey key)
          Sets the referenced Job Key.
 void setJobStreamId(Identifier identifier)
          Sets the referenced Job Stream Identifier.
 void setJobStreamKey(JobStreamInPlanKey key)
          Sets the referenced Job Stream key For internal use only.
 void setKey(PromptInPlanKey key)
          Sets the Prompt key.
 void setName(java.lang.String name)
          Sets the name of this PromptInPlan object.
 void setNumber(int i)
          Sets the prompt number.
 void setStatus(PromptStatusType type)
          Sets the status of the Prompt.
 void setText(java.lang.String string)
          Sets the Text of this Prompt.
 void setTimeAsked(java.util.Date date)
          Sets the Date this prompt has been asked.
 void setTimeRespond(java.util.Date date)
          Sets the Date this prompt has been answered.
 void setType(PromptType type)
          Sets the type of this Prompt.
 void setWorkstationId(Identifier identifier)
          Sets the referenced Workstation Identifier.
 void setWorkstationKey(WorkstationInPlanKey key)
          Sets the referenced Workstation Key.
 java.lang.String toString()
          Returns a string representation of this PromptInPlan.
 
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

PromptInPlan

public PromptInPlan()
Creates an empty Prompt.


PromptInPlan

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

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

PromptInPlan

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

Parameters:
id - PromptInPlan Identifier.

PromptInPlan

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

Parameters:
key - PromptInPlan key.
Method Detail

getId

public Identifier getId()
Returns the PromptInPlan identifier.

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

getObjectKey

public TWSKey getObjectKey()
Returns the PromptInPlan key, as a TWSKey

Specified by:
getObjectKey in interface TWSObject
Returns:
The PromptInPlan key.

getObjectHeader

public TWSHeader getObjectHeader()
Returns the PromptInPlan header, as a TWSHeader. Note that in this case, 'this' object is the header itself.

Specified by:
getObjectHeader in interface TWSObject
Returns:
The PromptInPlan header.

getModifyData

public ModifyData getModifyData()
Returns the PromptInPlan ModifyData. For plan object it is always null.

Specified by:
getModifyData in interface TWSObject
Returns:
The PromptInPlan Modifydata.

getLockData

public LockData getLockData()
Returns the PromptInPlan LockData. For plan object it is always null.

Specified by:
getLockData in interface TWSObject
Returns:
The PromptInPlan LockData.

getName

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

Specified by:
getName in interface TWSObject
Returns:
the name of this PromptInPlan object.
See Also:
TWSObject.getName()

setName

public void setName(java.lang.String name)
Sets the name of this PromptInPlan object.

Parameters:
name - the name of this PromptInPlan object.

getJobId

public Identifier getJobId()
Return the Identifier of the referenced job.

Returns:
the Identifier of the referenced job.

getJobKey

public JobInPlanKey getJobKey()
Return the Key of the referenced job.

Returns:
the Key of the referenced job.

getKey

public PromptInPlanKey getKey()
Return the key of this PromptInPlan object.

Returns:
the key of this PromptInPlan object.

getNumber

public int getNumber()
Returns the prompt number.

Returns:
the prompt number.

getStatus

public PromptStatusType getStatus()
Returns the Status of this Prompt. Valid values are: Asked, Not Asked, Answered Yes, Answered No.

Returns:
the Status of this Prompt.

getText

public java.lang.String getText()
Return the Text of this Prompt

Returns:
the Text of this Prompt

getTimeAsked

public java.util.Date getTimeAsked()
Return the Date this prompt has been asked

Returns:
the Date this prompt has been asked

getTimeRespond

public java.util.Date getTimeRespond()
Return the Date this Prompt has been answered.

Returns:
the Date this Prompt has been answered.

getWorkstationId

public Identifier getWorkstationId()
Return the Identifier of the referenced Workstation.

Returns:
the Workstation Identifier.

getWorkstationKey

public WorkstationInPlanKey getWorkstationKey()
Return the key of the referenced Workstation.

Returns:
the Workstation key.

setId

public void setId(Identifier identifier)
Sets the Prompt Identifier For Internal Use only

Parameters:
identifier - The prompt Identifier.

setJobId

public void setJobId(Identifier identifier)
Sets the referenced Job Identifier. For Internal Use only

Parameters:
identifier - The Job Identifier.

setJobKey

public void setJobKey(JobInPlanKey key)
Sets the referenced Job Key. For internal use only.

Parameters:
key - The Job key.

setKey

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

Parameters:
key - The prompt key.

setNumber

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

Parameters:
i - the prompt number.

setStatus

public void setStatus(PromptStatusType type)
Sets the status of the Prompt. Valid Values are: Asked, Not Asked, Answered Yes, Answered No. For internal use only.

Parameters:
type - The status of the prompt.

setText

public void setText(java.lang.String string)
Sets the Text of this Prompt. For Internal Use only

Parameters:
string - the Text of this Prompt.

setTimeAsked

public void setTimeAsked(java.util.Date date)
Sets the Date this prompt has been asked. For internal use only.

Parameters:
date - the Date this prompt has been asked.

setTimeRespond

public void setTimeRespond(java.util.Date date)
Sets the Date this prompt has been answered. For internal use only.

Parameters:
date - the Date this prompt has been answered.

setWorkstationId

public void setWorkstationId(Identifier identifier)
Sets the referenced Workstation Identifier. For Internal Use only

Parameters:
identifier - the Workstation Identifier.

setWorkstationKey

public void setWorkstationKey(WorkstationInPlanKey key)
Sets the referenced Workstation Key. 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 PromptInPlan and is equal to this one.

hashCode

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

Returns:
The object's hash code.

toString

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

Returns:
A text string including all PromptInPlan fields.

getJobStreamId

public Identifier getJobStreamId()
Returns the Identifier of the referenced Job Stream

Returns:
the Job Strem Identifier.

getJobStreamKey

public JobStreamInPlanKey getJobStreamKey()
Returns the key of the referenced Job Stream

Returns:
the Job Stream key.

getType

public PromptType getType()
Returns the type of this prompt. Valid values are: Local, Global, Restart.

Returns:
the prompt type.

setJobStreamId

public void setJobStreamId(Identifier identifier)
Sets the referenced Job Stream Identifier. For Internal Use only

Parameters:
identifier - The Job Stream Identifeir

setJobStreamKey

public void setJobStreamKey(JobStreamInPlanKey key)
Sets the referenced Job Stream key For internal use only.

Parameters:
key - the Job Stream Key.

setType

public void setType(PromptType type)
Sets the type of this Prompt. For Internal Use only

Parameters:
type - the Prompt type.


Copyright © 2005 IBM All Rights Reserved.