Class PackInHandler

java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.adempiere.pipo2.PackInHandler
All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler

public class PackInHandler extends DefaultHandler
SAX Handler for parsing XML description of the GUI.
Author:
Marco LOMBARDO, lombardo@mayking.com, Robert KLEIN, robeklein@hotmailo Contributor: William G. Heath - Import of workflows and dynamic validations
  • Constructor Details

    • PackInHandler

      public PackInHandler()
      PackInHandler Handler
  • Method Details

    • startElement

      public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException
      Receive notification of the start of an element.
      Specified by:
      startElement in interface ContentHandler
      Overrides:
      startElement in class DefaultHandler
      Parameters:
      uri - namespace
      localName - simple name
      qName - qualified name
      atts - attributes
      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
      See Also:
    • endElement

      public void endElement(String uri, String localName, String qName) throws SAXException
      Receive notification of the end of an element.
      Specified by:
      endElement in interface ContentHandler
      Overrides:
      endElement in class DefaultHandler
      Parameters:
      uri - namespace
      localName - simple name
      qName - qualified name
      Throws:
      SAXException
    • markImportFailed

      public void markImportFailed()
      Mark the package import as failed, setting PK_Status of the AD_Package_Imp and AD_Package_Imp_Inst records to MPackageImp#PACKAGE_STATUS_IMPORT_FAILED and adding the unresolved elements to the notifier to be included in the error log attached to the AD_Package_Imp record.
      The status is persisted out of transaction to survive the rollback of the import transaction. If the import transaction can still hold the lock on the records (the status was already updated in transaction), the status update is deferred to the rollback event of the import transaction.
    • setCtx

      public void setCtx(PIPOContext ctx)
    • setProcess

      public void setProcess(PackIn packIn)
      Parameters:
      packIn -
    • getElementsProcessed

      public int getElementsProcessed()
      Returns:
      number of elements that processed successfully
    • getUnresolvedCount

      public int getUnresolvedCount()
      Returns:
      number of unresolved elements
    • dumpUnresolvedElements

      public void dumpUnresolvedElements()