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); }
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 Attachment parse(JSONObject json) throws JSONException { final URI selfUri = JsonParseUtil.getSelfUri(json); final String filename = json.getString("filename"); final BasicUser author = JsonParseUtil.parseBasicUser(json.optJSONObject("author")); final DateTime creationDate = JsonParseUtil.parseDateTime(json.getString("created")); final int size = json.getInt("size"); final String mimeType = json.getString("mimeType"); final URI contentURI = JsonParseUtil.parseURI(json.getString("content")); final URI thumbnailURI = JsonParseUtil.parseOptionalURI(json, THUMBNAIL); return new Attachment(selfUri, filename, author, creationDate, size, mimeType, contentURI, thumbnailURI); } }
@Override public Attachment parse(JSONObject json) throws JSONException { final URI selfUri = JsonParseUtil.getSelfUri(json); final String filename = json.getString("filename"); final BasicUser author = JsonParseUtil.parseBasicUser(json.optJSONObject("author")); final DateTime creationDate = JsonParseUtil.parseDateTime(json.getString("created")); final int size = json.getInt("size"); final String mimeType = json.getString("mimeType"); final URI contentURI = JsonParseUtil.parseURI(json.getString("content")); final URI thumbnailURI = JsonParseUtil.parseOptionalURI(json, THUMBNAIL); return new Attachment(selfUri, filename, author, creationDate, size, mimeType, contentURI, thumbnailURI); } }
@Override public Attachment parse(JSONObject json) throws JSONException { final URI selfUri = JsonParseUtil.getSelfUri(json); final String filename = json.getString("filename"); final BasicUser author = JsonParseUtil.parseBasicUser(json.optJSONObject("author")); final DateTime creationDate = JsonParseUtil.parseDateTime(json.getString("created")); final int size = json.getInt("size"); final String mimeType = json.getString("mimeType"); final URI contentURI = JsonParseUtil.parseURI(json.getString("content")); final URI thumbnailURI = JsonParseUtil.parseOptionalURI(json, THUMBNAIL); return new Attachment(selfUri, filename, author, creationDate, size, mimeType, contentURI, thumbnailURI); } }
@Override public Attachment parse(JSONObject json) throws JSONException { final URI selfUri = JsonParseUtil.getSelfUri(json); final String filename = json.getString("filename"); final BasicUser author = JsonParseUtil.parseBasicUser(json.optJSONObject("author")); final DateTime creationDate = JsonParseUtil.parseDateTime(json.getString("created")); final int size = json.getInt("size"); final String mimeType = json.getString("mimeType"); final URI contentURI = JsonParseUtil.parseURI(json.getString("content")); final URI thumbnailURI = JsonParseUtil.parseOptionalURI(json, THUMBNAIL); return new Attachment(selfUri, filename, author, creationDate, size, mimeType, contentURI, thumbnailURI); } }