Class PINPadDevice

All Implemented Interfaces:
Runnable

public class PINPadDevice extends JposDevice implements Runnable
JposDevice based dummy implementation for JavaPOS PINPad device service implementation. No real hardware. All read data with dummy values, operator interaction via OptionDialog boxes.
Supported configuration values for PINPad in jpos.xml can be used to set the corresponding property values:
  • CapMACCalculation: Can be TRUE or FALSE. Default is FALSE.
  • CapDisplay: Can be set to "PPAD_DISP_UNRESTRICTED", "PPAD_DISP_PINRESTRICTED", "PPAD_DISP_RESTRICTED_LIST", "PPAD_DISP_RESTRICTED_ORDER" or "PPAD_DISP_NONE". Default is "PPAD_DISP_NONE"
  • CapLanguage: Can be set to "PPAD_LANG_NONE", "PPAD_LANG_ONE", "PPAD_LANG_PINRESTRICTED" or "PPAD_LANG_UNRESTRICTED". Default is "PPAD_LANG_NONE"
  • MaximumPINLength: Can be set to one of "1", "2", "3", "4", "5", "6", "7", "8" or "9". Default is "4".
  • MinimumPINLength: Can be set to the same values as MaximumPINLength or to "0". Default is "4". MaximumPINLength must be greater or equal to MinimumPINLength.
If CapDisplay will be set to PPAD_DISP_UNRESTRICTED, CapLanguage will be set to PPAD_LANG_NONE and any configuration option for CapLanguage will be ignored.
Only one language will be supported: "EN,US".
"Encryption is very simple: The fixed value as stored in AdditionalSecurityInformation will be added to the byte code of every digit of the entered PIN.
UpdateKey excepts any key of any length, as long as the key number is between 1 and 3.
SPECIAL REMARKS: This sample does not implement any really existing PINPad system and shall not be used in any really existing cash register application. Therefore, it supports only one sample PINPad system to be specified in the BeginEFTTransaction method: "SAMPLE".
  • Constructor Details

    • PINPadDevice

      protected PINPadDevice(String id)
      The device implementation. See parent for further details.
      Parameters:
      id - Device ID, not used by implementation.
  • Method Details

    • checkProperties

      public void checkProperties(jpos.config.JposEntry entry) throws jpos.JposException
      Description copied from class: JposBaseDevice
      Checks whether a JposEntry belongs to a predefined property value an if so, sets the corresponding driver value
      Overrides:
      checkProperties in class JposBaseDevice
      Parameters:
      entry - Entry to be checked, contains value to be set
      Throws:
      jpos.JposException - if a property value is invalid
    • changeDefaults

      public void changeDefaults(PINPadProperties p)
      Description copied from class: JposDevice
      Change defaults of properties. Must be implemented within derived classed that support PIN pad services.
      Overrides:
      changeDefaults in class JposDevice
      Parameters:
      p - Property set for setting the property defaults
    • run

      public void run()
      Specified by:
      run in interface Runnable
    • getPINPadProperties

      public PINPadProperties getPINPadProperties(int index)
      Description copied from class: JposDevice
      Returns device implementation of PINPadProperties.
      Overrides:
      getPINPadProperties in class JposDevice
      Parameters:
      index - Device index, see constructor of JposCommonProperties.
      Returns:
      Instance of PINPadProperties that matches the requirements of the corresponding device service.