Class RedmineJSONParser
- java.lang.Object
-
- com.taskadapter.redmineapi.internal.RedmineJSONParser
-
public final class RedmineJSONParser extends java.lang.Object
A parser for JSON items sent by Redmine.
-
-
Constructor Summary
Constructors Constructor Description RedmineJSONParser()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.json.JSONObject
getResponse(java.lang.String body)
static org.json.JSONObject
getResponseSingleObject(java.lang.String body, java.lang.String key)
static Attachment
parseAttachments(org.json.JSONObject content)
static IssueCategory
parseCategory(org.json.JSONObject content)
static Changeset
parseChangeset(org.json.JSONObject content)
static CustomField
parseCustomField(org.json.JSONObject content)
static CustomFieldDefinition
parseCustomFieldDefinition(org.json.JSONObject content)
static java.util.List<java.lang.String>
parseErrors(java.lang.String responseBody)
static Group
parseGroup(org.json.JSONObject content)
static Issue
parseIssue(org.json.JSONObject content)
static IssuePriority
parseIssuePriority(org.json.JSONObject content)
static Journal
parseJournal(org.json.JSONObject content)
static JournalDetail
parseJournalDetail(org.json.JSONObject content)
static Membership
parseMembership(org.json.JSONObject content)
static Project
parseMinimalProject(org.json.JSONObject content)
Parses a "minimal" version of a project.static News
parseNews(org.json.JSONObject object)
static Project
parseProject(org.json.JSONObject content)
Parses a project.static IssueRelation
parseRelation(org.json.JSONObject content)
static Role
parseRole(org.json.JSONObject content)
static SavedQuery
parseSavedQuery(org.json.JSONObject object)
static IssueStatus
parseStatus(org.json.JSONObject object)
Parses a status.static TimeEntry
parseTimeEntry(org.json.JSONObject object)
static TimeEntryActivity
parseTimeEntryActivity(org.json.JSONObject content)
static Tracker
parseTracker(org.json.JSONObject object)
Parses a tracker.static User
parseUser(org.json.JSONObject content)
static Version
parseVersion(org.json.JSONObject content)
static Watcher
parseWatcher(org.json.JSONObject content)
static WikiPage
parseWikiPage(org.json.JSONObject object)
static WikiPageDetail
parseWikiPageDetail(org.json.JSONObject object)
-
-
-
Method Detail
-
parseTracker
public static Tracker parseTracker(org.json.JSONObject object) throws org.json.JSONException
Parses a tracker.- Parameters:
object
- object to parse.- Returns:
- parsed tracker.
- Throws:
org.json.JSONException
-
parseStatus
public static IssueStatus parseStatus(org.json.JSONObject object) throws org.json.JSONException
Parses a status.- Parameters:
object
- object to parse.- Returns:
- parsed tracker.
- Throws:
org.json.JSONException
-
parseSavedQuery
public static SavedQuery parseSavedQuery(org.json.JSONObject object) throws org.json.JSONException
- Throws:
org.json.JSONException
-
parseNews
public static News parseNews(org.json.JSONObject object) throws org.json.JSONException
- Throws:
org.json.JSONException
-
parseTimeEntry
public static TimeEntry parseTimeEntry(org.json.JSONObject object) throws org.json.JSONException
- Throws:
org.json.JSONException
-
parseMinimalProject
public static Project parseMinimalProject(org.json.JSONObject content) throws org.json.JSONException
Parses a "minimal" version of a project.- Parameters:
content
- content to parse.- Returns:
- parsed project.
- Throws:
org.json.JSONException
-
parseProject
public static Project parseProject(org.json.JSONObject content) throws org.json.JSONException
Parses a project.- Parameters:
content
- content to parse.- Returns:
- parsed project.
- Throws:
org.json.JSONException
-
parseIssue
public static Issue parseIssue(org.json.JSONObject content) throws org.json.JSONException
- Throws:
org.json.JSONException
-
parseCategory
public static IssueCategory parseCategory(org.json.JSONObject content) throws org.json.JSONException
- Throws:
org.json.JSONException
-
parseVersion
public static Version parseVersion(org.json.JSONObject content) throws org.json.JSONException
- Throws:
org.json.JSONException
-
parseRelation
public static IssueRelation parseRelation(org.json.JSONObject content) throws org.json.JSONException
- Throws:
org.json.JSONException
-
parseAttachments
public static Attachment parseAttachments(org.json.JSONObject content) throws org.json.JSONException
- Throws:
org.json.JSONException
-
parseCustomField
public static CustomField parseCustomField(org.json.JSONObject content) throws org.json.JSONException
- Throws:
org.json.JSONException
-
parseJournal
public static Journal parseJournal(org.json.JSONObject content) throws org.json.JSONException
- Throws:
org.json.JSONException
-
parseJournalDetail
public static JournalDetail parseJournalDetail(org.json.JSONObject content) throws org.json.JSONException
- Throws:
org.json.JSONException
-
parseChangeset
public static Changeset parseChangeset(org.json.JSONObject content) throws org.json.JSONException
- Throws:
org.json.JSONException
-
parseUser
public static User parseUser(org.json.JSONObject content) throws org.json.JSONException
- Throws:
org.json.JSONException
-
parseGroup
public static Group parseGroup(org.json.JSONObject content) throws org.json.JSONException
- Throws:
org.json.JSONException
-
parseRole
public static Role parseRole(org.json.JSONObject content) throws org.json.JSONException
- Throws:
org.json.JSONException
-
parseMembership
public static Membership parseMembership(org.json.JSONObject content) throws org.json.JSONException
- Throws:
org.json.JSONException
-
parseIssuePriority
public static IssuePriority parseIssuePriority(org.json.JSONObject content) throws org.json.JSONException
- Throws:
org.json.JSONException
-
parseTimeEntryActivity
public static TimeEntryActivity parseTimeEntryActivity(org.json.JSONObject content) throws org.json.JSONException
- Throws:
org.json.JSONException
-
parseWatcher
public static Watcher parseWatcher(org.json.JSONObject content) throws org.json.JSONException
- Throws:
org.json.JSONException
-
parseWikiPage
public static WikiPage parseWikiPage(org.json.JSONObject object) throws org.json.JSONException
- Throws:
org.json.JSONException
-
parseWikiPageDetail
public static WikiPageDetail parseWikiPageDetail(org.json.JSONObject object) throws org.json.JSONException
- Throws:
org.json.JSONException
-
parseErrors
public static java.util.List<java.lang.String> parseErrors(java.lang.String responseBody) throws org.json.JSONException
- Throws:
org.json.JSONException
-
getResponseSingleObject
public static org.json.JSONObject getResponseSingleObject(java.lang.String body, java.lang.String key) throws org.json.JSONException
- Throws:
org.json.JSONException
-
getResponse
public static org.json.JSONObject getResponse(java.lang.String body) throws org.json.JSONException
- Throws:
org.json.JSONException
-
parseCustomFieldDefinition
public static CustomFieldDefinition parseCustomFieldDefinition(org.json.JSONObject content) throws org.json.JSONException
- Throws:
org.json.JSONException
-
-