Class MICRProperties

java.lang.Object
de.gmxhome.conrad.jpos.jpos_base.JposCommonProperties
de.gmxhome.conrad.jpos.jpos_base.micr.MICRProperties
All Implemented Interfaces:
JposBaseInterface, MICRInterface
Direct Known Subclasses:
MICR

public class MICRProperties extends JposCommonProperties implements MICRInterface
Class containing the MICR specific properties, their default values and default implementations of MICRInterface. For details about properties, methods and method parameters, see UPOS specification, chapter MICR - Magnetic Ink Character Recognition Reader.
  • Field Details

    • InsertionMode

      public boolean InsertionMode
      This property will be used internally to verify whether BeginInsertion and EndInsertion are valid operations. It will be initialized to false during device enable.
    • RemovalMode

      public boolean RemovalMode
      This property will be used internally to verify whether BeginRemoval and EndRemoval are valid operations. It will be initialized to false during device enable.
    • AccountNumber

      public String AccountNumber
      UPOS property AccountNumber.
    • Amount

      public String Amount
      UPOS property Amount.
    • BankNumber

      public String BankNumber
      UPOS property BankNumber.
    • CapValidationDevice

      public boolean CapValidationDevice
      UPOS property CapValidationDevice. Default: true. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CheckType

      public int CheckType
      UPOS property CheckType.
    • CountryCode

      public int CountryCode
      UPOS property CountryCode.
    • EPC

      public String EPC
      UPOS property EPC.
    • RawData

      public String RawData
      UPOS property RawData.
    • SerialNumber

      public String SerialNumber
      UPOS property SerialNumber.
    • TransitNumber

      public String TransitNumber
      UPOS property TransitNumber.
  • Constructor Details

    • MICRProperties

      public MICRProperties(int dev)
      Constructor.
      Parameters:
      dev - Device index
  • Method Details

    • initOnOpen

      public void initOnOpen()
      Description copied from class: JposCommonProperties
      Initialization of properties that must be initialized during open.
      Overrides:
      initOnOpen in class JposCommonProperties
    • clearDataProperties

      public void clearDataProperties()
      Description copied from class: JposCommonProperties
      Clear data properties. Performed during ClearInput and ClearInputProperties.
      Overrides:
      clearDataProperties in class JposCommonProperties
    • checkNoData

      public void checkNoData() throws jpos.JposException
      Description copied from interface: MICRInterface
      Checks whether MICR data are available for processing. The default implementation returns if CheckType > 0. Otherwise, a UPOS exception will be generated with error code E_EXTENDED and extender error code EMICR_NODATA. The following checks have been made before this method will be invoked:
      • The device has been claimed.
      Specified by:
      checkNoData in interface MICRInterface
      Throws:
      jpos.JposException - If MICR data cannot be retrieved.
    • checkBusy

      public void checkBusy() throws jpos.JposException
      Description copied from interface: MICRInterface
      Checks whether the device is busy. Since MICRService often shares one physical device with a printer, busy means MICR or printer of the device is busy. If checking property State is not enough, this method must be overwritten in a derived class.
      Specified by:
      checkBusy in interface MICRInterface
      Throws:
      jpos.JposException - If device is busy orin error status.
    • beginInsertion

      public void beginInsertion(int timeout) throws jpos.JposException
      Description copied from interface: MICRInterface
      Final part of BeginInsertion method. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • checkBusy did not throw an exception,
      • The timeout is ≥ 0 or JPOS_FOREVER.
      If the service enters insertion mode successfully after BeginInsertion failed, e.g. due to a timeout condition during delayed asynchronous insertion handling, property InsertionMode must be set to true by the specific service implementation to avoid EndInsertion to fail.
      Specified by:
      beginInsertion in interface MICRInterface
      Parameters:
      timeout - See UPOS specification, method BeginInsertion.
      Throws:
      jpos.JposException - See UPOS specification, method DisplayText.
    • beginRemoval

      public void beginRemoval(int timeout) throws jpos.JposException
      Description copied from interface: MICRInterface
      Final part of BeginRemoval method. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • checkBusy did not throw an exception,
      • The timeout is ≥ 0 or JPOS_FOREVER.
      If the service enters removal mode successfully after BeginRemoval failed, e.g. due to a timeout condition during delayed asynchronous removal handling, property RemovalMode must be set to true by the specific service implementation to avoid EndRemoval to fail.
      Specified by:
      beginRemoval in interface MICRInterface
      Parameters:
      timeout - See UPOS specification, method BeginRemoval.
      Throws:
      jpos.JposException - See UPOS specification, method DisplayText.
    • endInsertion

      public void endInsertion() throws jpos.JposException
      Description copied from interface: MICRInterface
      Final part of EndInsertion method. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • checkBusy did not throw an exception,
      • Device is not in insertion mode,
      Specified by:
      endInsertion in interface MICRInterface
      Throws:
      jpos.JposException - See UPOS specification, method EndInsertion.
    • endRemoval

      public void endRemoval() throws jpos.JposException
      Description copied from interface: MICRInterface
      Final part of EndRemoval method. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • checkBusy did not throw an exception,
      • Device is not in removal mode,
      Specified by:
      endRemoval in interface MICRInterface
      Throws:
      jpos.JposException - See UPOS specification, method EndRemoval.