@Override public Map<String, CimFieldInfo> parse(JSONObject json) throws JSONException { final Map<String, CimFieldInfo> res = Maps.newHashMapWithExpectedSize(json.length()); final Iterator keysIterator = json.keys(); while (keysIterator.hasNext()) { final String id = (String) keysIterator.next(); res.put(id, parseIssueFieldInfo(json.getJSONObject(id), id)); } return res; }
private CimFieldInfo parseIssueFieldInfo(JSONObject json, String id) throws JSONException { final boolean required = json.getBoolean("required"); final String name = JsonParseUtil.getOptionalString(json, "name"); final FieldSchema schema = fieldSchemaJsonParser.parse(json.getJSONObject("schema")); final Set<StandardOperation> operations = parseOperations(json.getJSONArray("operations")); final Iterable<Object> allowedValues = parseAllowedValues(json.optJSONArray("allowedValues"), schema); final URI autoCompleteUri = JsonParseUtil.parseOptionalURI(json, "autoCompleteUrl"); return new CimFieldInfo(id, required, name, schema, operations, allowedValues, autoCompleteUri); }
@Override public CimIssueType parse(final JSONObject json) throws JSONException { final IssueType issueType = issueTypeJsonParser.parse(json); final JSONObject jsonFieldsMap = json.optJSONObject("fields"); final Map<String, CimFieldInfo> fields = (jsonFieldsMap == null) ? Collections.<String, CimFieldInfo>emptyMap() : fieldsParser.parse(jsonFieldsMap); return new CimIssueType(issueType.getSelf(), issueType.getId(), issueType.getName(), issueType.isSubtask(), issueType.getDescription(), issueType.getIconUri(), fields); } }
JsonObjectParser<Object> allowedValuesJsonParser = getParserFor(fieldSchema); if (allowedValuesJsonParser != null) { JSONArray valuesToParse;
private CimFieldInfo parseIssueFieldInfo(JSONObject json, String id) throws JSONException { final boolean required = json.getBoolean("required"); final String name = JsonParseUtil.getOptionalString(json, "name"); final FieldSchema schema = fieldSchemaJsonParser.parse(json.getJSONObject("schema")); final Set<StandardOperation> operations = parseOperations(json.getJSONArray("operations")); final Iterable<Object> allowedValues = parseAllowedValues(json.optJSONArray("allowedValues"), schema); final URI autoCompleteUri = JsonParseUtil.parseOptionalURI(json, "autoCompleteUrl"); return new CimFieldInfo(id, required, name, schema, operations, allowedValues, autoCompleteUri); }
@Override public CimIssueType parse(final JSONObject json) throws JSONException { final IssueType issueType = issueTypeJsonParser.parse(json); final JSONObject jsonFieldsMap = json.optJSONObject("fields"); final Map<String, CimFieldInfo> fields = (jsonFieldsMap == null) ? Collections.<String, CimFieldInfo>emptyMap() : fieldsParser.parse(jsonFieldsMap); return new CimIssueType(issueType.getSelf(), issueType.getId(), issueType.getName(), issueType.isSubtask(), issueType.getDescription(), issueType.getIconUri(), fields); } }
final JsonObjectParser<Object> allowedValuesJsonParser = getParserFor(fieldSchema); if (allowedValuesJsonParser != null) { JSONArray valuesToParse;
private CimFieldInfo parseIssueFieldInfo(JSONObject json, String id) throws JSONException { final boolean required = json.getBoolean("required"); final String name = JsonParseUtil.getOptionalString(json, "name"); final FieldSchema schema = fieldSchemaJsonParser.parse(json.getJSONObject("schema")); final Set<StandardOperation> operations = parseOperations(json.getJSONArray("operations")); final Iterable<Object> allowedValues = parseAllowedValues(json.optJSONArray("allowedValues"), schema); final URI autoCompleteUri = JsonParseUtil.parseOptionalURI(json, "autoCompleteUrl"); return new CimFieldInfo(id, required, name, schema, operations, allowedValues, autoCompleteUri); }
@Override public CimIssueType parse(final JSONObject json) throws JSONException { final IssueType issueType = issueTypeJsonParser.parse(json); final JSONObject jsonFieldsMap = json.optJSONObject("fields"); final Map<String, CimFieldInfo> fields = (jsonFieldsMap == null) ? Collections.<String, CimFieldInfo>emptyMap() : fieldsParser.parse(jsonFieldsMap); return new CimIssueType(issueType.getSelf(), issueType.getId(), issueType.getName(), issueType.isSubtask(), issueType.getDescription(), issueType.getIconUri(), fields); } }
@Override public Map<String, CimFieldInfo> parse(JSONObject json) throws JSONException { final Map<String, CimFieldInfo> res = Maps.newHashMapWithExpectedSize(json.length()); final Iterator keysIterator = json.keys(); while (keysIterator.hasNext()) { final String id = (String) keysIterator.next(); res.put(id, parseIssueFieldInfo(json.getJSONObject(id), id)); } return res; }
final JsonObjectParser<Object> allowedValuesJsonParser = getParserFor(fieldSchema); if (allowedValuesJsonParser != null) { JSONArray valuesToParse;
private CimFieldInfo parseIssueFieldInfo(JSONObject json, String id) throws JSONException { final boolean required = json.getBoolean("required"); final String name = JsonParseUtil.getOptionalString(json, "name"); final FieldSchema schema = fieldSchemaJsonParser.parse(json.getJSONObject("schema")); final Set<StandardOperation> operations = parseOperations(json.getJSONArray("operations")); final Iterable<Object> allowedValues = parseAllowedValues(json.optJSONArray("allowedValues"), schema); final URI autoCompleteUri = JsonParseUtil.parseOptionalURI(json, "autoCompleteUrl"); return new CimFieldInfo(id, required, name, schema, operations, allowedValues, autoCompleteUri); }
@Override public CimIssueType parse(final JSONObject json) throws JSONException { final IssueType issueType = issueTypeJsonParser.parse(json); final JSONObject jsonFieldsMap = json.optJSONObject("fields"); final Map<String, CimFieldInfo> fields = (jsonFieldsMap == null) ? Collections.<String, CimFieldInfo>emptyMap() : fieldsParser.parse(jsonFieldsMap); return new CimIssueType(issueType.getSelf(), issueType.getId(), issueType.getName(), issueType.isSubtask(), issueType.getDescription(), issueType.getIconUri(), fields); } }
@Override public Map<String, CimFieldInfo> parse(JSONObject json) throws JSONException { final Map<String, CimFieldInfo> res = Maps.newHashMapWithExpectedSize(json.length()); final Iterator keysIterator = json.keys(); while (keysIterator.hasNext()) { final String id = (String) keysIterator.next(); res.put(id, parseIssueFieldInfo(json.getJSONObject(id), id)); } return res; }
JsonObjectParser<Object> allowedValuesJsonParser = getParserFor(fieldSchema); if (allowedValuesJsonParser != null) { JSONArray valuesToParse;
@Override public Map<String, CimFieldInfo> parse(JSONObject json) throws JSONException { final Map<String, CimFieldInfo> res = Maps.newHashMapWithExpectedSize(json.length()); final Iterator keysIterator = json.keys(); while (keysIterator.hasNext()) { final String id = (String) keysIterator.next(); res.put(id, parseIssueFieldInfo(json.getJSONObject(id), id)); } return res; }