org.apache.maven.plugin.jira
Class JiraXML

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by org.apache.maven.plugin.jira.JiraXML
All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler

public class JiraXML
extends DefaultHandler

XML parser that extracts Issues from JIRA. This works on an XML file downloaded from JIRA and creates a List of issues that is exposed to the user of the class.

Version:
$Id: JiraXML.html 816603 2012-05-08 12:53:30Z hboutemy $

Constructor Summary
JiraXML(org.apache.maven.plugin.logging.Log log, String datePattern)
           
 
Method Summary
 void characters(char[] buf, int offset, int len)
           
 void endElement(String namespaceURI, String sName, String qName)
           
 List<Issue> getIssueList()
           
 String getJiraVersion()
           
 void parseXML(File xmlPath)
          Parse the given xml file.
 void startElement(String namespaceURI, String sName, String qName, Attributes attrs)
           
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JiraXML

public JiraXML(org.apache.maven.plugin.logging.Log log,
               String datePattern)
Parameters:
log - not null.
datePattern - may be null.
Since:
2.4
Method Detail

parseXML

public void parseXML(File xmlPath)
              throws org.apache.maven.plugin.MojoExecutionException
Parse the given xml file. The list of issues can then be retrieved with getIssueList().

Parameters:
xmlPath - the file to pares.
Throws:
org.apache.maven.plugin.MojoExecutionException
Since:
2.4

startElement

public void startElement(String namespaceURI,
                         String sName,
                         String qName,
                         Attributes attrs)
                  throws SAXException
Specified by:
startElement in interface ContentHandler
Overrides:
startElement in class DefaultHandler
Throws:
SAXException

endElement

public void endElement(String namespaceURI,
                       String sName,
                       String qName)
                throws SAXException
Specified by:
endElement in interface ContentHandler
Overrides:
endElement in class DefaultHandler
Throws:
SAXException

characters

public void characters(char[] buf,
                       int offset,
                       int len)
                throws SAXException
Specified by:
characters in interface ContentHandler
Overrides:
characters in class DefaultHandler
Throws:
SAXException

getIssueList

public List<Issue> getIssueList()

getJiraVersion

public String getJiraVersion()


Copyright © 2002-2011 The Apache Software Foundation. All Rights Reserved.