public class

ChainedSaxHandler

extends DefaultHandler
java.lang.Object
   ↳ org.xml.sax.helpers.DefaultHandler
     ↳ com.atlassian.jira.imports.project.handler.ChainedSaxHandler

Class Overview

A base class used for processing a JIRA backup file. This collects Entity information and calls the 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.

Summary

Fields
public static final SecureXmlEntityResolver EMPTY_ENTITY_RESOLVER
Public Constructors
ChainedSaxHandler()
Simple constructor for creating an AbstractHandler without progress feedback.
ChainedSaxHandler(TaskProgressProcessor taskProgressProcessor)
Constructor to create an AbstractHandler with progress feedback.
Public Methods
final void characters(char[] ch, int start, int length)
final void endDocument()
void endElement(String uri, String localName, String qName)
long getEntityCount()
Provides the number of actual XML elements that the parser encounters.
void registerHandler(ImportEntityHandler handler)
InputSource resolveEntity(String publicId, String systemId)
final void startDocument()
final void startElement(String uri, String localName, String qName, Attributes attributes)
[Expand]
Inherited Methods
From class org.xml.sax.helpers.DefaultHandler
From class java.lang.Object
From interface org.xml.sax.ContentHandler
From interface org.xml.sax.DTDHandler
From interface org.xml.sax.EntityResolver
From interface org.xml.sax.ErrorHandler

Fields

public static final SecureXmlEntityResolver EMPTY_ENTITY_RESOLVER

Public Constructors

public ChainedSaxHandler ()

Simple constructor for creating an AbstractHandler without progress feedback.

public ChainedSaxHandler (TaskProgressProcessor taskProgressProcessor)

Constructor to create an AbstractHandler with progress feedback.

Parameters
taskProgressProcessor the TaskProgressProcessor that relays the progress information.

Public Methods

public final void characters (char[] ch, int start, int length)

Throws
SAXException

public final void endDocument ()

Throws
SAXException

public void endElement (String uri, String localName, String qName)

Throws
SAXException

public long getEntityCount ()

Provides the number of actual XML elements that the parser encounters.

Returns
  • number of actual XML elements the parser encounters

public void registerHandler (ImportEntityHandler handler)

public InputSource resolveEntity (String publicId, String systemId)

Throws
IOException
SAXException

public final void startDocument ()

Throws
SAXException

public final void startElement (String uri, String localName, String qName, Attributes attributes)

Throws
SAXException