Class AbstractCallback
- java.lang.Object
-
- org.forgerock.android.auth.callback.AbstractCallback
-
- All Implemented Interfaces:
java.io.Serializable,Callback
- Direct Known Subclasses:
AbstractPromptCallback,AbstractValidatedCallback,ConsentMappingCallback,DeviceProfileCallback,HiddenValueCallback,IdPCallback,MetadataCallback,PollingWaitCallback,ReCaptchaCallback,SelectIdPCallback,TermsAndConditionsCallback,TextOutputCallback
public abstract class AbstractCallback extends java.lang.Object implements Callback
Abstract Callback that provides the raw content of the Callback, and allow sub classes to access Callback's input and output- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbstractCallback()AbstractCallback(org.json.JSONObject raw, int index)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description intget_id()Return the unique id for this callback.java.lang.StringgetContent()Return the raw content of the Callback.protected org.json.JSONObjectgetContentAsJson()java.lang.ObjectgetInputValue()Get the first value for inputjava.lang.ObjectgetInputValue(int index)Get the value for inputprotected java.lang.StringgetName(org.json.JSONObject jsonObject)protected abstract voidsetAttribute(java.lang.String name, java.lang.Object value)protected voidsetContent(org.json.JSONObject jsonObject)Sets the value of the Callbackprotected voidsetValue(java.lang.Object value)Set the first value for inputprotected voidsetValue(java.lang.Object value, int index)Set the value for the input.
-
-
-
Field Detail
-
VALUE
protected static final java.lang.String VALUE
- See Also:
- Constant Field Values
-
content
protected java.lang.String content
-
_id
protected int _id
-
-
Method Detail
-
getContentAsJson
protected org.json.JSONObject getContentAsJson() throws org.json.JSONException- Throws:
org.json.JSONException
-
setAttribute
protected abstract void setAttribute(java.lang.String name, java.lang.Object value)
-
getName
protected java.lang.String getName(org.json.JSONObject jsonObject)
-
setContent
protected void setContent(org.json.JSONObject jsonObject)
Sets the value of the Callback- Parameters:
jsonObject- The Json Object to represent the Callback
-
setValue
protected void setValue(java.lang.Object value, int index)Set the value for the input.- Parameters:
value- The input valueindex- The index of the element.
-
setValue
protected void setValue(java.lang.Object value)
Set the first value for input- Parameters:
value- The input value
-
getInputValue
public java.lang.Object getInputValue()
Get the first value for input
-
getInputValue
public java.lang.Object getInputValue(int index)
Get the value for input- Parameters:
index- The index of the element.
-
getContent
public java.lang.String getContent()
Description copied from interface:CallbackReturn the raw content of the Callback.- Specified by:
getContentin interfaceCallback
-
-