com.ibm.tws.objects.model
Class Prompt

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

public class Prompt
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.

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

name Required for predefined prompts, null for recovery and ad-hoc ones
Alphanumeric characters
Starting with alphabetic character
'-' and '_' characters allowed
Blank spaces not allowed
Not longer than 8 characters
text Not longer than 200 characters

See Also:
Serialized Form

Field Summary
static java.lang.String COPYRIGHT
          Copyright.
 
Constructor Summary
Prompt()
          Creates an empty Prompt.
Prompt(Identifier promptId)
          Creates a Prompt with the specified identifier.
Prompt(Identifier promptId, PromptKey promptKey)
          Creates a Prompt with the specified identifier and key.
Prompt(PromptKey promptKey)
          Creates a Prompt with the specified key.
 
Method Summary
 boolean equals(java.lang.Object object)
          Returns true if all fields of this Prompt object are equal to those of the given one.
 Identifier getId()
          Returns the prompt identifier.
 PromptKey getKey()
          Returns the PromptKey wrapped by this Prompt object.
 LockData getLockData()
          Returns the prompt lock data.
 ModifyData getModifyData()
          Returns the prompt modification data.
 java.lang.String getName()
          Returns the prompt name.
 TWSHeader getObjectHeader()
          Returns this object, which also acts as a TWS header.
 TWSKey getObjectKey()
          Returns the prompt key as a TWS key.
 java.lang.String getText()
          Returns the prompt text.
 int hashCode()
          Returns a hash code for this Prompt object.
 void setId(Identifier identifier)
          Sets the prompt identifier.
 void setKey(PromptKey promptKey)
          Sets the PromptKey to be wrapped by this Prompt object.
 void setLockData(LockData data)
          Sets the prompt lock data.
 void setModifyData(ModifyData data)
          Sets the prompt modification data.
 void setName(java.lang.String value)
          Sets the prompt name.
 void setText(java.lang.String value)
          Sets the prompt text.
 java.lang.String toString()
          Returns a string representation of this Prompt 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

Prompt

public Prompt()
Creates an empty Prompt.


Prompt

public Prompt(Identifier promptId)
Creates a Prompt with the specified identifier.

Parameters:
promptId - The prompt identifier.

Prompt

public Prompt(PromptKey promptKey)
Creates a Prompt with the specified key.

Parameters:
promptKey - The prompt key.

Prompt

public Prompt(Identifier promptId,
              PromptKey promptKey)
Creates a Prompt with the specified identifier and key.

Parameters:
promptId - The prompt identifier.
promptKey - The prompt key.
Method Detail

getId

public Identifier getId()
Returns the prompt identifier.

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

getObjectKey

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

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

getObjectHeader

public TWSHeader getObjectHeader()
Returns this object, which also acts as a TWS header.

Specified by:
getObjectHeader in interface TWSObject
Returns:
This object, which also acts as a TWS header.

getKey

public PromptKey getKey()
Returns the PromptKey wrapped by this Prompt object.

Returns:
The PromptKey wrapped by this Prompt object.

getName

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

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

getText

public java.lang.String getText()
Returns the prompt text.

Returns:
The prompt text.

getModifyData

public ModifyData getModifyData()
Returns the prompt modification data.

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

getLockData

public LockData getLockData()
Returns the prompt lock data.

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

setId

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

Parameters:
identifier - The prompt identifier.

setKey

public void setKey(PromptKey promptKey)
Sets the PromptKey to be wrapped by this Prompt object.

Parameters:
promptKey - The PromptKey to be wrapped by this Prompt object.

setName

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

Parameters:
value - The prompt name.

setText

public void setText(java.lang.String value)
Sets the prompt text.

Parameters:
value - The prompt text.

setModifyData

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

Parameters:
data - A ModifyData object.

setLockData

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

Parameters:
data - A LockData object.

equals

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

Returns:
The object's hash code.

toString

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

Returns:
A text string including all Prompt fields.


Copyright © 2005 IBM All Rights Reserved.