Package com.taskadapter.redmineapi.bean

Examples of com.taskadapter.redmineapi.bean.CustomField


    return result;
  }

  public static CustomField parseCustomField(JSONObject content)
      throws JSONException {
    final CustomField result = CustomFieldFactory.create(JsonInput.getInt(content, "id"));
    result.setName(JsonInput.getStringOrNull(content, "name"));

    if (!content.has("multiple"))
      result.setValue(JsonInput.getStringOrNull(content, "value"));
    else {
      JSONArray tmp = JsonInput.getArrayOrNull(content, "value");
      ArrayList<String> strings = new ArrayList<String>();
      for (int i = 0; i < tmp.length(); i++) {
        strings.add(String.valueOf(tmp.get(i)));
      }
      result.setValues(strings);
    }

    return result;
  }
View Full Code Here

TOP

Related Classes of com.taskadapter.redmineapi.bean.CustomField

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.