Added some docs explaining "positiveMatches" for conditional parsing.

This commit is contained in:
nsingh
2017-11-02 13:23:42 -07:00
parent d5fcd91148
commit a603de011a
2 changed files with 15 additions and 0 deletions

View File

@@ -66,6 +66,12 @@ public class LiveConditional {
return this;
}
/**
* This is a JSON key in "positiveMatches" element in the autoconfig report that contains information regarding
* the method that the conditional is applied to.
* @param positiveMatchKey
* @return
*/
public LiveConditionalBuilder positiveMatchKey(String positiveMatchKey) {
conditional.positiveMatchKey = positiveMatchKey;
return this;

View File

@@ -60,6 +60,11 @@ public class LiveConditionalParser {
return Optional.empty();
}
/**
* Fetches the "positiveMatches" element in the autoconfig report that contains conditional information.
* @param positiveMatchKey
* @return
*/
private Optional<JSONObject> getPositiveMatchesJson(String autoConfigReport) {
JSONObject autoConfigJson = new JSONObject(autoConfigReport);
@@ -78,6 +83,10 @@ public class LiveConditionalParser {
return Optional.empty();
}
/**
* Fetches all the conditionals listed in the the "positiveMatches" element in the autoconfig report.
*
*/
private List<LiveConditional> getConditionalsFromPositiveMatches(String autoconfigReport) {
List<LiveConditional> conditions = new ArrayList<>();