Class VErrorParser

java.lang.Object
org.jpos.iso.validator.VErrorParser
All Implemented Interfaces:
Loggeable, LogSource

public class VErrorParser extends Object implements LogSource, Loggeable
Parse ISOComponents and put the errors into a list.

Title: jPOS

Description: Java Framework for Financial Systems

Copyright: Copyright (c) 2000 jPOS.org. All rights reserved.

Company: www.jPOS.org

  • Field Details

    • logger

      protected Logger logger
      Logger receiving parser diagnostic events.
    • realm

      protected String realm
      Logger realm associated with this parser.
  • Constructor Details

    • VErrorParser

      public VErrorParser()
      Default constructor; no instance state to initialise.
  • Method Details

    • getVErrors

      Parse an ISOComponent and get an error vector.
      Parameters:
      c - Component to parse.
      Returns:
      error vector.
    • parseXMLErrorList

      Returns an XML rendering of the parsed error list.
      Returns:
      the XML string (currently a stub; always empty)
    • setLogger

      public void setLogger(Logger logger, String realm)
      Description copied from interface: LogSource
      Attaches a Logger and realm to this log source.
      Specified by:
      setLogger in interface LogSource
      Parameters:
      logger - the logger to use
      realm - the log realm (diagnostic label)
    • getRealm

      public String getRealm()
      Description copied from interface: LogSource
      Returns the log realm associated with this source.
      Specified by:
      getRealm in interface LogSource
      Returns:
      log realm
    • getLogger

      public Logger getLogger()
      Description copied from interface: LogSource
      Returns the Logger associated with this source.
      Specified by:
      getLogger in interface LogSource
      Returns:
      the Logger
    • dump

      public void dump(PrintStream p, String indent)
      Parse error list, and get an dump the xml string representing the list.
      Ex:
      <isomsg>
        <field id="2">
          <error description="Invalid Len Error" reject-code="101"/>
        </field>
        <field id="48">
          <field id="0">
            <field id="1">
              <error description="Invalid Value Error" reject-code="102"/>
            </field>
          </field>
        </field>
        <error description="Field Expected Error" reject-code="999">
      </isomsg>
      
      Specified by:
      dump in interface Loggeable
      Parameters:
      p - output stream
      indent - indent character
    • resetErrors

      public void resetErrors()
      Free errors memory.