Class BooleanCallback

java.lang.Object
org.eclipse.ecf.core.security.BooleanCallback
All Implemented Interfaces:
Serializable, Callback

public class BooleanCallback extends Object implements Callback, Serializable
Callback that handles Boolean types
See Also:
  • Constructor Details

    • BooleanCallback

      public BooleanCallback(String prompt)
      Construct a BooleanCallback with a prompt.

      Parameters:
      prompt - the prompt used to request the boolean value.
      Throws:
      IllegalArgumentException - if prompt is null or if prompt has a length of 0.
    • BooleanCallback

      public BooleanCallback(String prompt, boolean defaultValue)
      Construct a NameCallback with a prompt and default name.

      Parameters:
      prompt - the prompt used to request the information.

      defaultValue - the value to be used as the default value displayed with the prompt.
      Throws:
      IllegalArgumentException - if prompt is null.
  • Method Details

    • getPrompt

      public String getPrompt()
      Get the prompt.
      Returns:
      the prompt value.
    • getDefaultValue

      public boolean getDefaultValue()
      Get the default value.
      Returns:
      the default value, or null if this BooleanCallback was not instantiated with a defaultValue.
    • setValue

      public void setValue(boolean val)
      Set the retrieved name.
      Parameters:
      val - the retrieved value true or false.
      See Also:
    • getValue

      public boolean getValue()
      Get the retrieved value.
      Returns:
      the retrieved value true or false.
      See Also: