public class RedmineJSONBuilder
extends java.lang.Object
Constructor and Description |
---|
RedmineJSONBuilder() |
Modifier and Type | Method and Description |
---|---|
static void |
addIfSetShort2(org.json.JSONWriter writer,
java.lang.String jsonKeyName,
PropertyStorage storage,
Property<java.util.Date> property) |
static <T> java.lang.String |
toSimpleJSON(java.lang.String tag,
T object,
JsonObjectWriter<T> writer)
Converts object to a "simple" json.
|
static void |
writeCategory(org.json.JSONWriter writer,
IssueCategory category) |
static void |
writeGroup(org.json.JSONWriter writer,
Group group) |
static void |
writeIssue(org.json.JSONWriter writer,
Issue issue) |
static void |
writeMembership(org.json.JSONWriter writer,
Membership membership) |
static void |
writeProject(org.json.JSONWriter writer,
Project project)
Writes a "create project" request.
|
static void |
writeProject(Project project,
org.json.JSONWriter writer) |
static void |
writeUpload(org.json.JSONWriter writer,
Attachment attachment) |
static void |
writeUser(org.json.JSONWriter writer,
User user) |
static void |
writeWatchers(org.json.JSONWriter writer,
java.util.Collection<Watcher> watchers) |
static void |
writeWikiPageDetail(org.json.JSONWriter writer,
WikiPageDetail detail) |
public static void writeProject(org.json.JSONWriter writer, Project project) throws java.lang.IllegalArgumentException, org.json.JSONException
writer
- project writer.project
- project to create.java.lang.IllegalArgumentException
- if some project fields are not configured.org.json.JSONException
- if IO error occurs.public static <T> java.lang.String toSimpleJSON(java.lang.String tag, T object, JsonObjectWriter<T> writer) throws RedmineInternalError
tag
- object tag.object
- object to convert.writer
- object writer.RedmineInternalError
- if conversion fails.public static void writeProject(Project project, org.json.JSONWriter writer) throws org.json.JSONException
org.json.JSONException
public static void writeCategory(org.json.JSONWriter writer, IssueCategory category) throws org.json.JSONException
org.json.JSONException
public static void writeUser(org.json.JSONWriter writer, User user) throws org.json.JSONException
org.json.JSONException
public static void writeGroup(org.json.JSONWriter writer, Group group) throws org.json.JSONException
org.json.JSONException
public static void writeIssue(org.json.JSONWriter writer, Issue issue) throws org.json.JSONException
org.json.JSONException
public static void addIfSetShort2(org.json.JSONWriter writer, java.lang.String jsonKeyName, PropertyStorage storage, Property<java.util.Date> property) throws org.json.JSONException
org.json.JSONException
public static void writeUpload(org.json.JSONWriter writer, Attachment attachment) throws org.json.JSONException
org.json.JSONException
public static void writeMembership(org.json.JSONWriter writer, Membership membership) throws org.json.JSONException
org.json.JSONException
public static void writeWatchers(org.json.JSONWriter writer, java.util.Collection<Watcher> watchers) throws org.json.JSONException
org.json.JSONException
public static void writeWikiPageDetail(org.json.JSONWriter writer, WikiPageDetail detail) throws org.json.JSONException
org.json.JSONException