Class AbstractCallback

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int _id  
      protected java.lang.String content  
      protected static java.lang.String VALUE  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      int get_id()
      Get the _id received from server
      java.lang.String getContent()
      Get the callback content
      protected org.json.JSONObject getContentAsJson()  
      java.lang.Object getInputValue()
      Get the first value for input
      java.lang.Object getInputValue​(int index)
      Get the value for input
      protected java.lang.String getName​(org.json.JSONObject jsonObject)  
      protected abstract void setAttribute​(java.lang.String name, java.lang.Object value)  
      protected void setContent​(org.json.JSONObject jsonObject)
      Sets the value of the Callback
      protected void setValue​(java.lang.Object value)
      Set the first value for input
      protected void setValue​(java.lang.Object value, int index)
      Set the value for the input.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.forgerock.android.auth.callback.Callback

        getType
    • Field Detail

      • content

        protected java.lang.String content
      • _id

        protected int _id
    • Constructor Detail

      • AbstractCallback

        public AbstractCallback()
      • AbstractCallback

        public AbstractCallback​(org.json.JSONObject raw,
                                int index)
    • 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 value
        index - 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()
        Get the callback content
        Specified by:
        getContent in interface Callback
      • get_id

        public int get_id()
        Get the _id received from server
        Specified by:
        get_id in interface Callback
        Returns:
        The callback id.