Class RedmineJSONParser


  • public final class RedmineJSONParser
    extends java.lang.Object
    A parser for JSON items sent by Redmine.
    • Constructor Detail

      • RedmineJSONParser

        public RedmineJSONParser()
    • 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
      • parseFiles

        public static File parseFiles​(org.json.JSONObject content)