Package org.quality.gates.sonar.api
Class QualityGateResponseParser
java.lang.Object
org.quality.gates.sonar.api.QualityGateResponseParser
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.json.JSONArraycreateJSONArrayFromString(String jsonString) protected org.json.JSONObjectcreateJSONObjectFromString(String jsonString) protected org.json.JSONObjectprotected org.json.JSONObjectgetJSONObjectFromArray(org.json.JSONArray array, int index) protected org.json.JSONObjectgetLatestEventResult(org.json.JSONArray jsonArray) getQualityGateResultFromJSON(String jsonString) protected StringgetStatusFromJSONObject(org.json.JSONObject jsonObject) protected StringgetValueForJSONKey(List<org.json.JSONObject> array, int index, String key)
-
Constructor Details
-
QualityGateResponseParser
public QualityGateResponseParser()
-
-
Method Details
-
getQualityGateResultFromJSON
- Throws:
QGException
-
getLatestEventResult
- Throws:
QGException
-
createObjectWithStatusGreen
protected org.json.JSONObject createObjectWithStatusGreen() -
getJSONObjectFromArray
protected org.json.JSONObject getJSONObjectFromArray(org.json.JSONArray array, int index) throws QGException - Throws:
QGException
-
getValueForJSONKey
protected String getValueForJSONKey(List<org.json.JSONObject> array, int index, String key) throws QGException - Throws:
QGException
-
getStatusFromJSONObject
- Throws:
QGException
-
createJSONArrayFromString
- Throws:
QGException
-
createJSONObjectFromString
- Throws:
QGException
-