com.atlassian.jira.imports.project.handler
Class ChainedSaxHandler
java.lang.Object
org.xml.sax.helpers.DefaultHandler
com.atlassian.jira.imports.project.handler.ChainedSaxHandler
- All Implemented Interfaces:
- org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler
public class ChainedSaxHandler
- extends org.xml.sax.helpers.DefaultHandler
A base class used for processing a JIRA backup file. This collects Entity information and calls the
ImportEntityHandler.handleEntity(String,java.util.Map)
method
on its registered delegates. The attributes map includes any attributes that may be nested as sub-elements.
If you construct this with a TaskProgressSink
then the progress of the XML
processing will be relayed.
- Since:
- v3.13
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ChainedSaxHandler
public ChainedSaxHandler()
- Simple constructor for creating an AbstractHandler without progress feedback.
ChainedSaxHandler
public ChainedSaxHandler(TaskProgressProcessor taskProgressProcessor)
- Constructor to create an AbstractHandler with progress feedback.
- Parameters:
taskProgressProcessor
- the TaskProgressProcessor that relays the progress information.
registerHandler
public void registerHandler(ImportEntityHandler handler)
getEntityCount
public long getEntityCount()
- Provides the number of actual XML elements that the parser encounters.
- Returns:
- number of actual XML elements the parser encounters
startDocument
public final void startDocument()
throws org.xml.sax.SAXException
- Specified by:
startDocument
in interface org.xml.sax.ContentHandler
- Overrides:
startDocument
in class org.xml.sax.helpers.DefaultHandler
- Throws:
org.xml.sax.SAXException
endDocument
public final void endDocument()
throws org.xml.sax.SAXException
- Specified by:
endDocument
in interface org.xml.sax.ContentHandler
- Overrides:
endDocument
in class org.xml.sax.helpers.DefaultHandler
- Throws:
org.xml.sax.SAXException
startElement
public final void startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attributes)
throws org.xml.sax.SAXException
- Specified by:
startElement
in interface org.xml.sax.ContentHandler
- Overrides:
startElement
in class org.xml.sax.helpers.DefaultHandler
- Throws:
org.xml.sax.SAXException
endElement
public void endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName)
throws org.xml.sax.SAXException
- Specified by:
endElement
in interface org.xml.sax.ContentHandler
- Overrides:
endElement
in class org.xml.sax.helpers.DefaultHandler
- Throws:
org.xml.sax.SAXException
characters
public final void characters(char[] ch,
int start,
int length)
throws org.xml.sax.SAXException
- Specified by:
characters
in interface org.xml.sax.ContentHandler
- Overrides:
characters
in class org.xml.sax.helpers.DefaultHandler
- Throws:
org.xml.sax.SAXException
Copyright © 2002-2011 Atlassian. All Rights Reserved.