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:
- ContentHandler, DTDHandler, EntityResolver, ErrorHandler
public class ChainedSaxHandler
- extends 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 SAXException
- Specified by:
startDocument in interface ContentHandler- Overrides:
startDocument in class DefaultHandler
- Throws:
SAXException
endDocument
public final void endDocument()
throws SAXException
- Specified by:
endDocument in interface ContentHandler- Overrides:
endDocument in class DefaultHandler
- Throws:
SAXException
startElement
public final void startElement(String uri,
String localName,
String qName,
Attributes attributes)
throws SAXException
- Specified by:
startElement in interface ContentHandler- Overrides:
startElement in class DefaultHandler
- Throws:
SAXException
endElement
public void endElement(String uri,
String localName,
String qName)
throws SAXException
- Specified by:
endElement in interface ContentHandler- Overrides:
endElement in class DefaultHandler
- Throws:
SAXException
characters
public final void characters(char[] ch,
int start,
int length)
throws SAXException
- Specified by:
characters in interface ContentHandler- Overrides:
characters in class DefaultHandler
- Throws:
SAXException
Copyright © 2002-2011 Atlassian. All Rights Reserved.