issrg.SAWS.callback
Class SAWSChoiceCallback

java.lang.Object
  extended by issrg.SAWS.callback.SAWSChoiceCallback
All Implemented Interfaces:
java.io.Serializable, javax.security.auth.callback.Callback

public class SAWSChoiceCallback
extends java.lang.Object
implements javax.security.auth.callback.Callback, java.io.Serializable

This class represents a Callback for getting a decision from the user.

Version:
1.0, Feb. 2007
Author:
E. Silva
See Also:
Serialized Form

Field Summary
static int ERROR
          Represents error messages.
static int INFORMATION
          Represents information messages.
static int WARNING
          Represents warning messages.
 
Constructor Summary
SAWSChoiceCallback(java.lang.String prompt, java.lang.String[] options, java.lang.String key, int defaultOption, int messageType)
          Constructor of the class.
 
Method Summary
 int getDefaultOption()
           
 java.lang.String getKey()
           
 int getMessageType()
           
 java.lang.String[] getOptions()
           
 java.lang.String getPrompt()
           
 int getSelectedIndex()
           
 void setSelectedIndex(int choice)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INFORMATION

public static final int INFORMATION
Represents information messages.

See Also:
Constant Field Values

WARNING

public static final int WARNING
Represents warning messages.

See Also:
Constant Field Values

ERROR

public static final int ERROR
Represents error messages.

See Also:
Constant Field Values
Constructor Detail

SAWSChoiceCallback

public SAWSChoiceCallback(java.lang.String prompt,
                          java.lang.String[] options,
                          java.lang.String key,
                          int defaultOption,
                          int messageType)
Constructor of the class.

Parameters:
prompt - The message to be displayed.
options - The options available to be chosen.
key - The identification for the message that is going to be used on the file being read by SAWSFileCallbackHandler.
defaultOption - The default option from those in the list.
messageType - The type of message: SAWSChoiceCallback.INFORMATION, SAWSChoiceCallback.WARNING or SAWSChoiceCallback.ERROR
Method Detail

getPrompt

public java.lang.String getPrompt()

getOptions

public java.lang.String[] getOptions()

getKey

public java.lang.String getKey()

getDefaultOption

public int getDefaultOption()

getMessageType

public int getMessageType()

setSelectedIndex

public void setSelectedIndex(int choice)

getSelectedIndex

public int getSelectedIndex()