Class CashChangerProperties

java.lang.Object
de.gmxhome.conrad.jpos.jpos_base.JposCommonProperties
de.gmxhome.conrad.jpos.jpos_base.cashchanger.CashChangerProperties
All Implemented Interfaces:
CashChangerInterface, JposBaseInterface

public class CashChangerProperties extends JposCommonProperties implements CashChangerInterface
Class containing the cash changer specific properties, their default values and default implementations of CashChangerInterface. For details about properties, methods and method parameters, see UPOS specification, chapter Cash Changer.
  • Field Details

    • AsyncResultCode

      public int AsyncResultCode
      UPOS property AsyncResultCode. Default: STATUS_OK. Will be set when throwing a BillDispenserStatusUpdateEvent with STATUS_ASYNC.
    • AsyncResultCodeExtended

      public int AsyncResultCodeExtended
      UPOS property AsyncResultCodeExtended. Default: 0. Will be set when throwing a BillDispenserStatusUpdateEvent with STATUS_ASYNC.
    • CapDeposit

      public boolean CapDeposit
      UPOS property CapDeposit. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapDepositDataEvent

      public boolean CapDepositDataEvent
      UPOS property CapDepositDataEvent. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapDiscrepancy

      public boolean CapDiscrepancy
      UPOS property CapDiscrepancy. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapEmptySensor

      public boolean CapEmptySensor
      UPOS property CapEmptySensor. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapFullSensor

      public boolean CapFullSensor
      UPOS property CapFullSensor. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapJamSensor

      public boolean CapJamSensor
      UPOS property CapJamSensor. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapNearEmptySensor

      public boolean CapNearEmptySensor
      UPOS property CapNearEmptySensor. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapNearFullSensor

      public boolean CapNearFullSensor
      UPOS property CapNearFullSensor. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapPauseDeposit

      public boolean CapPauseDeposit
      UPOS property CapPauseDeposit. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapRealTimeData

      public boolean CapRealTimeData
      UPOS property CapRealTimeData. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapRepayDeposit

      public boolean CapRepayDeposit
      UPOS property CapRepayDeposit. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CurrencyCashList

      public String CurrencyCashList
      UPOS property CurrencyCashList. Default: null. Must be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CurrencyCode

      public String CurrencyCode
      UPOS property CurrencyCode. Default: null. Must be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CurrencyCodeList

      public String CurrencyCodeList
      UPOS property CurrencyCodeList. Default: null. Must be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CurrentExit

      public int CurrentExit
      UPOS property CurrentExit. Default: 1. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CurrentService

      public int CurrentService
      UPOS property CurrentService. Default: 0. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • DepositAmount

      public int DepositAmount
      UPOS property DepositAmount. Default: 0. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • DepositCashList

      public String DepositCashList
      UPOS property DepositCashList. Default: null. Must be overwritten by objects derived from JposDevice within the changeDefaults method.
    • DepositCodeList

      public String DepositCodeList
      UPOS property DepositCodeList. Default: null. Must be overwritten by objects derived from JposDevice within the changeDefaults method.
    • DepositCounts

      public String DepositCounts
      UPOS property DepositCounts. Default: null. Must be overwritten by objects derived from JposDevice within the changeDefaults method.
    • DepositStatus

      public Integer DepositStatus
      UPOS property DepositStatus.
    • DepositStatusDef

      public Integer DepositStatusDef
      Default value of DepositStatus property. Default: null. Must be updated before calling initOnEnable the first time.
    • DeviceExits

      public int DeviceExits
      UPOS property DeviceExits. Default: 1. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • DeviceStatus

      public Integer DeviceStatus
      UPOS property DeviceStatus.
    • DeviceStatusDef

      public Integer DeviceStatusDef
      Default value of DeviceStatus property. Default: null. Must be updated before calling initOnEnable the first time.
    • ExitCashList

      public String ExitCashList
      UPOS property ExitCashList. Default: null. Must be overwritten by objects derived from JposDevice within the changeDefaults method.
    • FullStatus

      public Integer FullStatus
      UPOS property FullStatus.
    • FullStatusDef

      public Integer FullStatusDef
      Default value of FullStatus property. Default: null. Must be overwritten before calling initOnEnable the first time.
    • RealTimeDataEnabled

      public Boolean RealTimeDataEnabled
      UPOS property RealTimeDataEnabled. Default: null. Must be overwritten by objects derived from JposDevice within the changeDefaults method.
    • ServiceCount

      public int ServiceCount
      UPOS property ServiceCount. Default: 0. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • ServiceIndex

      public int ServiceIndex
      UPOS property ServiceIndex. Default: 0. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
  • Constructor Details

    • CashChangerProperties

      protected CashChangerProperties(int dev)
      Constructor.
      Parameters:
      dev - Device index
  • Method Details

    • initOnEnable

      public void initOnEnable(boolean enable)
      Description copied from class: JposCommonProperties
      Initialization of properties that must be initialized during deviceEnable.
      Overrides:
      initOnEnable in class JposCommonProperties
      Parameters:
      enable - True: initialize properties, false: do nothing
    • currencyCode

      public void currencyCode(String code) throws jpos.JposException
      Description copied from interface: CashChangerInterface
      Final part of setting CurrencyCode. 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 open,
      • code is one of the values specified in CurrencyCodeList,
      • internal property AllowAlwaysSetProperties is true or code equals the previous value of CurrencyCode.
      Specified by:
      currencyCode in interface CashChangerInterface
      Parameters:
      code - New value for CurrencyCode property.
      Throws:
      jpos.JposException - If an error occurs.
    • currentExit

      public void currentExit(int i) throws jpos.JposException
      Description copied from interface: CashChangerInterface
      Final part of setting CurrentExit. 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 open,
      • i is neither less than one nor greater than DeviceExits.
      Specified by:
      currentExit in interface CashChangerInterface
      Parameters:
      i - New value for CurrentExit property.
      Throws:
      jpos.JposException - If an error occurs.
    • currentService

      public void currentService(int i) throws jpos.JposException
      Description copied from interface: CashChangerInterface
      Final part of setting CurrentService. 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 open,
      • i is neither less than zero nor greater than ServiceCount,
      • i is one of the index values specified in ServiceIndex.
      Specified by:
      currentService in interface CashChangerInterface
      Parameters:
      i - New value for CurrentService property.
      Throws:
      jpos.JposException - If an error occurs.
    • realTimeDataEnabled

      public void realTimeDataEnabled(boolean flag) throws jpos.JposException
      Description copied from interface: CashChangerInterface
      Final part of setting RealTimeDataEnabled. 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,
      • CapRealTimeData is true or flag is false.
      Specified by:
      realTimeDataEnabled in interface CashChangerInterface
      Parameters:
      flag - New value for RealTimeDataEnabled property.
      Throws:
      jpos.JposException - If an error occurs.
    • adjustCashCounts

      public void adjustCashCounts(String cashCounts) throws jpos.JposException
      Description copied from interface: CashChangerInterface
      Final part of AdjustCashCounts method. Can be overwritten in derived class, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • cashCounts consists of a comma separated, not empty list of integer value pairs separated by double-point,
      • one pair may start with ";" to indicate the first bill adjustment.
      Specified by:
      adjustCashCounts in interface CashChangerInterface
      Parameters:
      cashCounts - The cashCounts parameter contains cash types and amounts to be initialized.
      Throws:
      jpos.JposException - If an error occurs.
    • beginDeposit

      public void beginDeposit() throws jpos.JposException
      Default implementation of BeginDeposit simply sets DepositStatus to STATUS_DEPOSIT_START.
      Specified by:
      beginDeposit in interface CashChangerInterface
      Throws:
      jpos.JposException - never.
    • endDeposit

      public void endDeposit(int success) throws jpos.JposException
      Default implementation of EndDeposit simply sets DepositStatus to STATUS_DEPOSIT_END.
      Specified by:
      endDeposit in interface CashChangerInterface
      Parameters:
      success - The success parameter holds the value of how to deal with the cash that was deposited. Must be DEPOSIT_COMPLETE.
      Throws:
      jpos.JposException - never.
    • fixDeposit

      public void fixDeposit() throws jpos.JposException
      Default implementation of FixDeposit simply sets DepositStatus to STATUS_DEPOSIT_COUNT.
      Specified by:
      fixDeposit in interface CashChangerInterface
      Throws:
      jpos.JposException - never.
    • pauseDeposit

      public void pauseDeposit(int control) throws jpos.JposException
      Description copied from interface: CashChangerInterface
      Final part of PauseDeposit method. Can be overwritten in derived class, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • CapPauseDeposit is true,
      • control is DEPOSIT_PAUSE or DEPOSIT_RESTART,
      • if control is DEPOSIT_PAUSE, DepositStatus is not STATUS_DEPOSIT_END.
      Specified by:
      pauseDeposit in interface CashChangerInterface
      Parameters:
      control - The control parameter contains one of DEPOSIT_PAUSE and DEPOSIT_RESTART.
      Throws:
      jpos.JposException - If an error occurs.
    • readCashCounts

      public void readCashCounts(String[] cashCounts, boolean[] discrepancy) throws jpos.JposException
      Description copied from interface: CashChangerInterface
      Final part of ReadCashCounts method. Can be overwritten in derived class, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • cashCounts and discrepancy are arrays with length one.
      Specified by:
      readCashCounts in interface CashChangerInterface
      Parameters:
      cashCounts - The cash count data is placed into cashCounts.
      discrepancy - Reports whether not all counts could be updated as requested.
      Throws:
      jpos.JposException - If an error occurs.
    • dispenseCash

      public DispenseCash dispenseCash(String cashCounts) throws jpos.JposException
      Description copied from interface: CashChangerInterface
      Validation part of DispenseCash method. Can be overwritten within derived classes, if necessary. This method shall only perform additional validation. It will be called before the service buffers the method call for synchronous or asynchronous execution. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • all previous DispenseCash operations have been finished,
      • the remainder of cashCounts consists of a comma separated, not empty list of integer value pairs separated by double-point;
      • one pair may start with ";" to indicate the first bill dispense.
      Specified by:
      dispenseCash in interface CashChangerInterface
      Parameters:
      cashCounts - The cashCounts parameter contains the dispensing cash units and counts.
      Returns:
      DispenseCash object for use in final part.
      Throws:
      jpos.JposException - If an error occurs.
    • dispenseCash

      public void dispenseCash(DispenseCash request) throws jpos.JposException
      Description copied from interface: CashChangerInterface
      Final part of DispenseCash method. Can be overwritten within derived classes, if necessary. The parameters of the method will be passed via a DispenseCash object. This method will be called when the corresponding operation shall be performed, either synchronously or asynchronously. All plausibility checks have been made before, only runtime errors can occur.
      Specified by:
      dispenseCash in interface CashChangerInterface
      Parameters:
      request - Output request object returned by validation method that contains all parameters to be used by DispenseCash.
      Throws:
      jpos.JposException - If an error occurs.
    • dispenseChange

      public DispenseChange dispenseChange(int amount) throws jpos.JposException
      Description copied from interface: CashChangerInterface
      Validation part of DispenseChange method. Can be overwritten within derived classes, if necessary. This method shall only perform additional validation. It will be called before the service buffers the method call for synchronous or asynchronous execution. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • all previous DispenseCash and DispenseChange operations have been finished,
      • amount is greater than zero.
      Specified by:
      dispenseChange in interface CashChangerInterface
      Parameters:
      amount - The amount parameter contains the amount of change to be dispensed.
      Returns:
      DispenseChange object for use in final part.
      Throws:
      jpos.JposException - If an error occurs.
    • dispenseChange

      public void dispenseChange(DispenseChange request) throws jpos.JposException
      Description copied from interface: CashChangerInterface
      Final part of DispenseChange method. Can be overwritten within derived classes, if necessary. The parameters of the method will be passed via a DispenseChange object. This method will be called when the corresponding operation shall be performed, either synchronously or asynchronously. All plausibility checks have been made before, only runtime errors can occur.
      Specified by:
      dispenseChange in interface CashChangerInterface
      Parameters:
      request - Output request object returned by validation method that contains all parameters to be used by DispenseChange.
      Throws:
      jpos.JposException - If an error occurs.