Class ConfirmationCallback
- java.lang.Object
-
- org.forgerock.android.auth.callback.AbstractCallback
-
- org.forgerock.android.auth.callback.AbstractPromptCallback
-
- org.forgerock.android.auth.callback.ConfirmationCallback
-
- All Implemented Interfaces:
java.io.Serializable,Callback
public class ConfirmationCallback extends AbstractPromptCallback
Callback to retrieve the selected option from a list of options- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static intCANCELstatic intERRORstatic intINFORMATIONstatic intNOstatic intOKstatic intOK_CANCEL_OPTIONstatic intUNSPECIFIED_OPTIONstatic intWARNINGstatic intYESstatic intYES_NO_CANCEL_OPTIONstatic intYES_NO_OPTION-
Fields inherited from class org.forgerock.android.auth.callback.AbstractPromptCallback
prompt
-
Fields inherited from class org.forgerock.android.auth.callback.AbstractCallback
_id, content, VALUE
-
-
Constructor Summary
Constructors Constructor Description ConfirmationCallback()ConfirmationCallback(org.json.JSONObject jsonObject, int index)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetDefaultOption()Get the defaultChoice.intgetMessageType()java.util.List<java.lang.String>getOptions()Get the list of options.intgetOptionType()intgetSelectedIndex()java.lang.StringgetType()Return the type of the Callback, the type name should align with the Callback type returned from AMprotected voidsetAttribute(java.lang.String name, java.lang.Object value)voidsetSelectedIndex(int selection)Set the selected choice.-
Methods inherited from class org.forgerock.android.auth.callback.AbstractPromptCallback
getPrompt
-
Methods inherited from class org.forgerock.android.auth.callback.AbstractCallback
get_id, getContent, getContentAsJson, getInputValue, getInputValue, getName, setContent, setValue, setValue
-
-
-
-
Field Detail
-
UNSPECIFIED_OPTION
public static final int UNSPECIFIED_OPTION
- See Also:
- Constant Field Values
-
YES_NO_OPTION
public static final int YES_NO_OPTION
- See Also:
- Constant Field Values
-
YES_NO_CANCEL_OPTION
public static final int YES_NO_CANCEL_OPTION
- See Also:
- Constant Field Values
-
OK_CANCEL_OPTION
public static final int OK_CANCEL_OPTION
- See Also:
- Constant Field Values
-
YES
public static final int YES
- See Also:
- Constant Field Values
-
NO
public static final int NO
- See Also:
- Constant Field Values
-
CANCEL
public static final int CANCEL
- See Also:
- Constant Field Values
-
OK
public static final int OK
- See Also:
- Constant Field Values
-
INFORMATION
public static final int INFORMATION
- See Also:
- Constant Field Values
-
WARNING
public static final int WARNING
- See Also:
- Constant Field Values
-
ERROR
public static final int ERROR
- See Also:
- Constant Field Values
-
-
Method Detail
-
setAttribute
protected void setAttribute(java.lang.String name, java.lang.Object value)- Overrides:
setAttributein classAbstractPromptCallback
-
setSelectedIndex
public void setSelectedIndex(int selection)
Set the selected choice.- Parameters:
selection- the selection represented as an index into theoptionslist.
-
getType
public java.lang.String getType()
Description copied from interface:CallbackReturn the type of the Callback, the type name should align with the Callback type returned from AM
-
getOptions
public java.util.List<java.lang.String> getOptions()
Get the list of options.- Returns:
- the list of options.
-
getDefaultOption
public int getDefaultOption()
Get the defaultChoice.- Returns:
- the default option, represented as an index into
the
optionslist.
-
getOptionType
public int getOptionType()
-
getMessageType
public int getMessageType()
-
getSelectedIndex
public int getSelectedIndex()
-
-