@Override public Field parse(final JSONObject jsonObject) throws JSONException { final String id = jsonObject.getString("id"); final String name = jsonObject.getString("name"); final Boolean orderable = jsonObject.getBoolean("orderable"); final Boolean navigable = jsonObject.getBoolean("navigable"); final Boolean searchable = jsonObject.getBoolean("searchable"); final FieldType custom = jsonObject.getBoolean("custom") ? FieldType.CUSTOM : FieldType.JIRA; final FieldSchema schema = jsonObject.has("schema") ? schemaJsonParser.parse(jsonObject.getJSONObject("schema")) : null; return new Field(id, name, custom, orderable, navigable, searchable, schema); }
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 Field parse(final JSONObject jsonObject) throws JSONException { final String id = jsonObject.getString("id"); final String name = jsonObject.getString("name"); final Boolean orderable = jsonObject.getBoolean("orderable"); final Boolean navigable = jsonObject.getBoolean("navigable"); final Boolean searchable = jsonObject.getBoolean("searchable"); final FieldType custom = jsonObject.getBoolean("custom") ? FieldType.CUSTOM : FieldType.JIRA; final FieldSchema schema = jsonObject.has("schema") ? schemaJsonParser.parse(jsonObject.getJSONObject("schema")) : null; return new Field(id, name, custom, orderable, navigable, searchable, schema); }
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); }
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); }
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); }