Class BaseOpt

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.json.simple.JSONObject responseJsonObj  
      protected java.lang.String responseStr  
    • Constructor Summary

      Constructors 
      Constructor Description
      BaseOpt()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object getDataPart​(org.json.simple.JSONObject obj)  
      java.lang.String getLocale​(org.json.simple.JSONObject obj)  
      java.lang.Object getMessagesFromResponse​(java.lang.String responseStr, java.lang.String node)  
      int getResponseCode​(org.json.simple.JSONObject obj)  
      java.lang.String getResponseMessage​(org.json.simple.JSONObject obj)  
      org.json.simple.JSONObject getResponsePart​(org.json.simple.JSONObject obj)  
      java.lang.Object getStatusFromResponse​(java.lang.String responseStr, java.lang.String node)
      get the status from response body
      boolean isSuccess​(int statusCode)  
      protected void parseServerResponse()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • responseStr

        protected java.lang.String responseStr
      • responseJsonObj

        protected org.json.simple.JSONObject responseJsonObj
    • Constructor Detail

      • BaseOpt

        public BaseOpt()
    • Method Detail

      • getMessagesFromResponse

        public java.lang.Object getMessagesFromResponse​(java.lang.String responseStr,
                                                        java.lang.String node)
      • getStatusFromResponse

        public java.lang.Object getStatusFromResponse​(java.lang.String responseStr,
                                                      java.lang.String node)
        get the status from response body
        Parameters:
        responseStr -
        node -
        Returns:
      • parseServerResponse

        protected void parseServerResponse()
                                    throws org.json.simple.parser.ParseException
        Throws:
        org.json.simple.parser.ParseException
      • getDataPart

        public java.lang.Object getDataPart​(org.json.simple.JSONObject obj)
      • getLocale

        public java.lang.String getLocale​(org.json.simple.JSONObject obj)
      • getResponsePart

        public org.json.simple.JSONObject getResponsePart​(org.json.simple.JSONObject obj)
      • getResponseCode

        public int getResponseCode​(org.json.simple.JSONObject obj)
      • getResponseMessage

        public java.lang.String getResponseMessage​(org.json.simple.JSONObject obj)
      • isSuccess

        public boolean isSuccess​(int statusCode)