org.apache.maven.plugin.jira
Class JiraXML
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.apache.maven.plugin.jira.JiraXML
- All Implemented Interfaces:
- ContentHandler, DTDHandler, EntityResolver, ErrorHandler
public class JiraXML
- extends org.xml.sax.helpers.DefaultHandler
XML parser that extracts Issue
s 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.java 1384337 2012-09-13 13:53:19Z olamy $
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 |
JiraXML
public JiraXML(Log log,
String datePattern)
- Parameters:
log
- not null.datePattern
- may be null.- Since:
- 2.4
parseXML
public void parseXML(File xmlPath)
throws MojoExecutionException
- Parse the given xml file. The list of issues can then be retrieved with
getIssueList()
.
- Parameters:
xmlPath
- the file to pares.
- Throws:
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 org.xml.sax.helpers.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 org.xml.sax.helpers.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 org.xml.sax.helpers.DefaultHandler
- Throws:
SAXException
getIssueList
public List<Issue> getIssueList()
getJiraVersion
public String getJiraVersion()
Copyright © 2002–2014 The Apache Software Foundation. All rights reserved.