com.atlassian.jira.action.admin
Class OfbizImportHandler
java.lang.Object
org.xml.sax.helpers.DefaultHandler
com.atlassian.jira.action.admin.OfbizImportHandler
- All Implemented Interfaces:
- ContentHandler, DTDHandler, EntityResolver, ErrorHandler
public class OfbizImportHandler
- extends DefaultHandler
Sax handler for constructing GenericValues from data in XML format.
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 |
OfbizImportHandler
public OfbizImportHandler(org.ofbiz.core.entity.GenericDelegator genericDelegator,
edu.emory.mathcs.backport.java.util.concurrent.Executor executor,
DataImport.ErrorHandler errorHandler)
startDocument
public void startDocument()
throws SAXException
- Specified by:
startDocument
in interface ContentHandler
- Overrides:
startDocument
in class DefaultHandler
- Throws:
SAXException
endDocument
public void endDocument()
throws SAXException
- Specified by:
endDocument
in interface ContentHandler
- Overrides:
endDocument
in class DefaultHandler
- Throws:
SAXException
startElement
public 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
createBuildNumber
void createBuildNumber()
- Sets the buildNumber property based on the collected property key and
value found in the xml. The buildNumber will be set to null if this
info couldn't be properly collected (i.e. it was absent).
checkElementForBuildNumberInfo
void checkElementForBuildNumberInfo(String qName,
Attributes attributes)
- Looks at the given elements for build number information. We're looking
for the OSPropertyEntry with the right propertyKey that references an
OSPropertyString (linked by id) which contains the build number value.
- Parameters:
qName
- element qNameattributes
- attributes of the element.
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 void characters(char[] ch,
int start,
int length)
throws SAXException
- Specified by:
characters
in interface ContentHandler
- Overrides:
characters
in class DefaultHandler
- Throws:
SAXException
setCreateEntities
public void setCreateEntities(boolean createEntities)
getEntityCount
public long getEntityCount()
getBuildNumber
public String getBuildNumber()
- Returns:
- the build number as read from the xml file or null if none found.
Copyright © 2002-2007 Atlassian. All Rights Reserved.