public class

ChainedAoSaxHandler

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

Class Overview

A base class used for processing an AO 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.

This only processes the elements from the backup.

Summary

Constants
String AO_BACKUP_XML
String BOOLEAN
String COLUMN
String COLUMN_NAME
String DATA
String DATE
String DOUBLE
String INTEGER
String ROW
String STRING
String TABLE_NAME
Fields
public static final SecureXmlEntityResolver EMPTY_ENTITY_RESOLVER
Public Constructors
ChainedAoSaxHandler(TaskProgressProcessor taskProgressProcessor)
Constructor to create an AbstractHandler with progress feedback.
ChainedAoSaxHandler()
Simple constructor for creating an AbstractHandler without 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(AoEntityHandler handler)
void registerHandlers(Iterable<? extends AoEntityHandler> aoPluginPreImportHandlers)
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

Constants

public static final String AO_BACKUP_XML

Constant Value: "backup"

public static final String BOOLEAN

Constant Value: "boolean"

public static final String COLUMN

Constant Value: "column"

public static final String COLUMN_NAME

Constant Value: "name"

public static final String DATA

Constant Value: "data"

public static final String DATE

Constant Value: "timestamp"

public static final String DOUBLE

Constant Value: "double"

public static final String INTEGER

Constant Value: "integer"

public static final String ROW

Constant Value: "row"

public static final String STRING

Constant Value: "string"

public static final String TABLE_NAME

Constant Value: "tableName"

Fields

public static final SecureXmlEntityResolver EMPTY_ENTITY_RESOLVER

Public Constructors

public ChainedAoSaxHandler (TaskProgressProcessor taskProgressProcessor)

Constructor to create an AbstractHandler with progress feedback.

Parameters
taskProgressProcessor the TaskProgressProcessor that relays the progress information.

public ChainedAoSaxHandler ()

Simple constructor for creating an AbstractHandler without progress feedback.

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 (AoEntityHandler handler)

public void registerHandlers (Iterable<? extends AoEntityHandler> aoPluginPreImportHandlers)

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