Package org.quality.gates.sonar.api
Class QualityGateResponseParser
java.lang.Object
org.quality.gates.sonar.api.QualityGateResponseParser
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected org.json.JSONArray
createJSONArrayFromString
(String jsonString) protected org.json.JSONObject
createJSONObjectFromString
(String jsonString) protected org.json.JSONObject
protected org.json.JSONObject
getJSONObjectFromArray
(org.json.JSONArray array, int index) protected org.json.JSONObject
getLatestEventResult
(org.json.JSONArray jsonArray) getQualityGateResultFromJSON
(String jsonString) protected String
getStatusFromJSONObject
(org.json.JSONObject jsonObject) protected String
getValueForJSONKey
(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
-