Class ChoiceCallback
- java.lang.Object
-
- org.forgerock.android.auth.callback.AbstractCallback
-
- org.forgerock.android.auth.callback.AbstractPromptCallback
-
- org.forgerock.android.auth.callback.ChoiceCallback
-
- All Implemented Interfaces:
java.io.Serializable,Callback
public class ChoiceCallback extends AbstractPromptCallback
Callback to retrieve the selected choice(s) from a list of choices- See Also:
- Serialized Form
-
-
Field Summary
-
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 ChoiceCallback()ChoiceCallback(org.json.JSONObject jsonObject, int index)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.String>getChoices()Get the list of choices.intgetDefaultChoice()Get the defaultChoice.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
-
-
-
-
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 thechoiceslist.
-
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
-
getChoices
public java.util.List<java.lang.String> getChoices()
Get the list of choices.- Returns:
- the list of choices.
-
getDefaultChoice
public int getDefaultChoice()
Get the defaultChoice.- Returns:
- the defaultChoice, represented as an index into
the
choiceslist.
-
-