Class ChainedOfBizSaxHandler
java.lang.Object
org.xml.sax.helpers.DefaultHandler
com.atlassian.jira.imports.project.handler.ChainedOfBizSaxHandler
- All Implemented Interfaces:
ContentHandler,DTDHandler,EntityResolver,ErrorHandler
A base class used for processing a JIRA backup file. This collects Entity information and calls the
If you construct this with a
ImportOfBizEntityHandler.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
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSimple constructor for creating an AbstractHandler without progress feedback.ChainedOfBizSaxHandler(TaskProgressProcessor taskProgressProcessor) Constructor to create an AbstractHandler with progress feedback. -
Method Summary
Modifier and TypeMethodDescriptionfinal voidcharacters(char[] ch, int start, int length) final voidvoidendElement(String uri, String localName, String qName) longProvides the number of actual XML elements that the parser encounters.voidregisterHandler(ImportOfBizEntityHandler handler) voidregisterHandlers(Iterable<? extends ImportOfBizEntityHandler> handlers) resolveEntity(String publicId, String systemId) final voidfinal voidstartElement(String uri, String localName, String qName, Attributes attributes) Methods inherited from class org.xml.sax.helpers.DefaultHandler
endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warningMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.xml.sax.ContentHandler
declaration
-
Field Details
-
EMPTY_ENTITY_RESOLVER
-
-
Constructor Details
-
ChainedOfBizSaxHandler
public ChainedOfBizSaxHandler()Simple constructor for creating an AbstractHandler without progress feedback. -
ChainedOfBizSaxHandler
Constructor to create an AbstractHandler with progress feedback.- Parameters:
taskProgressProcessor- theTaskProgressProcessorthat relays the progress information.
-
-
Method Details
-
registerHandler
-
registerHandlers
-
getEntityCount
public long getEntityCount()Provides the number of actual XML elements that the parser encounters.- Returns:
- number of actual XML elements the parser encounters
-
resolveEntity
- Specified by:
resolveEntityin interfaceEntityResolver- Overrides:
resolveEntityin classDefaultHandler- Throws:
IOExceptionSAXException
-
startDocument
- Specified by:
startDocumentin interfaceContentHandler- Overrides:
startDocumentin classDefaultHandler- Throws:
SAXException
-
endDocument
- Specified by:
endDocumentin interfaceContentHandler- Overrides:
endDocumentin classDefaultHandler- Throws:
SAXException
-
startElement
public final void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException - Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin classDefaultHandler- Throws:
SAXException
-
endElement
- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classDefaultHandler- Throws:
SAXException
-
characters
- Specified by:
charactersin interfaceContentHandler- Overrides:
charactersin classDefaultHandler- Throws:
SAXException
-