From 6de5f74e6da350d465070e3c6b8949f2ea9b342f Mon Sep 17 00:00:00 2001 From: Martin <37701263+mjpcger@users.noreply.github.com> Date: Sat, 21 Aug 2021 01:07:18 +0200 Subject: [PATCH 1/4] Additions for 1.15 Aditions made for UPOS 1.15 --- src/main/java/jpos/BaseJposControl.java | 15 ++++++----- src/main/java/jpos/FiscalPrinter.java | 35 ++++++++++++++++++------- 2 files changed, 34 insertions(+), 16 deletions(-) diff --git a/src/main/java/jpos/BaseJposControl.java b/src/main/java/jpos/BaseJposControl.java index 39f3050..83527a8 100644 --- a/src/main/java/jpos/BaseJposControl.java +++ b/src/main/java/jpos/BaseJposControl.java @@ -1,10 +1,10 @@ -////////////////////////////////////////////////////////////////////// -// -// The JavaPOS library source code is now under the CPL license, which -// is an OSS Apache-like license. The complete license is located at: -// http://www.ibm.com/developerworks/library/os-cpl.html -// -////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////// +// +// The JavaPOS library source code is now under the CPL license, which +// is an OSS Apache-like license. The complete license is located at: +// http://www.ibm.com/developerworks/library/os-cpl.html +// +////////////////////////////////////////////////////////////////////// //---------------------------------------------------------------------------- // // This software is provided "AS IS". The JavaPOS working group (including @@ -48,6 +48,7 @@ public abstract class BaseJposControl protected static final int deviceVersion112 = 1012000; // 1.12.0 protected static final int deviceVersion113 = 1013000; // 1.13.0 protected static final int deviceVersion114 = 1014000; // 1.14.0 + protected static final int deviceVersion115 = 1015000; // 1.15.0 //-------------------------------------------------------------------------- diff --git a/src/main/java/jpos/FiscalPrinter.java b/src/main/java/jpos/FiscalPrinter.java index d4636d7..53b3989 100644 --- a/src/main/java/jpos/FiscalPrinter.java +++ b/src/main/java/jpos/FiscalPrinter.java @@ -1,10 +1,10 @@ -////////////////////////////////////////////////////////////////////// -// -// The JavaPOS library source code is now under the CPL license, which -// is an OSS Apache-like license. The complete license is located at: -// http://www.ibm.com/developerworks/library/os-cpl.html -// -////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////// +// +// The JavaPOS library source code is now under the CPL license, which +// is an OSS Apache-like license. The complete license is located at: +// http://www.ibm.com/developerworks/library/os-cpl.html +// +////////////////////////////////////////////////////////////////////// //------------------------------------------------------------------------------ // // This software is provided "AS IS". The JavaPOS working group (including @@ -30,7 +30,7 @@ public class FiscalPrinter extends BaseJposControl - implements FiscalPrinterControl114, JposConst + implements FiscalPrinterControl115, JposConst { //-------------------------------------------------------------------------- // Variables @@ -48,6 +48,7 @@ public class FiscalPrinter protected FiscalPrinterService112 service112; protected FiscalPrinterService113 service113; protected FiscalPrinterService114 service114; + protected FiscalPrinterService115 service115; protected Vector directIOListeners; protected Vector errorListeners; protected Vector outputCompleteListeners; @@ -62,7 +63,7 @@ public FiscalPrinter() { // Initialize base class instance data deviceControlDescription = "JavaPOS FiscalPrinter Device Control"; - deviceControlVersion = deviceVersion114; + deviceControlVersion = deviceVersion115; // Initialize instance data. Initializations are commented out for // efficiency if the Java default is correct. @@ -78,6 +79,7 @@ public FiscalPrinter() //service112 = null; //service113 = null; //service114 = null; + //service115 = null; directIOListeners = new Vector(); errorListeners = new Vector(); outputCompleteListeners = new Vector(); @@ -5393,6 +5395,7 @@ protected void setDeviceService(BaseService service, int nServiceVersion) service112 = null; service113 = null; service114 = null; + service115 = null; } else { @@ -5566,6 +5569,20 @@ protected void setDeviceService(BaseService service, int nServiceVersion) } } + if(serviceVersion >= deviceVersion115) + { + try + { + service115 = (FiscalPrinterService115)service; + } + catch(Exception e) + { + throw new JposException(JPOS_E_NOSERVICE, + "Service does not fully implement FiscalPrinterService115 interface", + e); + } + } + } } From 1ac199d4e6e0dbe1f46287be71c1ed1f21024ed5 Mon Sep 17 00:00:00 2001 From: Martin <37701263+mjpcger@users.noreply.github.com> Date: Sat, 9 Apr 2022 20:15:16 +0200 Subject: [PATCH 2/4] Upgrade to UPOS 1.15 Control implementations upgraded to 1.15 using the controls and services upgraded in contracts repo. Relevant changes only in ElectronicValueRW (FiscalPrinter changes have been made in previous commits). --- src/main/java/jpos/Belt.java | 36 +- src/main/java/jpos/BillAcceptor.java | 37 +- src/main/java/jpos/BillDispenser.java | 37 +- src/main/java/jpos/Biometrics.java | 37 +- src/main/java/jpos/BumpBar.java | 37 +- src/main/java/jpos/CAT.java | 37 +- src/main/java/jpos/CashChanger.java | 36 +- src/main/java/jpos/CashDrawer.java | 37 +- src/main/java/jpos/CheckScanner.java | 37 +- src/main/java/jpos/CoinAcceptor.java | 37 +- src/main/java/jpos/CoinDispenser.java | 37 +- src/main/java/jpos/ElectronicJournal.java | 36 +- src/main/java/jpos/ElectronicValueRW.java | 1721 +++++++++++++++++--- src/main/java/jpos/FiscalPrinter.java | 2 +- src/main/java/jpos/Gate.java | 37 +- src/main/java/jpos/HardTotals.java | 37 +- src/main/java/jpos/ImageScanner.java | 37 +- src/main/java/jpos/ItemDispenser.java | 37 +- src/main/java/jpos/Keylock.java | 37 +- src/main/java/jpos/Lights.java | 37 +- src/main/java/jpos/LineDisplay.java | 37 +- src/main/java/jpos/MICR.java | 37 +- src/main/java/jpos/MSR.java | 37 +- src/main/java/jpos/MotionSensor.java | 37 +- src/main/java/jpos/PINPad.java | 37 +- src/main/java/jpos/POSKeyboard.java | 37 +- src/main/java/jpos/POSPower.java | 37 +- src/main/java/jpos/POSPrinter.java | 37 +- src/main/java/jpos/PointCardRW.java | 37 +- src/main/java/jpos/RFIDScanner.java | 37 +- src/main/java/jpos/RemoteOrderDisplay.java | 37 +- src/main/java/jpos/Scale.java | 49 +- src/main/java/jpos/Scanner.java | 37 +- src/main/java/jpos/SignatureCapture.java | 37 +- src/main/java/jpos/SmartCardRW.java | 37 +- src/main/java/jpos/ToneIndicator.java | 37 +- 36 files changed, 2442 insertions(+), 548 deletions(-) diff --git a/src/main/java/jpos/Belt.java b/src/main/java/jpos/Belt.java index e457edc..deb4563 100644 --- a/src/main/java/jpos/Belt.java +++ b/src/main/java/jpos/Belt.java @@ -1,10 +1,10 @@ -////////////////////////////////////////////////////////////////////// -// -// The JavaPOS library source code is now under the CPL license, which -// is an OSS Apache-like license. The complete license is located at: -// http://www.ibm.com/developerworks/library/os-cpl.html -// -////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////// +// +// The JavaPOS library source code is now under the CPL license, which +// is an OSS Apache-like license. The complete license is located at: +// http://www.ibm.com/developerworks/library/os-cpl.html +// +////////////////////////////////////////////////////////////////////// //------------------------------------------------------------------------------ // // This software is provided "AS IS". The JavaPOS working group (including @@ -17,7 +17,7 @@ // software or its derivatives.Permission to use, copy, modify, and distribute // the software and its documentation for any purpose is hereby granted. // -// Belt.java - A JavaPOS 1.14.0 device control +// Belt.java - A JavaPOS 1.15.0 device control // //------------------------------------------------------------------------------ @@ -30,7 +30,7 @@ public class Belt extends BaseJposControl - implements BeltControl114, JposConst + implements BeltControl115, JposConst { //-------------------------------------------------------------------------- // Variables @@ -39,6 +39,7 @@ public class Belt protected BeltService112 service112; protected BeltService113 service113; protected BeltService114 service114; + protected BeltService115 service115; protected Vector directIOListeners; protected Vector statusUpdateListeners; @@ -51,13 +52,14 @@ public Belt() { // Initialize base class instance data deviceControlDescription = "JavaPOS Belt Device Control"; - deviceControlVersion = deviceVersion114; + deviceControlVersion = deviceVersion115; // Initialize instance data. Initializations are commented out for // efficiency if the Java default is correct. //service112 = null; //service113 = null; //service114 = null; + //service115 = null; directIOListeners = new Vector(); statusUpdateListeners = new Vector(); } @@ -1249,6 +1251,7 @@ protected void setDeviceService(BaseService service, int nServiceVersion) service112 = null; service113 = null; service114 = null; + service115 = null; } else { @@ -1296,6 +1299,19 @@ protected void setDeviceService(BaseService service, int nServiceVersion) } } + if(serviceVersion >= deviceVersion115) + { + try + { + service115 = (BeltService115)service; + } + catch(Exception e) + { + throw new JposException(JPOS_E_NOSERVICE, + "Service does not fully implement BeltService115 interface", + e); + } + } } } diff --git a/src/main/java/jpos/BillAcceptor.java b/src/main/java/jpos/BillAcceptor.java index f1586c2..cdd6828 100644 --- a/src/main/java/jpos/BillAcceptor.java +++ b/src/main/java/jpos/BillAcceptor.java @@ -1,10 +1,10 @@ -////////////////////////////////////////////////////////////////////// -// -// The JavaPOS library source code is now under the CPL license, which -// is an OSS Apache-like license. The complete license is located at: -// http://www.ibm.com/developerworks/library/os-cpl.html -// -////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////// +// +// The JavaPOS library source code is now under the CPL license, which +// is an OSS Apache-like license. The complete license is located at: +// http://www.ibm.com/developerworks/library/os-cpl.html +// +////////////////////////////////////////////////////////////////////// //------------------------------------------------------------------------------ // // This software is provided "AS IS". The JavaPOS working group (including @@ -17,7 +17,7 @@ // software or its derivatives.Permission to use, copy, modify, and distribute // the software and its documentation for any purpose is hereby granted. // -// BillAcceptor.java - A JavaPOS 1.14.0 device control +// BillAcceptor.java - A JavaPOS 1.15.0 device control // //------------------------------------------------------------------------------ @@ -30,7 +30,7 @@ public class BillAcceptor extends BaseJposControl - implements BillAcceptorControl114, JposConst + implements BillAcceptorControl115, JposConst { //-------------------------------------------------------------------------- // Variables @@ -40,6 +40,7 @@ public class BillAcceptor protected BillAcceptorService112 service112; protected BillAcceptorService113 service113; protected BillAcceptorService114 service114; + protected BillAcceptorService115 service115; protected Vector dataListeners; protected Vector directIOListeners; protected Vector statusUpdateListeners; @@ -53,7 +54,7 @@ public BillAcceptor() { // Initialize base class instance data deviceControlDescription = "JavaPOS BillAcceptor Device Control"; - deviceControlVersion = deviceVersion114; + deviceControlVersion = deviceVersion115; // Initialize instance data. Initializations are commented out for // efficiency if the Java default is correct. @@ -61,6 +62,7 @@ public BillAcceptor() //service112 = null; //service113 = null; //service114 = null; + //service115 = null; dataListeners = new Vector(); directIOListeners = new Vector(); statusUpdateListeners = new Vector(); @@ -1079,6 +1081,7 @@ protected void setDeviceService(BaseService service, int nServiceVersion) service112 = null; service113 = null; service114 = null; + service115 = null; } else { @@ -1140,6 +1143,20 @@ protected void setDeviceService(BaseService service, int nServiceVersion) } } + if(serviceVersion >= deviceVersion115) + { + try + { + service115 = (BillAcceptorService115)service; + } + catch(Exception e) + { + throw new JposException(JPOS_E_NOSERVICE, + "Service does not fully implement BillAcceptorService115 interface", + e); + } + } + } } diff --git a/src/main/java/jpos/BillDispenser.java b/src/main/java/jpos/BillDispenser.java index d7914fd..a7b5240 100644 --- a/src/main/java/jpos/BillDispenser.java +++ b/src/main/java/jpos/BillDispenser.java @@ -1,10 +1,10 @@ -////////////////////////////////////////////////////////////////////// -// -// The JavaPOS library source code is now under the CPL license, which -// is an OSS Apache-like license. The complete license is located at: -// http://www.ibm.com/developerworks/library/os-cpl.html -// -////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////// +// +// The JavaPOS library source code is now under the CPL license, which +// is an OSS Apache-like license. The complete license is located at: +// http://www.ibm.com/developerworks/library/os-cpl.html +// +////////////////////////////////////////////////////////////////////// //------------------------------------------------------------------------------ // // This software is provided "AS IS". The JavaPOS working group (including @@ -17,7 +17,7 @@ // software or its derivatives.Permission to use, copy, modify, and distribute // the software and its documentation for any purpose is hereby granted. // -// BillDispenser.java - A JavaPOS 1.14.0 device control +// BillDispenser.java - A JavaPOS 1.15.0 device control // //------------------------------------------------------------------------------ @@ -30,7 +30,7 @@ public class BillDispenser extends BaseJposControl - implements BillDispenserControl114, JposConst + implements BillDispenserControl115, JposConst { //-------------------------------------------------------------------------- // Variables @@ -40,6 +40,7 @@ public class BillDispenser protected BillDispenserService112 service112; protected BillDispenserService113 service113; protected BillDispenserService114 service114; + protected BillDispenserService115 service115; protected Vector directIOListeners; protected Vector statusUpdateListeners; @@ -52,7 +53,7 @@ public BillDispenser() { // Initialize base class instance data deviceControlDescription = "JavaPOS BillDispenser Device Control"; - deviceControlVersion = deviceVersion114; + deviceControlVersion = deviceVersion115; // Initialize instance data. Initializations are commented out for // efficiency if the Java default is correct. @@ -60,6 +61,7 @@ public BillDispenser() //service112 = null; //service113 = null; //service114 = null; + //service115 = null; directIOListeners = new Vector(); statusUpdateListeners = new Vector(); } @@ -952,6 +954,7 @@ protected void setDeviceService(BaseService service, int nServiceVersion) service112 = null; service113 = null; service114 = null; + service115 = null; } else { @@ -1013,6 +1016,20 @@ protected void setDeviceService(BaseService service, int nServiceVersion) } } + if(serviceVersion >= deviceVersion115) + { + try + { + service115 = (BillDispenserService115)service; + } + catch(Exception e) + { + throw new JposException(JPOS_E_NOSERVICE, + "Service does not fully implement BillDispenserService115 interface", + e); + } + } + } } diff --git a/src/main/java/jpos/Biometrics.java b/src/main/java/jpos/Biometrics.java index 3743c64..4e17490 100644 --- a/src/main/java/jpos/Biometrics.java +++ b/src/main/java/jpos/Biometrics.java @@ -1,10 +1,10 @@ -////////////////////////////////////////////////////////////////////// -// -// The JavaPOS library source code is now under the CPL license, which -// is an OSS Apache-like license. The complete license is located at: -// http://www.ibm.com/developerworks/library/os-cpl.html -// -////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////// +// +// The JavaPOS library source code is now under the CPL license, which +// is an OSS Apache-like license. The complete license is located at: +// http://www.ibm.com/developerworks/library/os-cpl.html +// +////////////////////////////////////////////////////////////////////// //------------------------------------------------------------------------------ // // This software is provided "AS IS". The JavaPOS working group (including @@ -17,7 +17,7 @@ // software or its derivatives.Permission to use, copy, modify, and distribute // the software and its documentation for any purpose is hereby granted. // -// Biometrics.java - A JavaPOS 1.14.0 device control +// Biometrics.java - A JavaPOS 1.15.0 device control // //------------------------------------------------------------------------------ @@ -30,7 +30,7 @@ public class Biometrics extends BaseJposControl - implements BiometricsControl114, JposConst + implements BiometricsControl115, JposConst { //-------------------------------------------------------------------------- // Variables @@ -41,6 +41,7 @@ public class Biometrics protected BiometricsService112 service112; protected BiometricsService113 service113; protected BiometricsService114 service114; + protected BiometricsService115 service115; protected Vector dataListeners; protected Vector directIOListeners; protected Vector errorListeners; @@ -55,7 +56,7 @@ public Biometrics() { // Initialize base class instance data deviceControlDescription = "JavaPOS Biometrics Device Control"; - deviceControlVersion = deviceVersion114; + deviceControlVersion = deviceVersion115; // Initialize instance data. Initializations are commented out for // efficiency if the Java default is correct. @@ -64,6 +65,7 @@ public Biometrics() //service112 = null; //service113 = null; //service114 = null; + //service115 = null; dataListeners = new Vector(); directIOListeners = new Vector(); errorListeners = new Vector(); @@ -1384,6 +1386,7 @@ protected void setDeviceService(BaseService service, int nServiceVersion) service112 = null; service113 = null; service114 = null; + service115 = null; } else { @@ -1459,6 +1462,20 @@ protected void setDeviceService(BaseService service, int nServiceVersion) } } + if(serviceVersion >= deviceVersion115) + { + try + { + service115 = (BiometricsService115)service; + } + catch(Exception e) + { + throw new JposException(JPOS_E_NOSERVICE, + "Service does not fully implement BiometricsService115 interface", + e); + } + } + } } diff --git a/src/main/java/jpos/BumpBar.java b/src/main/java/jpos/BumpBar.java index 3940171..148b1f1 100644 --- a/src/main/java/jpos/BumpBar.java +++ b/src/main/java/jpos/BumpBar.java @@ -1,10 +1,10 @@ -////////////////////////////////////////////////////////////////////// -// -// The JavaPOS library source code is now under the CPL license, which -// is an OSS Apache-like license. The complete license is located at: -// http://www.ibm.com/developerworks/library/os-cpl.html -// -////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////// +// +// The JavaPOS library source code is now under the CPL license, which +// is an OSS Apache-like license. The complete license is located at: +// http://www.ibm.com/developerworks/library/os-cpl.html +// +////////////////////////////////////////////////////////////////////// //------------------------------------------------------------------------------ // // This software is provided "AS IS". The JavaPOS working group (including @@ -17,7 +17,7 @@ // software or its derivatives.Permission to use, copy, modify, and distribute // the software and its documentation for any purpose is hereby granted. // -// BumpBar.java - A JavaPOS 1.14.0 device control +// BumpBar.java - A JavaPOS 1.15.0 device control // //------------------------------------------------------------------------------ @@ -30,7 +30,7 @@ public class BumpBar extends BaseJposControl - implements BumpBarControl114, JposConst + implements BumpBarControl115, JposConst { //-------------------------------------------------------------------------- // Variables @@ -48,6 +48,7 @@ public class BumpBar protected BumpBarService112 service112; protected BumpBarService113 service113; protected BumpBarService114 service114; + protected BumpBarService115 service115; protected Vector dataListeners; protected Vector directIOListeners; protected Vector errorListeners; @@ -63,7 +64,7 @@ public BumpBar() { // Initialize base class instance data deviceControlDescription = "JavaPOS BumpBar Device Control"; - deviceControlVersion = deviceVersion114; + deviceControlVersion = deviceVersion115; // Initialize instance data. Initializations are commented out for // efficiency if the Java default is correct. @@ -79,6 +80,7 @@ public BumpBar() //service112 = null; //service113 = null; //service114 = null; + //service115 = null; dataListeners = new Vector(); directIOListeners = new Vector(); errorListeners = new Vector(); @@ -1195,6 +1197,7 @@ protected void setDeviceService(BaseService service, int nServiceVersion) service112 = null; service113 = null; service114 = null; + service115 = null; } else { @@ -1368,6 +1371,20 @@ protected void setDeviceService(BaseService service, int nServiceVersion) } } + if(serviceVersion >= deviceVersion115) + { + try + { + service115 = (BumpBarService115)service; + } + catch(Exception e) + { + throw new JposException(JPOS_E_NOSERVICE, + "Service does not fully implement BumpBarService115 interface", + e); + } + } + } } diff --git a/src/main/java/jpos/CAT.java b/src/main/java/jpos/CAT.java index 67d0859..90aab73 100644 --- a/src/main/java/jpos/CAT.java +++ b/src/main/java/jpos/CAT.java @@ -1,10 +1,10 @@ -////////////////////////////////////////////////////////////////////// -// -// The JavaPOS library source code is now under the CPL license, which -// is an OSS Apache-like license. The complete license is located at: -// http://www.ibm.com/developerworks/library/os-cpl.html -// -////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////// +// +// The JavaPOS library source code is now under the CPL license, which +// is an OSS Apache-like license. The complete license is located at: +// http://www.ibm.com/developerworks/library/os-cpl.html +// +////////////////////////////////////////////////////////////////////// //------------------------------------------------------------------------------ // // This software is provided "AS IS". The JavaPOS working group (including @@ -17,7 +17,7 @@ // software or its derivatives.Permission to use, copy, modify, and distribute // the software and its documentation for any purpose is hereby granted. // -// CAT.java - A JavaPOS 1.14.0 device control +// CAT.java - A JavaPOS 1.15.0 device control // //------------------------------------------------------------------------------ @@ -30,7 +30,7 @@ public class CAT extends BaseJposControl - implements CATControl114, JposConst + implements CATControl115, JposConst { //-------------------------------------------------------------------------- // Variables @@ -47,6 +47,7 @@ public class CAT protected CATService112 service112; protected CATService113 service113; protected CATService114 service114; + protected CATService115 service115; protected Vector directIOListeners; protected Vector errorListeners; protected Vector outputCompleteListeners; @@ -61,7 +62,7 @@ public CAT() { // Initialize base class instance data deviceControlDescription = "JavaPOS CAT Device Control"; - deviceControlVersion = deviceVersion114; + deviceControlVersion = deviceVersion115; // Initialize instance data. Initializations are commented out for // efficiency if the Java default is correct. @@ -76,6 +77,7 @@ public CAT() //service112 = null; //service113 = null; //service114 = null; + //service115 = null; directIOListeners = new Vector(); errorListeners = new Vector(); outputCompleteListeners = new Vector(); @@ -1931,6 +1933,7 @@ protected void setDeviceService(BaseService service, int nServiceVersion) service112 = null; service113 = null; service114 = null; + service115 = null; } else { @@ -2090,6 +2093,20 @@ protected void setDeviceService(BaseService service, int nServiceVersion) } } + if(serviceVersion >= deviceVersion115) + { + try + { + service115 = (CATService115)service; + } + catch(Exception e) + { + throw new JposException(JPOS_E_NOSERVICE, + "Service does not fully implement CATService115 interface", + e); + } + } + } } diff --git a/src/main/java/jpos/CashChanger.java b/src/main/java/jpos/CashChanger.java index 9432389..4d9433f 100644 --- a/src/main/java/jpos/CashChanger.java +++ b/src/main/java/jpos/CashChanger.java @@ -1,10 +1,10 @@ -////////////////////////////////////////////////////////////////////// -// -// The JavaPOS library source code is now under the CPL license, which -// is an OSS Apache-like license. The complete license is located at: -// http://www.ibm.com/developerworks/library/os-cpl.html -// -////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////// +// +// The JavaPOS library source code is now under the CPL license, which +// is an OSS Apache-like license. The complete license is located at: +// http://www.ibm.com/developerworks/library/os-cpl.html +// +////////////////////////////////////////////////////////////////////// //------------------------------------------------------------------------------ // // This software is provided "AS IS". The JavaPOS working group (including @@ -17,7 +17,7 @@ // software or its derivatives.Permission to use, copy, modify, and distribute // the software and its documentation for any purpose is hereby granted. // -// CashChanger.java - A JavaPOS 1.14.0 device control +// CashChanger.java - A JavaPOS 1.15.0 device control // //------------------------------------------------------------------------------ @@ -30,7 +30,7 @@ public class CashChanger extends BaseJposControl - implements CashChangerControl114, JposConst + implements CashChangerControl115, JposConst { //-------------------------------------------------------------------------- // Variables @@ -49,6 +49,7 @@ public class CashChanger protected CashChangerService112 service112; protected CashChangerService113 service113; protected CashChangerService114 service114; + protected CashChangerService115 service115; protected Vector directIOListeners; protected Vector statusUpdateListeners; protected Vector dataListeners; @@ -62,7 +63,7 @@ public CashChanger() { // Initialize base class instance data deviceControlDescription = "JavaPOS CashChanger Device Control"; - deviceControlVersion = deviceVersion114; + deviceControlVersion = deviceVersion115; // Initialize instance data. Initializations are commented out for // efficiency if the Java default is correct. @@ -79,6 +80,7 @@ public CashChanger() //service112 = null; //service113 = null; //service114 = null; + //service115 = null; directIOListeners = new Vector(); statusUpdateListeners = new Vector(); dataListeners = new Vector(); @@ -1929,6 +1931,7 @@ protected void setDeviceService(BaseService service, int nServiceVersion) service112 = null; service113 = null; service114 = null; + service115 = null; } else { @@ -2116,6 +2119,19 @@ protected void setDeviceService(BaseService service, int nServiceVersion) } } + if(serviceVersion >= deviceVersion115) + { + try + { + service115 = (CashChangerService115)service; + } + catch(Exception e) + { + throw new JposException(JPOS_E_NOSERVICE, + "Service does not fully implement CashChangerService115 interface", + e); + } + } } } diff --git a/src/main/java/jpos/CashDrawer.java b/src/main/java/jpos/CashDrawer.java index 4f3e45c..481a1fe 100644 --- a/src/main/java/jpos/CashDrawer.java +++ b/src/main/java/jpos/CashDrawer.java @@ -1,10 +1,10 @@ -////////////////////////////////////////////////////////////////////// -// -// The JavaPOS library source code is now under the CPL license, which -// is an OSS Apache-like license. The complete license is located at: -// http://www.ibm.com/developerworks/library/os-cpl.html -// -////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////// +// +// The JavaPOS library source code is now under the CPL license, which +// is an OSS Apache-like license. The complete license is located at: +// http://www.ibm.com/developerworks/library/os-cpl.html +// +////////////////////////////////////////////////////////////////////// //------------------------------------------------------------------------------ // // This software is provided "AS IS". The JavaPOS working group (including @@ -17,7 +17,7 @@ // software or its derivatives.Permission to use, copy, modify, and distribute // the software and its documentation for any purpose is hereby granted. // -// CashDrawer.java - A JavaPOS 1.14.0 device control +// CashDrawer.java - A JavaPOS 1.15.0 device control // //------------------------------------------------------------------------------ @@ -30,7 +30,7 @@ public class CashDrawer extends BaseJposControl - implements CashDrawerControl114, JposConst + implements CashDrawerControl115, JposConst { //-------------------------------------------------------------------------- // Variables @@ -49,6 +49,7 @@ public class CashDrawer protected CashDrawerService112 service112; protected CashDrawerService113 service113; protected CashDrawerService114 service114; + protected CashDrawerService115 service115; protected Vector directIOListeners; protected Vector statusUpdateListeners; @@ -61,7 +62,7 @@ public CashDrawer() { // Initialize base class instance data deviceControlDescription = "JavaPOS CashDrawer Device Control"; - deviceControlVersion = deviceVersion114; + deviceControlVersion = deviceVersion115; // Initialize instance data. Initializations are commented out for // efficiency if the Java default is correct. @@ -78,6 +79,7 @@ public CashDrawer() //service112 = null; //service113 = null; //service114 = null; + //service115 = null; directIOListeners = new Vector(); statusUpdateListeners = new Vector(); } @@ -677,6 +679,7 @@ protected void setDeviceService(BaseService service, int nServiceVersion) service112 = null; service113 = null; service114 = null; + service115 = null; } else { @@ -864,6 +867,20 @@ protected void setDeviceService(BaseService service, int nServiceVersion) } } + if(serviceVersion >= deviceVersion115) + { + try + { + service115 = (CashDrawerService115)service; + } + catch(Exception e) + { + throw new JposException(JPOS_E_NOSERVICE, + "Service does not fully implement CashDrawerService115 interface", + e); + } + } + } } diff --git a/src/main/java/jpos/CheckScanner.java b/src/main/java/jpos/CheckScanner.java index 590eae3..fbfc98f 100644 --- a/src/main/java/jpos/CheckScanner.java +++ b/src/main/java/jpos/CheckScanner.java @@ -1,10 +1,10 @@ -////////////////////////////////////////////////////////////////////// -// -// The JavaPOS library source code is now under the CPL license, which -// is an OSS Apache-like license. The complete license is located at: -// http://www.ibm.com/developerworks/library/os-cpl.html -// -////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////// +// +// The JavaPOS library source code is now under the CPL license, which +// is an OSS Apache-like license. The complete license is located at: +// http://www.ibm.com/developerworks/library/os-cpl.html +// +////////////////////////////////////////////////////////////////////// //------------------------------------------------------------------------------ // // This software is provided "AS IS". The JavaPOS working group (including @@ -17,7 +17,7 @@ // software or its derivatives.Permission to use, copy, modify, and distribute // the software and its documentation for any purpose is hereby granted. // -// CheckScanner.java - A JavaPOS 1.14.0 device control +// CheckScanner.java - A JavaPOS 1.15.0 device control // //------------------------------------------------------------------------------ @@ -30,7 +30,7 @@ public class CheckScanner extends BaseJposControl - implements CheckScannerControl114, JposConst + implements CheckScannerControl115, JposConst { //-------------------------------------------------------------------------- // Variables @@ -44,6 +44,7 @@ public class CheckScanner protected CheckScannerService112 service112; protected CheckScannerService113 service113; protected CheckScannerService114 service114; + protected CheckScannerService115 service115; protected Vector dataListeners; protected Vector directIOListeners; protected Vector errorListeners; @@ -58,7 +59,7 @@ public CheckScanner() { // Initialize base class instance data deviceControlDescription = "JavaPOS CheckScanner Device Control"; - deviceControlVersion = deviceVersion114; + deviceControlVersion = deviceVersion115; // Initialize instance data. Initializations are commented out for // efficiency if the Java default is correct. @@ -70,6 +71,7 @@ public CheckScanner() //service112 = null; //service113 = null; //service114 = null; + //service115 = null; dataListeners = new Vector(); directIOListeners = new Vector(); errorListeners = new Vector(); @@ -1966,6 +1968,7 @@ protected void setDeviceService(BaseService service, int nServiceVersion) service112 = null; service113 = null; service114 = null; + service115 = null; } else { @@ -2083,6 +2086,20 @@ protected void setDeviceService(BaseService service, int nServiceVersion) } } + if(serviceVersion >= deviceVersion115) + { + try + { + service115 = (CheckScannerService115)service; + } + catch(Exception e) + { + throw new JposException(JPOS_E_NOSERVICE, + "Service does not fully implement CheckScannerService115 interface", + e); + } + } + } } diff --git a/src/main/java/jpos/CoinAcceptor.java b/src/main/java/jpos/CoinAcceptor.java index d8e94b9..afd7486 100644 --- a/src/main/java/jpos/CoinAcceptor.java +++ b/src/main/java/jpos/CoinAcceptor.java @@ -1,10 +1,10 @@ -////////////////////////////////////////////////////////////////////// -// -// The JavaPOS library source code is now under the CPL license, which -// is an OSS Apache-like license. The complete license is located at: -// http://www.ibm.com/developerworks/library/os-cpl.html -// -////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////// +// +// The JavaPOS library source code is now under the CPL license, which +// is an OSS Apache-like license. The complete license is located at: +// http://www.ibm.com/developerworks/library/os-cpl.html +// +////////////////////////////////////////////////////////////////////// //------------------------------------------------------------------------------ // // This software is provided "AS IS". The JavaPOS working group (including @@ -17,7 +17,7 @@ // software or its derivatives.Permission to use, copy, modify, and distribute // the software and its documentation for any purpose is hereby granted. // -// CoinAcceptor.java - A JavaPOS 1.14.0 device control +// CoinAcceptor.java - A JavaPOS 1.15.0 device control // //------------------------------------------------------------------------------ @@ -30,7 +30,7 @@ public class CoinAcceptor extends BaseJposControl - implements CoinAcceptorControl114, JposConst + implements CoinAcceptorControl115, JposConst { //-------------------------------------------------------------------------- // Variables @@ -40,6 +40,7 @@ public class CoinAcceptor protected CoinAcceptorService112 service112; protected CoinAcceptorService113 service113; protected CoinAcceptorService114 service114; + protected CoinAcceptorService115 service115; protected Vector dataListeners; protected Vector directIOListeners; protected Vector statusUpdateListeners; @@ -53,7 +54,7 @@ public CoinAcceptor() { // Initialize base class instance data deviceControlDescription = "JavaPOS CoinAcceptor Device Control"; - deviceControlVersion = deviceVersion114; + deviceControlVersion = deviceVersion115; // Initialize instance data. Initializations are commented out for // efficiency if the Java default is correct. @@ -61,6 +62,7 @@ public CoinAcceptor() //service112 = null; //service113 = null; //service114 = null; + //service115 = null; dataListeners = new Vector(); directIOListeners = new Vector(); statusUpdateListeners = new Vector(); @@ -1079,6 +1081,7 @@ protected void setDeviceService(BaseService service, int nServiceVersion) service112 = null; service113 = null; service114 = null; + service115 = null; } else { @@ -1140,6 +1143,20 @@ protected void setDeviceService(BaseService service, int nServiceVersion) } } + if(serviceVersion >= deviceVersion115) + { + try + { + service115 = (CoinAcceptorService115)service; + } + catch(Exception e) + { + throw new JposException(JPOS_E_NOSERVICE, + "Service does not fully implement CoinAcceptorService115 interface", + e); + } + } + } } diff --git a/src/main/java/jpos/CoinDispenser.java b/src/main/java/jpos/CoinDispenser.java index 50bb161..bddf213 100644 --- a/src/main/java/jpos/CoinDispenser.java +++ b/src/main/java/jpos/CoinDispenser.java @@ -1,10 +1,10 @@ -////////////////////////////////////////////////////////////////////// -// -// The JavaPOS library source code is now under the CPL license, which -// is an OSS Apache-like license. The complete license is located at: -// http://www.ibm.com/developerworks/library/os-cpl.html -// -////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////// +// +// The JavaPOS library source code is now under the CPL license, which +// is an OSS Apache-like license. The complete license is located at: +// http://www.ibm.com/developerworks/library/os-cpl.html +// +////////////////////////////////////////////////////////////////////// //------------------------------------------------------------------------------ // // This software is provided "AS IS". The JavaPOS working group (including @@ -17,7 +17,7 @@ // software or its derivatives.Permission to use, copy, modify, and distribute // the software and its documentation for any purpose is hereby granted. // -// CoinDispenser.java - A JavaPOS 1.14.0 device control +// CoinDispenser.java - A JavaPOS 1.15.0 device control // //------------------------------------------------------------------------------ @@ -30,7 +30,7 @@ public class CoinDispenser extends BaseJposControl - implements CoinDispenserControl114, JposConst + implements CoinDispenserControl115, JposConst { //-------------------------------------------------------------------------- // Variables @@ -49,6 +49,7 @@ public class CoinDispenser protected CoinDispenserService112 service112; protected CoinDispenserService113 service113; protected CoinDispenserService114 service114; + protected CoinDispenserService115 service115; protected Vector directIOListeners; protected Vector statusUpdateListeners; @@ -61,7 +62,7 @@ public CoinDispenser() { // Initialize base class instance data deviceControlDescription = "JavaPOS CoinDispenser Device Control"; - deviceControlVersion = deviceVersion114; + deviceControlVersion = deviceVersion115; // Initialize instance data. Initializations are commented out for // efficiency if the Java default is correct. @@ -78,6 +79,7 @@ public CoinDispenser() //service112 = null; //service113 = null; //service114 = null; + //service115 = null; directIOListeners = new Vector(); statusUpdateListeners = new Vector(); } @@ -734,6 +736,7 @@ protected void setDeviceService(BaseService service, int nServiceVersion) service112 = null; service113 = null; service114 = null; + service115 = null; } else { @@ -921,6 +924,20 @@ protected void setDeviceService(BaseService service, int nServiceVersion) } } + if(serviceVersion >= deviceVersion115) + { + try + { + service115 = (CoinDispenserService115)service; + } + catch(Exception e) + { + throw new JposException(JPOS_E_NOSERVICE, + "Service does not fully implement CoinDispenserService115 interface", + e); + } + } + } } diff --git a/src/main/java/jpos/ElectronicJournal.java b/src/main/java/jpos/ElectronicJournal.java index fea0633..64264b8 100644 --- a/src/main/java/jpos/ElectronicJournal.java +++ b/src/main/java/jpos/ElectronicJournal.java @@ -1,10 +1,10 @@ -////////////////////////////////////////////////////////////////////// -// -// The JavaPOS library source code is now under the CPL license, which -// is an OSS Apache-like license. The complete license is located at: -// http://www.ibm.com/developerworks/library/os-cpl.html -// -////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////// +// +// The JavaPOS library source code is now under the CPL license, which +// is an OSS Apache-like license. The complete license is located at: +// http://www.ibm.com/developerworks/library/os-cpl.html +// +////////////////////////////////////////////////////////////////////// //------------------------------------------------------------------------------ // // This software is provided "AS IS". The JavaPOS working group (including @@ -17,7 +17,7 @@ // software or its derivatives.Permission to use, copy, modify, and distribute // the software and its documentation for any purpose is hereby granted. // -// ElectronicJournal.java - A JavaPOS 1.14.0 device control +// ElectronicJournal.java - A JavaPOS 1.15.0 device control // //------------------------------------------------------------------------------ @@ -30,7 +30,7 @@ public class ElectronicJournal extends BaseJposControl - implements ElectronicJournalControl114, JposConst + implements ElectronicJournalControl115, JposConst { //-------------------------------------------------------------------------- // Variables @@ -41,6 +41,7 @@ public class ElectronicJournal protected ElectronicJournalService112 service112; protected ElectronicJournalService113 service113; protected ElectronicJournalService114 service114; + protected ElectronicJournalService115 service115; protected Vector dataListeners; protected Vector directIOListeners; protected Vector errorListeners; @@ -56,7 +57,7 @@ public ElectronicJournal() { // Initialize base class instance data deviceControlDescription = "JavaPOS ElectronicJournal Device Control"; - deviceControlVersion = deviceVersion114; + deviceControlVersion = deviceVersion115; // Initialize instance data. Initializations are commented out for // efficiency if the Java default is correct. @@ -65,6 +66,7 @@ public ElectronicJournal() //service112 = null; //service113 = null; //service114 = null; + //service115 = null; dataListeners = new Vector(); directIOListeners = new Vector(); errorListeners = new Vector(); @@ -1786,6 +1788,7 @@ protected void setDeviceService(BaseService service, int nServiceVersion) service112 = null; service113 = null; service114 = null; + service115 = null; } else { @@ -1861,6 +1864,19 @@ protected void setDeviceService(BaseService service, int nServiceVersion) } } + if(serviceVersion >= deviceVersion115) + { + try + { + service115 = (ElectronicJournalService115)service; + } + catch(Exception e) + { + throw new JposException(JPOS_E_NOSERVICE, + "Service does not fully implement ElectronicJournalService115 interface", + e); + } + } } } diff --git a/src/main/java/jpos/ElectronicValueRW.java b/src/main/java/jpos/ElectronicValueRW.java index 627b86e..d7f7afc 100644 --- a/src/main/java/jpos/ElectronicValueRW.java +++ b/src/main/java/jpos/ElectronicValueRW.java @@ -1,10 +1,10 @@ -////////////////////////////////////////////////////////////////////// -// -// The JavaPOS library source code is now under the CPL license, which -// is an OSS Apache-like license. The complete license is located at: -// http://www.ibm.com/developerworks/library/os-cpl.html -// -////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////// +// +// The JavaPOS library source code is now under the CPL license, which +// is an OSS Apache-like license. The complete license is located at: +// http://www.ibm.com/developerworks/library/os-cpl.html +// +////////////////////////////////////////////////////////////////////// //------------------------------------------------------------------------------ // // This software is provided "AS IS". The JavaPOS working group (including @@ -17,7 +17,7 @@ // software or its derivatives.Permission to use, copy, modify, and distribute // the software and its documentation for any purpose is hereby granted. // -// ElectronicValueRW.java - A JavaPOS 1.14.0 device control +// ElectronicValueRW.java - A JavaPOS 1.15.0 device control // //------------------------------------------------------------------------------ @@ -30,7 +30,7 @@ public class ElectronicValueRW extends BaseJposControl - implements ElectronicValueRWControl114, JposConst + implements ElectronicValueRWControl115, JposConst { //-------------------------------------------------------------------------- // Variables @@ -39,6 +39,7 @@ public class ElectronicValueRW protected ElectronicValueRWService112 service112; protected ElectronicValueRWService113 service113; protected ElectronicValueRWService114 service114; + protected ElectronicValueRWService115 service115; protected Vector dataListeners; protected Vector directIOListeners; protected Vector errorListeners; @@ -55,13 +56,14 @@ public ElectronicValueRW() { // Initialize base class instance data deviceControlDescription = "JavaPOS ElectronicValueRW Device Control"; - deviceControlVersion = deviceVersion114; + deviceControlVersion = deviceVersion115; // Initialize instance data. Initializations are commented out for // efficiency if the Java default is correct. //service112 = null; //service113 = null; //service114 = null; + //service115 = null; dataListeners = new Vector(); directIOListeners = new Vector(); errorListeners = new Vector(); @@ -732,13 +734,13 @@ public boolean getCapPINDevice() } } - public boolean CapTrainingMode() - throws JposException - { - return getCapTrainingMode(); - } - - public boolean getCapTrainingMode() + public boolean CapTrainingMode() + throws JposException + { + return getCapTrainingMode(); + } + + public boolean getCapTrainingMode() throws JposException { // Make sure control is opened @@ -2647,26 +2649,25 @@ public void queryLastSuccessfulTransactionResult() } } - public void retrieveResultInformation(String name, String[] value) - throws JposException - { + @Override + public boolean getCapAdditionalSecurityInformation() throws JposException { // Make sure control is opened if(!bOpen) { throw new JposException(JPOS_E_CLOSED, "Control not opened"); } - // Make sure service supports at least version 1.14.0 - if(serviceVersion < deviceVersion114) + // Make sure service supports at least version 1.15.0 + if(serviceVersion < deviceVersion115) { throw new JposException(JPOS_E_NOSERVICE, - "Device Service is not 1.14.0 compliant."); + "Device Service is not 1.15.0 compliant."); } // Perform the operation try { - service114.retrieveResultInformation(name, value); + return service115.getCapAdditionalSecurityInformation(); } catch(JposException je) { @@ -2675,30 +2676,29 @@ public void retrieveResultInformation(String name, String[] value) catch(Exception e) { throw new JposException(JPOS_E_FAILURE, - "Unhandled exception from Device Service", e); + "Unhandled exception from Device Service", e); } } - public void setParameterInformation(String name, String value) - throws JposException - { + @Override + public boolean getCapAuthorizeCompletion() throws JposException { // Make sure control is opened if(!bOpen) { throw new JposException(JPOS_E_CLOSED, "Control not opened"); } - // Make sure service supports at least version 1.14.0 - if(serviceVersion < deviceVersion114) + // Make sure service supports at least version 1.15.0 + if(serviceVersion < deviceVersion115) { throw new JposException(JPOS_E_NOSERVICE, - "Device Service is not 1.14.0 compliant."); + "Device Service is not 1.15.0 compliant."); } // Perform the operation try { - service114.setParameterInformation(name, value); + return service115.getCapAuthorizeCompletion(); } catch(JposException je) { @@ -2707,224 +2707,1543 @@ public void setParameterInformation(String name, String value) catch(Exception e) { throw new JposException(JPOS_E_FAILURE, - "Unhandled exception from Device Service", e); + "Unhandled exception from Device Service", e); } } + @Override + public boolean getCapAuthorizePreSales() throws JposException { + // Make sure control is opened + if(!bOpen) + { + throw new JposException(JPOS_E_CLOSED, "Control not opened"); + } - //-------------------------------------------------------------------------- - // Framework Methods - //-------------------------------------------------------------------------- - - // Create an EventCallbacks interface implementation object for this Control - protected EventCallbacks createEventCallbacks() - { - return new ElectronicValueRWCallbacks(); - } - - // Store the reference to the Device Service - protected void setDeviceService(BaseService service, int nServiceVersion) - throws JposException - { - // Special case: service == null to free references - if(service == null) + // Make sure service supports at least version 1.15.0 + if(serviceVersion < deviceVersion115) { + throw new JposException(JPOS_E_NOSERVICE, + "Device Service is not 1.15.0 compliant."); + } - service112 = null; - service113 = null; - service114 = null; + // Perform the operation + try + { + return service115.getCapAuthorizePreSales(); } - else + catch(JposException je) { - // Make sure that the service actually conforms to the interfaces it - // claims to. - if(serviceVersion >= deviceVersion112) - { - try - { - service112 = (ElectronicValueRWService112)service; - } - catch(Exception e) - { - throw new JposException(JPOS_E_NOSERVICE, - "Service does not fully implement ElectronicValueRWService112 interface", - e); - } - } - - if(serviceVersion >= deviceVersion113) - { - try - { - service113 = (ElectronicValueRWService113)service; - } - catch(Exception e) - { - throw new JposException(JPOS_E_NOSERVICE, - "Service does not fully implement ElectronicValueRWService113 interface", - e); - } - } - - if(serviceVersion >= deviceVersion114) - { - try - { - service114 = (ElectronicValueRWService114)service; - } - catch(Exception e) - { - throw new JposException(JPOS_E_NOSERVICE, - "Service does not fully implement ElectronicValueRWService114 interface", - e); - } - } - + throw je; + } + catch(Exception e) + { + throw new JposException(JPOS_E_FAILURE, + "Unhandled exception from Device Service", e); } } - - //-------------------------------------------------------------------------- - // Event Listener Methods - //-------------------------------------------------------------------------- - - public void addDataListener(DataListener l) - { - synchronized(dataListeners) + @Override + public boolean getCapAuthorizeRefund() throws JposException { + // Make sure control is opened + if(!bOpen) { - dataListeners.addElement(l); + throw new JposException(JPOS_E_CLOSED, "Control not opened"); } - } - public void removeDataListener(DataListener l) - { - synchronized(dataListeners) + // Make sure service supports at least version 1.15.0 + if(serviceVersion < deviceVersion115) { - dataListeners.removeElement(l); + throw new JposException(JPOS_E_NOSERVICE, + "Device Service is not 1.15.0 compliant."); } - } - public void addDirectIOListener(DirectIOListener l) - { - synchronized(directIOListeners) + // Perform the operation + try { - directIOListeners.addElement(l); + return service115.getCapAuthorizeRefund(); + } + catch(JposException je) + { + throw je; + } + catch(Exception e) + { + throw new JposException(JPOS_E_FAILURE, + "Unhandled exception from Device Service", e); } } - public void removeDirectIOListener(DirectIOListener l) - { - synchronized(directIOListeners) + @Override + public boolean getCapAuthorizeVoid() throws JposException { + // Make sure control is opened + if(!bOpen) { - directIOListeners.removeElement(l); + throw new JposException(JPOS_E_CLOSED, "Control not opened"); } - } - public void addErrorListener(ErrorListener l) - { - synchronized(errorListeners) + // Make sure service supports at least version 1.15.0 + if(serviceVersion < deviceVersion115) { - errorListeners.addElement(l); + throw new JposException(JPOS_E_NOSERVICE, + "Device Service is not 1.15.0 compliant."); } - } - public void removeErrorListener(ErrorListener l) - { - synchronized(errorListeners) + // Perform the operation + try { - errorListeners.removeElement(l); + return service115.getCapAuthorizeVoid(); + } + catch(JposException je) + { + throw je; + } + catch(Exception e) + { + throw new JposException(JPOS_E_FAILURE, + "Unhandled exception from Device Service", e); } } - public void addOutputCompleteListener(OutputCompleteListener l) - { - synchronized(outputCompleteListeners) + @Override + public boolean getCapAuthorizeVoidPreSales() throws JposException { + // Make sure control is opened + if(!bOpen) { - outputCompleteListeners.addElement(l); + throw new JposException(JPOS_E_CLOSED, "Control not opened"); } - } - public void removeOutputCompleteListener(OutputCompleteListener l) - { - synchronized(outputCompleteListeners) + // Make sure service supports at least version 1.15.0 + if(serviceVersion < deviceVersion115) { - outputCompleteListeners.removeElement(l); + throw new JposException(JPOS_E_NOSERVICE, + "Device Service is not 1.15.0 compliant."); } - } - public void addStatusUpdateListener(StatusUpdateListener l) - { - synchronized(statusUpdateListeners) + // Perform the operation + try { - statusUpdateListeners.addElement(l); + return service115.getCapAuthorizeVoidPreSales(); + } + catch(JposException je) + { + throw je; + } + catch(Exception e) + { + throw new JposException(JPOS_E_FAILURE, + "Unhandled exception from Device Service", e); } } - public void removeStatusUpdateListener(StatusUpdateListener l) - { - synchronized(statusUpdateListeners) + @Override + public boolean getCapCashDeposit() throws JposException { + // Make sure control is opened + if(!bOpen) { - statusUpdateListeners.removeElement(l); + throw new JposException(JPOS_E_CLOSED, "Control not opened"); } - } - public void addTransitionListener(TransitionListener l) - { - synchronized(transitionListeners) + // Make sure service supports at least version 1.15.0 + if(serviceVersion < deviceVersion115) { - transitionListeners.addElement(l); + throw new JposException(JPOS_E_NOSERVICE, + "Device Service is not 1.15.0 compliant."); } - } - public void removeTransitionListener(TransitionListener l) - { - synchronized(transitionListeners) + // Perform the operation + try { - transitionListeners.removeElement(l); + return service115.getCapCashDeposit(); + } + catch(JposException je) + { + throw je; + } + catch(Exception e) + { + throw new JposException(JPOS_E_FAILURE, + "Unhandled exception from Device Service", e); } } - - //-------------------------------------------------------------------------- - // EventCallbacks inner class - //-------------------------------------------------------------------------- - - protected class ElectronicValueRWCallbacks - implements EventCallbacks2 - { - public BaseControl getEventSource() + @Override + public boolean getCapCenterResultCode() throws JposException { + // Make sure control is opened + if(!bOpen) { - return (BaseControl)ElectronicValueRW.this; + throw new JposException(JPOS_E_CLOSED, "Control not opened"); } - public void fireDataEvent(DataEvent e) + // Make sure service supports at least version 1.15.0 + if(serviceVersion < deviceVersion115) { - synchronized(ElectronicValueRW.this.dataListeners) - { - // deliver the event to all registered listeners - for(int x = 0; x < dataListeners.size(); x++) - { - ((DataListener)dataListeners.elementAt(x)).dataOccurred(e); - } - } + throw new JposException(JPOS_E_NOSERVICE, + "Device Service is not 1.15.0 compliant."); } - public void fireDirectIOEvent(DirectIOEvent e) + // Perform the operation + try { - synchronized(ElectronicValueRW.this.directIOListeners) - { - // deliver the event to all registered listeners - for(int x = 0; x < directIOListeners.size(); x++) - { - ((DirectIOListener)directIOListeners.elementAt(x)).directIOOccurred(e); - } - } + return service115.getCapCenterResultCode(); } - - public void fireErrorEvent(ErrorEvent e) + catch(JposException je) { - synchronized(ElectronicValueRW.this.errorListeners) - { + throw je; + } + catch(Exception e) + { + throw new JposException(JPOS_E_FAILURE, + "Unhandled exception from Device Service", e); + } + } + + @Override + public boolean getCapCheckCard() throws JposException { + // Make sure control is opened + if(!bOpen) + { + throw new JposException(JPOS_E_CLOSED, "Control not opened"); + } + + // Make sure service supports at least version 1.15.0 + if(serviceVersion < deviceVersion115) + { + throw new JposException(JPOS_E_NOSERVICE, + "Device Service is not 1.15.0 compliant."); + } + + // Perform the operation + try + { + return service115.getCapCheckCard(); + } + catch(JposException je) + { + throw je; + } + catch(Exception e) + { + throw new JposException(JPOS_E_FAILURE, + "Unhandled exception from Device Service", e); + } + } + + @Override + public int getCapDailyLog() throws JposException { + // Make sure control is opened + if(!bOpen) + { + throw new JposException(JPOS_E_CLOSED, "Control not opened"); + } + + // Make sure service supports at least version 1.15.0 + if(serviceVersion < deviceVersion115) + { + throw new JposException(JPOS_E_NOSERVICE, + "Device Service is not 1.15.0 compliant."); + } + + // Perform the operation + try + { + return service115.getCapDailyLog(); + } + catch(JposException je) + { + throw je; + } + catch(Exception e) + { + throw new JposException(JPOS_E_FAILURE, + "Unhandled exception from Device Service", e); + } + } + + @Override + public boolean getCapInstallments() throws JposException { + // Make sure control is opened + if(!bOpen) + { + throw new JposException(JPOS_E_CLOSED, "Control not opened"); + } + + // Make sure service supports at least version 1.15.0 + if(serviceVersion < deviceVersion115) + { + throw new JposException(JPOS_E_NOSERVICE, + "Device Service is not 1.15.0 compliant."); + } + + // Perform the operation + try + { + return service115.getCapInstallments(); + } + catch(JposException je) + { + throw je; + } + catch(Exception e) + { + throw new JposException(JPOS_E_FAILURE, + "Unhandled exception from Device Service", e); + } + } + + @Override + public boolean getCapPaymentDetail() throws JposException { + // Make sure control is opened + if(!bOpen) + { + throw new JposException(JPOS_E_CLOSED, "Control not opened"); + } + + // Make sure service supports at least version 1.15.0 + if(serviceVersion < deviceVersion115) + { + throw new JposException(JPOS_E_NOSERVICE, + "Device Service is not 1.15.0 compliant."); + } + + // Perform the operation + try + { + return service115.getCapPaymentDetail(); + } + catch(JposException je) + { + throw je; + } + catch(Exception e) + { + throw new JposException(JPOS_E_FAILURE, + "Unhandled exception from Device Service", e); + } + } + + @Override + public boolean getCapTaxOthers() throws JposException { + // Make sure control is opened + if(!bOpen) + { + throw new JposException(JPOS_E_CLOSED, "Control not opened"); + } + + // Make sure service supports at least version 1.15.0 + if(serviceVersion < deviceVersion115) + { + throw new JposException(JPOS_E_NOSERVICE, + "Device Service is not 1.15.0 compliant."); + } + + // Perform the operation + try + { + return service115.getCapTaxOthers(); + } + catch(JposException je) + { + throw je; + } + catch(Exception e) + { + throw new JposException(JPOS_E_FAILURE, + "Unhandled exception from Device Service", e); + } + } + + @Override + public boolean getCapTransactionNumber() throws JposException { + // Make sure control is opened + if(!bOpen) + { + throw new JposException(JPOS_E_CLOSED, "Control not opened"); + } + + // Make sure service supports at least version 1.15.0 + if(serviceVersion < deviceVersion115) + { + throw new JposException(JPOS_E_NOSERVICE, + "Device Service is not 1.15.0 compliant."); + } + + // Perform the operation + try + { + return service115.getCapTransactionNumber(); + } + catch(JposException je) + { + throw je; + } + catch(Exception e) + { + throw new JposException(JPOS_E_FAILURE, + "Unhandled exception from Device Service", e); + } + } + + @Override + public boolean getCapMembershipCertificate() throws JposException { + // Make sure control is opened + if(!bOpen) + { + throw new JposException(JPOS_E_CLOSED, "Control not opened"); + } + + // Make sure service supports at least version 1.15.0 + if(serviceVersion < deviceVersion115) + { + throw new JposException(JPOS_E_NOSERVICE, + "Device Service is not 1.15.0 compliant."); + } + + // Perform the operation + try + { + return service115.getCapMembershipCertificate(); + } + catch(JposException je) + { + throw je; + } + catch(Exception e) + { + throw new JposException(JPOS_E_FAILURE, + "Unhandled exception from Device Service", e); + } + } + + @Override + public String getCardCompanyID() throws JposException { + // Make sure control is opened + if(!bOpen) + { + throw new JposException(JPOS_E_CLOSED, "Control not opened"); + } + + // Make sure service supports at least version 1.15.0 + if(serviceVersion < deviceVersion115) + { + throw new JposException(JPOS_E_NOSERVICE, + "Device Service is not 1.15.0 compliant."); + } + + // Perform the operation + try + { + return service115.getCardCompanyID(); + } + catch(JposException je) + { + throw je; + } + catch(Exception e) + { + throw new JposException(JPOS_E_FAILURE, + "Unhandled exception from Device Service", e); + } + } + + @Override + public String getCenterResultCode() throws JposException { + // Make sure control is opened + if(!bOpen) + { + throw new JposException(JPOS_E_CLOSED, "Control not opened"); + } + + // Make sure service supports at least version 1.15.0 + if(serviceVersion < deviceVersion115) + { + throw new JposException(JPOS_E_NOSERVICE, + "Device Service is not 1.15.0 compliant."); + } + + // Perform the operation + try + { + return service115.getCenterResultCode(); + } + catch(JposException je) + { + throw je; + } + catch(Exception e) + { + throw new JposException(JPOS_E_FAILURE, + "Unhandled exception from Device Service", e); + } + } + + @Override + public String getDailyLog() throws JposException { + // Make sure control is opened + if(!bOpen) + { + throw new JposException(JPOS_E_CLOSED, "Control not opened"); + } + + // Make sure service supports at least version 1.15.0 + if(serviceVersion < deviceVersion115) + { + throw new JposException(JPOS_E_NOSERVICE, + "Device Service is not 1.15.0 compliant."); + } + + // Perform the operation + try + { + return service115.getDailyLog(); + } + catch(JposException je) + { + throw je; + } + catch(Exception e) + { + throw new JposException(JPOS_E_FAILURE, + "Unhandled exception from Device Service", e); + } + } + + @Override + public int getPaymentCondition() throws JposException { + // Make sure control is opened + if(!bOpen) + { + throw new JposException(JPOS_E_CLOSED, "Control not opened"); + } + + // Make sure service supports at least version 1.15.0 + if(serviceVersion < deviceVersion115) + { + throw new JposException(JPOS_E_NOSERVICE, + "Device Service is not 1.15.0 compliant."); + } + + // Perform the operation + try + { + return service115.getPaymentCondition(); + } + catch(JposException je) + { + throw je; + } + catch(Exception e) + { + throw new JposException(JPOS_E_FAILURE, + "Unhandled exception from Device Service", e); + } + } + + @Override + public String getPaymentDetail() throws JposException { + // Make sure control is opened + if(!bOpen) + { + throw new JposException(JPOS_E_CLOSED, "Control not opened"); + } + + // Make sure service supports at least version 1.15.0 + if(serviceVersion < deviceVersion115) + { + throw new JposException(JPOS_E_NOSERVICE, + "Device Service is not 1.15.0 compliant."); + } + + // Perform the operation + try + { + return service115.getPaymentDetail(); + } + catch(JposException je) + { + throw je; + } + catch(Exception e) + { + throw new JposException(JPOS_E_FAILURE, + "Unhandled exception from Device Service", e); + } + } + + @Override + public int getPaymentMedia() throws JposException { + // Make sure control is opened + if(!bOpen) + { + throw new JposException(JPOS_E_CLOSED, "Control not opened"); + } + + // Make sure service supports at least version 1.15.0 + if(serviceVersion < deviceVersion115) + { + throw new JposException(JPOS_E_NOSERVICE, + "Device Service is not 1.15.0 compliant."); + } + + // Perform the operation + try + { + return service115.getPaymentMedia(); + } + catch(JposException je) + { + throw je; + } + catch(Exception e) + { + throw new JposException(JPOS_E_FAILURE, + "Unhandled exception from Device Service", e); + } + } + + @Override + public String getSlipNumber() throws JposException { + // Make sure control is opened + if(!bOpen) + { + throw new JposException(JPOS_E_CLOSED, "Control not opened"); + } + + // Make sure service supports at least version 1.15.0 + if(serviceVersion < deviceVersion115) + { + throw new JposException(JPOS_E_NOSERVICE, + "Device Service is not 1.15.0 compliant."); + } + + // Perform the operation + try + { + return service115.getSlipNumber(); + } + catch(JposException je) + { + throw je; + } + catch(Exception e) + { + throw new JposException(JPOS_E_FAILURE, + "Unhandled exception from Device Service", e); + } + } + + @Override + public String getTransactionNumber() throws JposException { + // Make sure control is opened + if(!bOpen) + { + throw new JposException(JPOS_E_CLOSED, "Control not opened"); + } + + // Make sure service supports at least version 1.15.0 + if(serviceVersion < deviceVersion115) + { + throw new JposException(JPOS_E_NOSERVICE, + "Device Service is not 1.15.0 compliant."); + } + + // Perform the operation + try + { + return service115.getTransactionNumber(); + } + catch(JposException je) + { + throw je; + } + catch(Exception e) + { + throw new JposException(JPOS_E_FAILURE, + "Unhandled exception from Device Service", e); + } + } + + @Override + public int getTransactionType() throws JposException { + // Make sure control is opened + if(!bOpen) + { + throw new JposException(JPOS_E_CLOSED, "Control not opened"); + } + + // Make sure service supports at least version 1.15.0 + if(serviceVersion < deviceVersion115) + { + throw new JposException(JPOS_E_NOSERVICE, + "Device Service is not 1.15.0 compliant."); + } + + // Perform the operation + try + { + return service115.getTransactionType(); + } + catch(JposException je) + { + throw je; + } + catch(Exception e) + { + throw new JposException(JPOS_E_FAILURE, + "Unhandled exception from Device Service", e); + } + } + + @Override + public int getServiceType() throws JposException { + // Make sure control is opened + if(!bOpen) + { + throw new JposException(JPOS_E_CLOSED, "Control not opened"); + } + + // Make sure service supports at least version 1.15.0 + if(serviceVersion < deviceVersion115) + { + throw new JposException(JPOS_E_NOSERVICE, + "Device Service is not 1.15.0 compliant."); + } + + // Perform the operation + try + { + return service115.getServiceType(); + } + catch(JposException je) + { + throw je; + } + catch(Exception e) + { + throw new JposException(JPOS_E_FAILURE, + "Unhandled exception from Device Service", e); + } + } + + @Override + public void accessDailyLog(int sequenceNumber, int type, int timeout) throws JposException { + // Make sure control is opened + if(!bOpen) + { + throw new JposException(JPOS_E_CLOSED, "Control not opened"); + } + + // Make sure service supports at least version 1.15.0 + if(serviceVersion < deviceVersion115) + { + throw new JposException(JPOS_E_NOSERVICE, + "Device Service is not 1.15.0 compliant."); + } + + // Perform the operation + try + { + service115.accessDailyLog(sequenceNumber, type, timeout); + } + catch(JposException je) + { + throw je; + } + catch(Exception e) + { + throw new JposException(JPOS_E_FAILURE, + "Unhandled exception from Device Service", e); + } + } + + @Override + public void accessData(int dataType, int[] data, Object[] object) throws JposException { + // Make sure control is opened + if(!bOpen) + { + throw new JposException(JPOS_E_CLOSED, "Control not opened"); + } + + // Make sure service supports at least version 1.15.0 + if(serviceVersion < deviceVersion115) + { + throw new JposException(JPOS_E_NOSERVICE, + "Device Service is not 1.15.0 compliant."); + } + + // Perform the operation + try + { + service115.accessData(dataType, data,object); + } + catch(JposException je) + { + throw je; + } + catch(Exception e) + { + throw new JposException(JPOS_E_FAILURE, + "Unhandled exception from Device Service", e); + } + } + + @Override + public void activateEVService(int[] data, Object[] object) throws JposException { + // Make sure control is opened + if(!bOpen) + { + throw new JposException(JPOS_E_CLOSED, "Control not opened"); + } + + // Make sure service supports at least version 1.15.0 + if(serviceVersion < deviceVersion115) + { + throw new JposException(JPOS_E_NOSERVICE, + "Device Service is not 1.15.0 compliant."); + } + + // Perform the operation + try + { + service115.activateEVService(data, object); + } + catch(JposException je) + { + throw je; + } + catch(Exception e) + { + throw new JposException(JPOS_E_FAILURE, + "Unhandled exception from Device Service", e); + } + } + + @Override + public void authorizeCompletion(int sequenceNumber, long amount, long taxOthers, int timeout) throws JposException { + // Make sure control is opened + if(!bOpen) + { + throw new JposException(JPOS_E_CLOSED, "Control not opened"); + } + + // Make sure service supports at least version 1.15.0 + if(serviceVersion < deviceVersion115) + { + throw new JposException(JPOS_E_NOSERVICE, + "Device Service is not 1.15.0 compliant."); + } + + // Perform the operation + try + { + service115.authorizeCompletion(sequenceNumber, amount, taxOthers, timeout); + } + catch(JposException je) + { + throw je; + } + catch(Exception e) + { + throw new JposException(JPOS_E_FAILURE, + "Unhandled exception from Device Service", e); + } + } + + @Override + public void authorizePreSales(int sequenceNumber, long amount, long taxOthers, int timeout) throws JposException { + // Make sure control is opened + if(!bOpen) + { + throw new JposException(JPOS_E_CLOSED, "Control not opened"); + } + + // Make sure service supports at least version 1.15.0 + if(serviceVersion < deviceVersion115) + { + throw new JposException(JPOS_E_NOSERVICE, + "Device Service is not 1.15.0 compliant."); + } + + // Perform the operation + try + { + service115.authorizePreSales(sequenceNumber, amount, taxOthers, timeout); + } + catch(JposException je) + { + throw je; + } + catch(Exception e) + { + throw new JposException(JPOS_E_FAILURE, + "Unhandled exception from Device Service", e); + } + } + + @Override + public void authorizeRefund(int sequenceNumber, long amount, long taxOthers, int timeout) throws JposException { + // Make sure control is opened + if(!bOpen) + { + throw new JposException(JPOS_E_CLOSED, "Control not opened"); + } + + // Make sure service supports at least version 1.15.0 + if(serviceVersion < deviceVersion115) + { + throw new JposException(JPOS_E_NOSERVICE, + "Device Service is not 1.15.0 compliant."); + } + + // Perform the operation + try + { + service115.authorizeRefund(sequenceNumber, amount, taxOthers, timeout); + } + catch(JposException je) + { + throw je; + } + catch(Exception e) + { + throw new JposException(JPOS_E_FAILURE, + "Unhandled exception from Device Service", e); + } + } + + @Override + public void authorizeSales(int sequenceNumber, long amount, long taxOthers, int timeout) throws JposException { + // Make sure control is opened + if(!bOpen) + { + throw new JposException(JPOS_E_CLOSED, "Control not opened"); + } + + // Make sure service supports at least version 1.15.0 + if(serviceVersion < deviceVersion115) + { + throw new JposException(JPOS_E_NOSERVICE, + "Device Service is not 1.15.0 compliant."); + } + + // Perform the operation + try + { + service115.authorizeSales(sequenceNumber, amount, taxOthers, timeout); + } + catch(JposException je) + { + throw je; + } + catch(Exception e) + { + throw new JposException(JPOS_E_FAILURE, + "Unhandled exception from Device Service", e); + } + } + + @Override + public void authorizeVoid(int sequenceNumber, long amount, long taxOthers, int timeout) throws JposException { + // Make sure control is opened + if(!bOpen) + { + throw new JposException(JPOS_E_CLOSED, "Control not opened"); + } + + // Make sure service supports at least version 1.15.0 + if(serviceVersion < deviceVersion115) + { + throw new JposException(JPOS_E_NOSERVICE, + "Device Service is not 1.15.0 compliant."); + } + + // Perform the operation + try + { + service115.authorizeVoid(sequenceNumber, amount, taxOthers, timeout); + } + catch(JposException je) + { + throw je; + } + catch(Exception e) + { + throw new JposException(JPOS_E_FAILURE, + "Unhandled exception from Device Service", e); + } + } + + @Override + public void authorizeVoidPreSales(int sequenceNumber, long amount, long taxOthers, int timeout) throws JposException { + // Make sure control is opened + if(!bOpen) + { + throw new JposException(JPOS_E_CLOSED, "Control not opened"); + } + + // Make sure service supports at least version 1.15.0 + if(serviceVersion < deviceVersion115) + { + throw new JposException(JPOS_E_NOSERVICE, + "Device Service is not 1.15.0 compliant."); + } + + // Perform the operation + try + { + service115.authorizeVoidPreSales(sequenceNumber, amount, taxOthers, timeout); + } + catch(JposException je) + { + throw je; + } + catch(Exception e) + { + throw new JposException(JPOS_E_FAILURE, + "Unhandled exception from Device Service", e); + } + } + + @Override + public void cashDeposit(int sequenceNumber, long amount, int timeout) throws JposException { + // Make sure control is opened + if(!bOpen) + { + throw new JposException(JPOS_E_CLOSED, "Control not opened"); + } + + // Make sure service supports at least version 1.15.0 + if(serviceVersion < deviceVersion115) + { + throw new JposException(JPOS_E_NOSERVICE, + "Device Service is not 1.15.0 compliant."); + } + + // Perform the operation + try + { + service115.cashDeposit(sequenceNumber, amount, timeout); + } + catch(JposException je) + { + throw je; + } + catch(Exception e) + { + throw new JposException(JPOS_E_FAILURE, + "Unhandled exception from Device Service", e); + } + } + + @Override + public void checkCard(int sequenceNumber, int timeout) throws JposException { + // Make sure control is opened + if(!bOpen) + { + throw new JposException(JPOS_E_CLOSED, "Control not opened"); + } + + // Make sure service supports at least version 1.15.0 + if(serviceVersion < deviceVersion115) + { + throw new JposException(JPOS_E_NOSERVICE, + "Device Service is not 1.15.0 compliant."); + } + + // Perform the operation + try + { + service115.checkCard(sequenceNumber, timeout); + } + catch(JposException je) + { + throw je; + } + catch(Exception e) + { + throw new JposException(JPOS_E_FAILURE, + "Unhandled exception from Device Service", e); + } + } + + @Override + public void checkServiceRegistrationToMedium(int sequenceNumber, int timeout) throws JposException { + // Make sure control is opened + if(!bOpen) + { + throw new JposException(JPOS_E_CLOSED, "Control not opened"); + } + + // Make sure service supports at least version 1.15.0 + if(serviceVersion < deviceVersion115) + { + throw new JposException(JPOS_E_NOSERVICE, + "Device Service is not 1.15.0 compliant."); + } + + // Perform the operation + try + { + service115.checkServiceRegistrationToMedium(sequenceNumber, timeout); + } + catch(JposException je) + { + throw je; + } + catch(Exception e) + { + throw new JposException(JPOS_E_FAILURE, + "Unhandled exception from Device Service", e); + } + } + + @Override + public void closeDailyEVService(int[] data, Object[] object) throws JposException { + // Make sure control is opened + if(!bOpen) + { + throw new JposException(JPOS_E_CLOSED, "Control not opened"); + } + + // Make sure service supports at least version 1.15.0 + if(serviceVersion < deviceVersion115) + { + throw new JposException(JPOS_E_NOSERVICE, + "Device Service is not 1.15.0 compliant."); + } + + // Perform the operation + try + { + service115.closeDailyEVService(data, object); + } + catch(JposException je) + { + throw je; + } + catch(Exception e) + { + throw new JposException(JPOS_E_FAILURE, + "Unhandled exception from Device Service", e); + } + } + + @Override + public void deactivateEVService(int[] data, Object[] object) throws JposException { + // Make sure control is opened + if(!bOpen) + { + throw new JposException(JPOS_E_CLOSED, "Control not opened"); + } + + // Make sure service supports at least version 1.15.0 + if(serviceVersion < deviceVersion115) + { + throw new JposException(JPOS_E_NOSERVICE, + "Device Service is not 1.15.0 compliant."); + } + + // Perform the operation + try + { + service115.deactivateEVService(data, object); + } + catch(JposException je) + { + throw je; + } + catch(Exception e) + { + throw new JposException(JPOS_E_FAILURE, + "Unhandled exception from Device Service", e); + } + } + + @Override + public void openDailyEVService(int[] data, Object[] object) throws JposException { + // Make sure control is opened + if(!bOpen) + { + throw new JposException(JPOS_E_CLOSED, "Control not opened"); + } + + // Make sure service supports at least version 1.15.0 + if(serviceVersion < deviceVersion115) + { + throw new JposException(JPOS_E_NOSERVICE, + "Device Service is not 1.15.0 compliant."); + } + + // Perform the operation + try + { + service115.openDailyEVService(data, object); + } + catch(JposException je) + { + throw je; + } + catch(Exception e) + { + throw new JposException(JPOS_E_FAILURE, + "Unhandled exception from Device Service", e); + } + } + + public void retrieveResultInformation(String name, String[] value) + throws JposException + { + // Make sure control is opened + if(!bOpen) + { + throw new JposException(JPOS_E_CLOSED, "Control not opened"); + } + + // Make sure service supports at least version 1.14.0 + if(serviceVersion < deviceVersion114) + { + throw new JposException(JPOS_E_NOSERVICE, + "Device Service is not 1.14.0 compliant."); + } + + // Perform the operation + try + { + service114.retrieveResultInformation(name, value); + } + catch(JposException je) + { + throw je; + } + catch(Exception e) + { + throw new JposException(JPOS_E_FAILURE, + "Unhandled exception from Device Service", e); + } + } + + @Override + public void unregisterServiceToMedium(int sequenceNumber, int timeout) throws JposException { + // Make sure control is opened + if(!bOpen) + { + throw new JposException(JPOS_E_CLOSED, "Control not opened"); + } + + // Make sure service supports at least version 1.15.0 + if(serviceVersion < deviceVersion115) + { + throw new JposException(JPOS_E_NOSERVICE, + "Device Service is not 1.15.0 compliant."); + } + + // Perform the operation + try + { + service115.unregisterServiceToMedium(sequenceNumber, timeout); + } + catch(JposException je) + { + throw je; + } + catch(Exception e) + { + throw new JposException(JPOS_E_FAILURE, + "Unhandled exception from Device Service", e); + } + } + + @Override + public void updateData(int dataType, int[] data, Object[] object) throws JposException { + // Make sure control is opened + if(!bOpen) + { + throw new JposException(JPOS_E_CLOSED, "Control not opened"); + } + + // Make sure service supports at least version 1.15.0 + if(serviceVersion < deviceVersion115) + { + throw new JposException(JPOS_E_NOSERVICE, + "Device Service is not 1.15.0 compliant."); + } + + // Perform the operation + try + { + service115.updateData(dataType, data, object); + } + catch(JposException je) + { + throw je; + } + catch(Exception e) + { + throw new JposException(JPOS_E_FAILURE, + "Unhandled exception from Device Service", e); + } + } + + public void setParameterInformation(String name, String value) + throws JposException + { + // Make sure control is opened + if(!bOpen) + { + throw new JposException(JPOS_E_CLOSED, "Control not opened"); + } + + // Make sure service supports at least version 1.14.0 + if(serviceVersion < deviceVersion114) + { + throw new JposException(JPOS_E_NOSERVICE, + "Device Service is not 1.14.0 compliant."); + } + + // Perform the operation + try + { + service114.setParameterInformation(name, value); + } + catch(JposException je) + { + throw je; + } + catch(Exception e) + { + throw new JposException(JPOS_E_FAILURE, + "Unhandled exception from Device Service", e); + } + } + + + //-------------------------------------------------------------------------- + // Framework Methods + //-------------------------------------------------------------------------- + + // Create an EventCallbacks interface implementation object for this Control + protected EventCallbacks createEventCallbacks() + { + return new ElectronicValueRWCallbacks(); + } + + // Store the reference to the Device Service + protected void setDeviceService(BaseService service, int nServiceVersion) + throws JposException + { + // Special case: service == null to free references + if(service == null) + { + + service112 = null; + service113 = null; + service114 = null; + service115 = null; + } + else + { + // Make sure that the service actually conforms to the interfaces it + // claims to. + if(serviceVersion >= deviceVersion112) + { + try + { + service112 = (ElectronicValueRWService112)service; + } + catch(Exception e) + { + throw new JposException(JPOS_E_NOSERVICE, + "Service does not fully implement ElectronicValueRWService112 interface", + e); + } + } + + if(serviceVersion >= deviceVersion113) + { + try + { + service113 = (ElectronicValueRWService113)service; + } + catch(Exception e) + { + throw new JposException(JPOS_E_NOSERVICE, + "Service does not fully implement ElectronicValueRWService113 interface", + e); + } + } + + if(serviceVersion >= deviceVersion114) + { + try + { + service114 = (ElectronicValueRWService114)service; + } + catch(Exception e) + { + throw new JposException(JPOS_E_NOSERVICE, + "Service does not fully implement ElectronicValueRWService114 interface", + e); + } + } + + if(serviceVersion >= deviceVersion115) + { + try + { + service115 = (ElectronicValueRWService115)service; + } + catch(Exception e) + { + throw new JposException(JPOS_E_NOSERVICE, + "Service does not fully implement ElectronicValueRWService115 interface", + e); + } + } + + } + } + + + //-------------------------------------------------------------------------- + // Event Listener Methods + //-------------------------------------------------------------------------- + + public void addDataListener(DataListener l) + { + synchronized(dataListeners) + { + dataListeners.addElement(l); + } + } + + public void removeDataListener(DataListener l) + { + synchronized(dataListeners) + { + dataListeners.removeElement(l); + } + } + + public void addDirectIOListener(DirectIOListener l) + { + synchronized(directIOListeners) + { + directIOListeners.addElement(l); + } + } + + public void removeDirectIOListener(DirectIOListener l) + { + synchronized(directIOListeners) + { + directIOListeners.removeElement(l); + } + } + + public void addErrorListener(ErrorListener l) + { + synchronized(errorListeners) + { + errorListeners.addElement(l); + } + } + + public void removeErrorListener(ErrorListener l) + { + synchronized(errorListeners) + { + errorListeners.removeElement(l); + } + } + + public void addOutputCompleteListener(OutputCompleteListener l) + { + synchronized(outputCompleteListeners) + { + outputCompleteListeners.addElement(l); + } + } + + public void removeOutputCompleteListener(OutputCompleteListener l) + { + synchronized(outputCompleteListeners) + { + outputCompleteListeners.removeElement(l); + } + } + + public void addStatusUpdateListener(StatusUpdateListener l) + { + synchronized(statusUpdateListeners) + { + statusUpdateListeners.addElement(l); + } + } + + public void removeStatusUpdateListener(StatusUpdateListener l) + { + synchronized(statusUpdateListeners) + { + statusUpdateListeners.removeElement(l); + } + } + + public void addTransitionListener(TransitionListener l) + { + synchronized(transitionListeners) + { + transitionListeners.addElement(l); + } + } + + public void removeTransitionListener(TransitionListener l) + { + synchronized(transitionListeners) + { + transitionListeners.removeElement(l); + } + } + + + //-------------------------------------------------------------------------- + // EventCallbacks inner class + //-------------------------------------------------------------------------- + + protected class ElectronicValueRWCallbacks + implements EventCallbacks2 + { + public BaseControl getEventSource() + { + return (BaseControl)ElectronicValueRW.this; + } + + public void fireDataEvent(DataEvent e) + { + synchronized(ElectronicValueRW.this.dataListeners) + { + // deliver the event to all registered listeners + for(int x = 0; x < dataListeners.size(); x++) + { + ((DataListener)dataListeners.elementAt(x)).dataOccurred(e); + } + } + } + + public void fireDirectIOEvent(DirectIOEvent e) + { + synchronized(ElectronicValueRW.this.directIOListeners) + { + // deliver the event to all registered listeners + for(int x = 0; x < directIOListeners.size(); x++) + { + ((DirectIOListener)directIOListeners.elementAt(x)).directIOOccurred(e); + } + } + } + + public void fireErrorEvent(ErrorEvent e) + { + synchronized(ElectronicValueRW.this.errorListeners) + { // deliver the event to all registered listeners for(int x = 0; x < errorListeners.size(); x++) { @@ -2955,17 +4274,17 @@ public void fireStatusUpdateEvent(StatusUpdateEvent e) ((StatusUpdateListener)statusUpdateListeners.elementAt(x)).statusUpdateOccurred(e); } } - } - - public void fireTransitionEvent(TransitionEvent e) { - synchronized(ElectronicValueRW.this.transitionListeners) - { - // deliver the event to all registered listeners - for(int x = 0; x < transitionListeners.size(); x++) - { - ((TransitionListener)transitionListeners.elementAt(x)).transitionOccurred(e); - } - } + } + + public void fireTransitionEvent(TransitionEvent e) { + synchronized(ElectronicValueRW.this.transitionListeners) + { + // deliver the event to all registered listeners + for(int x = 0; x < transitionListeners.size(); x++) + { + ((TransitionListener)transitionListeners.elementAt(x)).transitionOccurred(e); + } + } } } } diff --git a/src/main/java/jpos/FiscalPrinter.java b/src/main/java/jpos/FiscalPrinter.java index 53b3989..858eac5 100644 --- a/src/main/java/jpos/FiscalPrinter.java +++ b/src/main/java/jpos/FiscalPrinter.java @@ -17,7 +17,7 @@ // software or its derivatives.Permission to use, copy, modify, and distribute // the software and its documentation for any purpose is hereby granted. // -// FiscalPrinter.java - A JavaPOS 1.14.0 device control +// FiscalPrinter.java - A JavaPOS 1.15.0 device control // //------------------------------------------------------------------------------ diff --git a/src/main/java/jpos/Gate.java b/src/main/java/jpos/Gate.java index f7497b0..dfbbd5a 100644 --- a/src/main/java/jpos/Gate.java +++ b/src/main/java/jpos/Gate.java @@ -1,10 +1,10 @@ -////////////////////////////////////////////////////////////////////// -// -// The JavaPOS library source code is now under the CPL license, which -// is an OSS Apache-like license. The complete license is located at: -// http://www.ibm.com/developerworks/library/os-cpl.html -// -////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////// +// +// The JavaPOS library source code is now under the CPL license, which +// is an OSS Apache-like license. The complete license is located at: +// http://www.ibm.com/developerworks/library/os-cpl.html +// +////////////////////////////////////////////////////////////////////// //------------------------------------------------------------------------------ // // This software is provided "AS IS". The JavaPOS working group (including @@ -17,7 +17,7 @@ // software or its derivatives.Permission to use, copy, modify, and distribute // the software and its documentation for any purpose is hereby granted. // -// Gate.java - A JavaPOS 1.14.0 device control +// Gate.java - A JavaPOS 1.15.0 device control // //------------------------------------------------------------------------------ @@ -30,7 +30,7 @@ public class Gate extends BaseJposControl - implements GateControl114, JposConst + implements GateControl115, JposConst { //-------------------------------------------------------------------------- // Variables @@ -39,6 +39,7 @@ public class Gate protected GateService112 service112; protected GateService113 service113; protected GateService114 service114; + protected GateService115 service115; protected Vector directIOListeners; protected Vector statusUpdateListeners; @@ -51,13 +52,14 @@ public Gate() { // Initialize base class instance data deviceControlDescription = "JavaPOS Gate Device Control"; - deviceControlVersion = deviceVersion114; + deviceControlVersion = deviceVersion115; // Initialize instance data. Initializations are commented out for // efficiency if the Java default is correct. //service112 = null; //service113 = null; //service114 = null; + //service115 = null; directIOListeners = new Vector(); statusUpdateListeners = new Vector(); } @@ -549,6 +551,7 @@ protected void setDeviceService(BaseService service, int nServiceVersion) service112 = null; service113 = null; service114 = null; + service115 = null; } else { @@ -596,6 +599,20 @@ protected void setDeviceService(BaseService service, int nServiceVersion) } } + if(serviceVersion >= deviceVersion115) + { + try + { + service115 = (GateService115)service; + } + catch(Exception e) + { + throw new JposException(JPOS_E_NOSERVICE, + "Service does not fully implement GateService115 interface", + e); + } + } + } } diff --git a/src/main/java/jpos/HardTotals.java b/src/main/java/jpos/HardTotals.java index 4fe55c2..bc32170 100644 --- a/src/main/java/jpos/HardTotals.java +++ b/src/main/java/jpos/HardTotals.java @@ -1,10 +1,10 @@ -////////////////////////////////////////////////////////////////////// -// -// The JavaPOS library source code is now under the CPL license, which -// is an OSS Apache-like license. The complete license is located at: -// http://www.ibm.com/developerworks/library/os-cpl.html -// -////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////// +// +// The JavaPOS library source code is now under the CPL license, which +// is an OSS Apache-like license. The complete license is located at: +// http://www.ibm.com/developerworks/library/os-cpl.html +// +////////////////////////////////////////////////////////////////////// //------------------------------------------------------------------------------ // // This software is provided "AS IS". The JavaPOS working group (including @@ -17,7 +17,7 @@ // software or its derivatives.Permission to use, copy, modify, and distribute // the software and its documentation for any purpose is hereby granted. // -// HardTotals.java - A JavaPOS 1.14.0 device control +// HardTotals.java - A JavaPOS 1.15.0 device control // //------------------------------------------------------------------------------ @@ -30,7 +30,7 @@ public class HardTotals extends BaseJposControl - implements HardTotalsControl114, JposConst + implements HardTotalsControl115, JposConst { //-------------------------------------------------------------------------- // Variables @@ -49,6 +49,7 @@ public class HardTotals protected HardTotalsService112 service112; protected HardTotalsService113 service113; protected HardTotalsService114 service114; + protected HardTotalsService115 service115; protected Vector directIOListeners; protected Vector statusUpdateListeners; @@ -61,7 +62,7 @@ public HardTotals() { // Initialize base class instance data deviceControlDescription = "JavaPOS HardTotals Device Control"; - deviceControlVersion = deviceVersion114; + deviceControlVersion = deviceVersion115; // Initialize instance data. Initializations are commented out for // efficiency if the Java default is correct. @@ -78,6 +79,7 @@ public HardTotals() //service112 = null; //service113 = null; //service114 = null; + //service115 = null; directIOListeners = new Vector(); statusUpdateListeners = new Vector(); } @@ -1095,6 +1097,7 @@ protected void setDeviceService(BaseService service, int nServiceVersion) service112 = null; service113 = null; service114 = null; + service115 = null; } else { @@ -1282,6 +1285,20 @@ protected void setDeviceService(BaseService service, int nServiceVersion) } } + if(serviceVersion >= deviceVersion115) + { + try + { + service115 = (HardTotalsService115)service; + } + catch(Exception e) + { + throw new JposException(JPOS_E_NOSERVICE, + "Service does not fully implement HardTotalsService115 interface", + e); + } + } + } } diff --git a/src/main/java/jpos/ImageScanner.java b/src/main/java/jpos/ImageScanner.java index 9229edd..9befca5 100644 --- a/src/main/java/jpos/ImageScanner.java +++ b/src/main/java/jpos/ImageScanner.java @@ -1,10 +1,10 @@ -////////////////////////////////////////////////////////////////////// -// -// The JavaPOS library source code is now under the CPL license, which -// is an OSS Apache-like license. The complete license is located at: -// http://www.ibm.com/developerworks/library/os-cpl.html -// -////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////// +// +// The JavaPOS library source code is now under the CPL license, which +// is an OSS Apache-like license. The complete license is located at: +// http://www.ibm.com/developerworks/library/os-cpl.html +// +////////////////////////////////////////////////////////////////////// //------------------------------------------------------------------------------ // // This software is provided "AS IS". The JavaPOS working group (including @@ -17,7 +17,7 @@ // software or its derivatives.Permission to use, copy, modify, and distribute // the software and its documentation for any purpose is hereby granted. // -// ImageScanner.java - A JavaPOS 1.14.0 device control +// ImageScanner.java - A JavaPOS 1.15.0 device control // //------------------------------------------------------------------------------ @@ -30,7 +30,7 @@ public class ImageScanner extends BaseJposControl - implements ImageScannerControl114, JposConst + implements ImageScannerControl115, JposConst { //-------------------------------------------------------------------------- // Variables @@ -40,6 +40,7 @@ public class ImageScanner protected ImageScannerService112 service112; protected ImageScannerService113 service113; protected ImageScannerService114 service114; + protected ImageScannerService115 service115; protected Vector dataListeners; protected Vector directIOListeners; protected Vector errorListeners; @@ -54,7 +55,7 @@ public ImageScanner() { // Initialize base class instance data deviceControlDescription = "JavaPOS ImageScanner Device Control"; - deviceControlVersion = deviceVersion114; + deviceControlVersion = deviceVersion115; // Initialize instance data. Initializations are commented out for // efficiency if the Java default is correct. @@ -62,6 +63,7 @@ public ImageScanner() //service112 = null; //service113 = null; //service114 = null; + //service115 = null; dataListeners = new Vector(); directIOListeners = new Vector(); errorListeners = new Vector(); @@ -1306,6 +1308,7 @@ protected void setDeviceService(BaseService service, int nServiceVersion) service112 = null; service113 = null; service114 = null; + service115 = null; } else { @@ -1367,6 +1370,20 @@ protected void setDeviceService(BaseService service, int nServiceVersion) } } + if(serviceVersion >= deviceVersion115) + { + try + { + service115 = (ImageScannerService115)service; + } + catch(Exception e) + { + throw new JposException(JPOS_E_NOSERVICE, + "Service does not fully implement ImageScannerService115 interface", + e); + } + } + } } diff --git a/src/main/java/jpos/ItemDispenser.java b/src/main/java/jpos/ItemDispenser.java index a02ab27..398fa83 100644 --- a/src/main/java/jpos/ItemDispenser.java +++ b/src/main/java/jpos/ItemDispenser.java @@ -1,10 +1,10 @@ -////////////////////////////////////////////////////////////////////// -// -// The JavaPOS library source code is now under the CPL license, which -// is an OSS Apache-like license. The complete license is located at: -// http://www.ibm.com/developerworks/library/os-cpl.html -// -////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////// +// +// The JavaPOS library source code is now under the CPL license, which +// is an OSS Apache-like license. The complete license is located at: +// http://www.ibm.com/developerworks/library/os-cpl.html +// +////////////////////////////////////////////////////////////////////// //------------------------------------------------------------------------------ // // This software is provided "AS IS". The JavaPOS working group (including @@ -17,7 +17,7 @@ // software or its derivatives.Permission to use, copy, modify, and distribute // the software and its documentation for any purpose is hereby granted. // -// ItemDispenser.java - A JavaPOS 1.14.0 device control +// ItemDispenser.java - A JavaPOS 1.15.0 device control // //------------------------------------------------------------------------------ @@ -30,7 +30,7 @@ public class ItemDispenser extends BaseJposControl - implements ItemDispenserControl114, JposConst + implements ItemDispenserControl115, JposConst { //-------------------------------------------------------------------------- // Variables @@ -39,6 +39,7 @@ public class ItemDispenser protected ItemDispenserService112 service112; protected ItemDispenserService113 service113; protected ItemDispenserService114 service114; + protected ItemDispenserService115 service115; protected Vector directIOListeners; protected Vector statusUpdateListeners; @@ -51,13 +52,14 @@ public ItemDispenser() { // Initialize base class instance data deviceControlDescription = "JavaPOS ItemDispenser Device Control"; - deviceControlVersion = deviceVersion114; + deviceControlVersion = deviceVersion115; // Initialize instance data. Initializations are commented out for // efficiency if the Java default is correct. //service112 = null; //service113 = null; //service114 = null; + //service115 = null; directIOListeners = new Vector(); statusUpdateListeners = new Vector(); } @@ -649,6 +651,7 @@ protected void setDeviceService(BaseService service, int nServiceVersion) service112 = null; service113 = null; service114 = null; + service115 = null; } else { @@ -696,6 +699,20 @@ protected void setDeviceService(BaseService service, int nServiceVersion) } } + if(serviceVersion >= deviceVersion115) + { + try + { + service115 = (ItemDispenserService115)service; + } + catch(Exception e) + { + throw new JposException(JPOS_E_NOSERVICE, + "Service does not fully implement ItemDispenserService115 interface", + e); + } + } + } } diff --git a/src/main/java/jpos/Keylock.java b/src/main/java/jpos/Keylock.java index 549ec8c..ab1ef12 100644 --- a/src/main/java/jpos/Keylock.java +++ b/src/main/java/jpos/Keylock.java @@ -1,10 +1,10 @@ -////////////////////////////////////////////////////////////////////// -// -// The JavaPOS library source code is now under the CPL license, which -// is an OSS Apache-like license. The complete license is located at: -// http://www.ibm.com/developerworks/library/os-cpl.html -// -////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////// +// +// The JavaPOS library source code is now under the CPL license, which +// is an OSS Apache-like license. The complete license is located at: +// http://www.ibm.com/developerworks/library/os-cpl.html +// +////////////////////////////////////////////////////////////////////// //------------------------------------------------------------------------------ // // This software is provided "AS IS". The JavaPOS working group (including @@ -17,7 +17,7 @@ // software or its derivatives.Permission to use, copy, modify, and distribute // the software and its documentation for any purpose is hereby granted. // -// Keylock.java - A JavaPOS 1.14.0 device control +// Keylock.java - A JavaPOS 1.15.0 device control // //------------------------------------------------------------------------------ @@ -30,7 +30,7 @@ public class Keylock extends BaseJposControl - implements KeylockControl114, JposConst + implements KeylockControl115, JposConst { //-------------------------------------------------------------------------- // Variables @@ -49,6 +49,7 @@ public class Keylock protected KeylockService112 service112; protected KeylockService113 service113; protected KeylockService114 service114; + protected KeylockService115 service115; protected Vector directIOListeners; protected Vector statusUpdateListeners; @@ -61,7 +62,7 @@ public Keylock() { // Initialize base class instance data deviceControlDescription = "JavaPOS Keylock Device Control"; - deviceControlVersion = deviceVersion114; + deviceControlVersion = deviceVersion115; // Initialize instance data. Initializations are commented out for // efficiency if the Java default is correct. @@ -78,6 +79,7 @@ public Keylock() //service112 = null; //service113 = null; //service114 = null; + //service115 = null; directIOListeners = new Vector(); statusUpdateListeners = new Vector(); } @@ -684,6 +686,7 @@ protected void setDeviceService(BaseService service, int nServiceVersion) service112 = null; service113 = null; service114 = null; + service115 = null; } else { @@ -871,6 +874,20 @@ protected void setDeviceService(BaseService service, int nServiceVersion) } } + if(serviceVersion >= deviceVersion115) + { + try + { + service115 = (KeylockService115)service; + } + catch(Exception e) + { + throw new JposException(JPOS_E_NOSERVICE, + "Service does not fully implement KeylockService115 interface", + e); + } + } + } } diff --git a/src/main/java/jpos/Lights.java b/src/main/java/jpos/Lights.java index ad56341..2807ae6 100644 --- a/src/main/java/jpos/Lights.java +++ b/src/main/java/jpos/Lights.java @@ -1,10 +1,10 @@ -////////////////////////////////////////////////////////////////////// -// -// The JavaPOS library source code is now under the CPL license, which -// is an OSS Apache-like license. The complete license is located at: -// http://www.ibm.com/developerworks/library/os-cpl.html -// -////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////// +// +// The JavaPOS library source code is now under the CPL license, which +// is an OSS Apache-like license. The complete license is located at: +// http://www.ibm.com/developerworks/library/os-cpl.html +// +////////////////////////////////////////////////////////////////////// //------------------------------------------------------------------------------ // // This software is provided "AS IS". The JavaPOS working group (including @@ -17,7 +17,7 @@ // software or its derivatives.Permission to use, copy, modify, and distribute // the software and its documentation for any purpose is hereby granted. // -// Lights.java - A JavaPOS 1.14.0 device control +// Lights.java - A JavaPOS 1.15.0 device control // //------------------------------------------------------------------------------ @@ -30,7 +30,7 @@ public class Lights extends BaseJposControl - implements LightsControl114, JposConst + implements LightsControl115, JposConst { //-------------------------------------------------------------------------- // Variables @@ -39,6 +39,7 @@ public class Lights protected LightsService112 service112; protected LightsService113 service113; protected LightsService114 service114; + protected LightsService115 service115; protected Vector directIOListeners; protected Vector statusUpdateListeners; @@ -51,13 +52,14 @@ public Lights() { // Initialize base class instance data deviceControlDescription = "JavaPOS Lights Device Control"; - deviceControlVersion = deviceVersion114; + deviceControlVersion = deviceVersion115; // Initialize instance data. Initializations are commented out for // efficiency if the Java default is correct. //service112 = null; //service113 = null; //service114 = null; + //service115 = null; directIOListeners = new Vector(); statusUpdateListeners = new Vector(); } @@ -574,6 +576,7 @@ protected void setDeviceService(BaseService service, int nServiceVersion) service112 = null; service113 = null; service114 = null; + service115 = null; } else { @@ -621,6 +624,20 @@ protected void setDeviceService(BaseService service, int nServiceVersion) } } + if(serviceVersion >= deviceVersion115) + { + try + { + service115 = (LightsService115)service; + } + catch(Exception e) + { + throw new JposException(JPOS_E_NOSERVICE, + "Service does not fully implement LightsService115 interface", + e); + } + } + } } diff --git a/src/main/java/jpos/LineDisplay.java b/src/main/java/jpos/LineDisplay.java index a5e962a..7a53032 100644 --- a/src/main/java/jpos/LineDisplay.java +++ b/src/main/java/jpos/LineDisplay.java @@ -1,10 +1,10 @@ -////////////////////////////////////////////////////////////////////// -// -// The JavaPOS library source code is now under the CPL license, which -// is an OSS Apache-like license. The complete license is located at: -// http://www.ibm.com/developerworks/library/os-cpl.html -// -////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////// +// +// The JavaPOS library source code is now under the CPL license, which +// is an OSS Apache-like license. The complete license is located at: +// http://www.ibm.com/developerworks/library/os-cpl.html +// +////////////////////////////////////////////////////////////////////// //------------------------------------------------------------------------------ // // This software is provided "AS IS". The JavaPOS working group (including @@ -17,7 +17,7 @@ // software or its derivatives.Permission to use, copy, modify, and distribute // the software and its documentation for any purpose is hereby granted. // -// LineDisplay.java - A JavaPOS 1.14.0 device control +// LineDisplay.java - A JavaPOS 1.15.0 device control // //------------------------------------------------------------------------------ @@ -30,7 +30,7 @@ public class LineDisplay extends BaseJposControl - implements LineDisplayControl114, JposConst + implements LineDisplayControl115, JposConst { //-------------------------------------------------------------------------- // Variables @@ -49,6 +49,7 @@ public class LineDisplay protected LineDisplayService112 service112; protected LineDisplayService113 service113; protected LineDisplayService114 service114; + protected LineDisplayService115 service115; protected Vector directIOListeners; protected Vector statusUpdateListeners; @@ -61,7 +62,7 @@ public LineDisplay() { // Initialize base class instance data deviceControlDescription = "JavaPOS LineDisplay Device Control"; - deviceControlVersion = deviceVersion114; + deviceControlVersion = deviceVersion115; // Initialize instance data. Initializations are commented out for // efficiency if the Java default is correct. @@ -78,6 +79,7 @@ public LineDisplay() //service112 = null; //service113 = null; //service114 = null; + //service115 = null; directIOListeners = new Vector(); statusUpdateListeners = new Vector(); } @@ -2502,6 +2504,7 @@ protected void setDeviceService(BaseService service, int nServiceVersion) service112 = null; service113 = null; service114 = null; + service115 = null; } else { @@ -2689,6 +2692,20 @@ protected void setDeviceService(BaseService service, int nServiceVersion) } } + if(serviceVersion >= deviceVersion115) + { + try + { + service115 = (LineDisplayService115)service; + } + catch(Exception e) + { + throw new JposException(JPOS_E_NOSERVICE, + "Service does not fully implement LineDisplayService115 interface", + e); + } + } + } } diff --git a/src/main/java/jpos/MICR.java b/src/main/java/jpos/MICR.java index 5b37384..81c1c5e 100644 --- a/src/main/java/jpos/MICR.java +++ b/src/main/java/jpos/MICR.java @@ -1,10 +1,10 @@ -////////////////////////////////////////////////////////////////////// -// -// The JavaPOS library source code is now under the CPL license, which -// is an OSS Apache-like license. The complete license is located at: -// http://www.ibm.com/developerworks/library/os-cpl.html -// -////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////// +// +// The JavaPOS library source code is now under the CPL license, which +// is an OSS Apache-like license. The complete license is located at: +// http://www.ibm.com/developerworks/library/os-cpl.html +// +////////////////////////////////////////////////////////////////////// //------------------------------------------------------------------------------ // // This software is provided "AS IS". The JavaPOS working group (including @@ -17,7 +17,7 @@ // software or its derivatives.Permission to use, copy, modify, and distribute // the software and its documentation for any purpose is hereby granted. // -// MICR.java - A JavaPOS 1.14.0 device control +// MICR.java - A JavaPOS 1.15.0 device control // //------------------------------------------------------------------------------ @@ -30,7 +30,7 @@ public class MICR extends BaseJposControl - implements MICRControl114, JposConst + implements MICRControl115, JposConst { //-------------------------------------------------------------------------- // Variables @@ -49,6 +49,7 @@ public class MICR protected MICRService112 service112; protected MICRService113 service113; protected MICRService114 service114; + protected MICRService115 service115; protected Vector dataListeners; protected Vector directIOListeners; protected Vector errorListeners; @@ -63,7 +64,7 @@ public MICR() { // Initialize base class instance data deviceControlDescription = "JavaPOS MICR Device Control"; - deviceControlVersion = deviceVersion114; + deviceControlVersion = deviceVersion115; // Initialize instance data. Initializations are commented out for // efficiency if the Java default is correct. @@ -80,6 +81,7 @@ public MICR() //service112 = null; //service113 = null; //service114 = null; + //service115 = null; dataListeners = new Vector(); directIOListeners = new Vector(); errorListeners = new Vector(); @@ -1081,6 +1083,7 @@ protected void setDeviceService(BaseService service, int nServiceVersion) service112 = null; service113 = null; service114 = null; + service115 = null; } else { @@ -1268,6 +1271,20 @@ protected void setDeviceService(BaseService service, int nServiceVersion) } } + if(serviceVersion >= deviceVersion115) + { + try + { + service115 = (MICRService115)service; + } + catch(Exception e) + { + throw new JposException(JPOS_E_NOSERVICE, + "Service does not fully implement MICRService115 interface", + e); + } + } + } } diff --git a/src/main/java/jpos/MSR.java b/src/main/java/jpos/MSR.java index 7a64b6d..7c88b6c 100644 --- a/src/main/java/jpos/MSR.java +++ b/src/main/java/jpos/MSR.java @@ -1,10 +1,10 @@ -////////////////////////////////////////////////////////////////////// -// -// The JavaPOS library source code is now under the CPL license, which -// is an OSS Apache-like license. The complete license is located at: -// http://www.ibm.com/developerworks/library/os-cpl.html -// -////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////// +// +// The JavaPOS library source code is now under the CPL license, which +// is an OSS Apache-like license. The complete license is located at: +// http://www.ibm.com/developerworks/library/os-cpl.html +// +////////////////////////////////////////////////////////////////////// //------------------------------------------------------------------------------ // // This software is provided "AS IS". The JavaPOS working group (including @@ -17,7 +17,7 @@ // software or its derivatives.Permission to use, copy, modify, and distribute // the software and its documentation for any purpose is hereby granted. // -// MSR.java - A JavaPOS 1.14.0 device control +// MSR.java - A JavaPOS 1.15.0 device control // //------------------------------------------------------------------------------ @@ -30,7 +30,7 @@ public class MSR extends BaseJposControl - implements MSRControl114, JposConst + implements MSRControl115, JposConst { //-------------------------------------------------------------------------- // Variables @@ -49,6 +49,7 @@ public class MSR protected MSRService112 service112; protected MSRService113 service113; protected MSRService114 service114; + protected MSRService115 service115; protected Vector dataListeners; protected Vector directIOListeners; protected Vector errorListeners; @@ -63,7 +64,7 @@ public MSR() { // Initialize base class instance data deviceControlDescription = "JavaPOS MSR Device Control"; - deviceControlVersion = deviceVersion114; + deviceControlVersion = deviceVersion115; // Initialize instance data. Initializations are commented out for // efficiency if the Java default is correct. @@ -80,6 +81,7 @@ public MSR() //service112 = null; //service113 = null; //service114 = null; + //service115 = null; dataListeners = new Vector(); directIOListeners = new Vector(); errorListeners = new Vector(); @@ -2579,6 +2581,7 @@ protected void setDeviceService(BaseService service, int nServiceVersion) service112 = null; service113 = null; service114 = null; + service115 = null; } else { @@ -2766,6 +2769,20 @@ protected void setDeviceService(BaseService service, int nServiceVersion) } } + if(serviceVersion >= deviceVersion115) + { + try + { + service115 = (MSRService115)service; + } + catch(Exception e) + { + throw new JposException(JPOS_E_NOSERVICE, + "Service does not fully implement MSRService115 interface", + e); + } + } + } } diff --git a/src/main/java/jpos/MotionSensor.java b/src/main/java/jpos/MotionSensor.java index 6376588..9e6d0d6 100644 --- a/src/main/java/jpos/MotionSensor.java +++ b/src/main/java/jpos/MotionSensor.java @@ -1,10 +1,10 @@ -////////////////////////////////////////////////////////////////////// -// -// The JavaPOS library source code is now under the CPL license, which -// is an OSS Apache-like license. The complete license is located at: -// http://www.ibm.com/developerworks/library/os-cpl.html -// -////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////// +// +// The JavaPOS library source code is now under the CPL license, which +// is an OSS Apache-like license. The complete license is located at: +// http://www.ibm.com/developerworks/library/os-cpl.html +// +////////////////////////////////////////////////////////////////////// //------------------------------------------------------------------------------ // // This software is provided "AS IS". The JavaPOS working group (including @@ -17,7 +17,7 @@ // software or its derivatives.Permission to use, copy, modify, and distribute // the software and its documentation for any purpose is hereby granted. // -// MotionSensor.java - A JavaPOS 1.14.0 device control +// MotionSensor.java - A JavaPOS 1.15.0 device control // //------------------------------------------------------------------------------ @@ -30,7 +30,7 @@ public class MotionSensor extends BaseJposControl - implements MotionSensorControl114, JposConst + implements MotionSensorControl115, JposConst { //-------------------------------------------------------------------------- // Variables @@ -44,6 +44,7 @@ public class MotionSensor protected MotionSensorService112 service112; protected MotionSensorService113 service113; protected MotionSensorService114 service114; + protected MotionSensorService115 service115; protected Vector directIOListeners; protected Vector statusUpdateListeners; @@ -56,7 +57,7 @@ public MotionSensor() { // Initialize base class instance data deviceControlDescription = "JavaPOS MotionSensor Device Control"; - deviceControlVersion = deviceVersion114; + deviceControlVersion = deviceVersion115; // Initialize instance data. Initializations are commented out for // efficiency if the Java default is correct. @@ -68,6 +69,7 @@ public MotionSensor() //service112 = null; //service113 = null; //service114 = null; + //service115 = null; directIOListeners = new Vector(); statusUpdateListeners = new Vector(); } @@ -602,6 +604,7 @@ protected void setDeviceService(BaseService service, int nServiceVersion) service112 = null; service113 = null; service114 = null; + service115 = null; } else { @@ -719,6 +722,20 @@ protected void setDeviceService(BaseService service, int nServiceVersion) } } + if(serviceVersion >= deviceVersion115) + { + try + { + service115 = (MotionSensorService115)service; + } + catch(Exception e) + { + throw new JposException(JPOS_E_NOSERVICE, + "Service does not fully implement MotionSensorService115 interface", + e); + } + } + } } diff --git a/src/main/java/jpos/PINPad.java b/src/main/java/jpos/PINPad.java index ef3dd7c..bc394a1 100644 --- a/src/main/java/jpos/PINPad.java +++ b/src/main/java/jpos/PINPad.java @@ -1,10 +1,10 @@ -////////////////////////////////////////////////////////////////////// -// -// The JavaPOS library source code is now under the CPL license, which -// is an OSS Apache-like license. The complete license is located at: -// http://www.ibm.com/developerworks/library/os-cpl.html -// -////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////// +// +// The JavaPOS library source code is now under the CPL license, which +// is an OSS Apache-like license. The complete license is located at: +// http://www.ibm.com/developerworks/library/os-cpl.html +// +////////////////////////////////////////////////////////////////////// //------------------------------------------------------------------------------ // // This software is provided "AS IS". The JavaPOS working group (including @@ -17,7 +17,7 @@ // software or its derivatives.Permission to use, copy, modify, and distribute // the software and its documentation for any purpose is hereby granted. // -// PINPad.java - A JavaPOS 1.14.0 device control +// PINPad.java - A JavaPOS 1.15.0 device control // //------------------------------------------------------------------------------ @@ -30,7 +30,7 @@ public class PINPad extends BaseJposControl - implements PINPadControl114, JposConst + implements PINPadControl115, JposConst { //-------------------------------------------------------------------------- // Variables @@ -48,6 +48,7 @@ public class PINPad protected PINPadService112 service112; protected PINPadService113 service113; protected PINPadService114 service114; + protected PINPadService115 service115; protected Vector dataListeners; protected Vector directIOListeners; protected Vector errorListeners; @@ -62,7 +63,7 @@ public PINPad() { // Initialize base class instance data deviceControlDescription = "JavaPOS PINPad Device Control"; - deviceControlVersion = deviceVersion114; + deviceControlVersion = deviceVersion115; // Initialize instance data. Initializations are commented out for // efficiency if the Java default is correct. @@ -78,6 +79,7 @@ public PINPad() //service112 = null; //service113 = null; //service114 = null; + //service115 = null; dataListeners = new Vector(); directIOListeners = new Vector(); errorListeners = new Vector(); @@ -1714,6 +1716,7 @@ protected void setDeviceService(BaseService service, int nServiceVersion) service112 = null; service113 = null; service114 = null; + service115 = null; } else { @@ -1887,6 +1890,20 @@ protected void setDeviceService(BaseService service, int nServiceVersion) } } + if(serviceVersion >= deviceVersion115) + { + try + { + service115 = (PINPadService115)service; + } + catch(Exception e) + { + throw new JposException(JPOS_E_NOSERVICE, + "Service does not fully implement PINPadService115 interface", + e); + } + } + } } diff --git a/src/main/java/jpos/POSKeyboard.java b/src/main/java/jpos/POSKeyboard.java index b2bb422..deded38 100644 --- a/src/main/java/jpos/POSKeyboard.java +++ b/src/main/java/jpos/POSKeyboard.java @@ -1,10 +1,10 @@ -////////////////////////////////////////////////////////////////////// -// -// The JavaPOS library source code is now under the CPL license, which -// is an OSS Apache-like license. The complete license is located at: -// http://www.ibm.com/developerworks/library/os-cpl.html -// -////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////// +// +// The JavaPOS library source code is now under the CPL license, which +// is an OSS Apache-like license. The complete license is located at: +// http://www.ibm.com/developerworks/library/os-cpl.html +// +////////////////////////////////////////////////////////////////////// //------------------------------------------------------------------------------ // // This software is provided "AS IS". The JavaPOS working group (including @@ -17,7 +17,7 @@ // software or its derivatives.Permission to use, copy, modify, and distribute // the software and its documentation for any purpose is hereby granted. // -// POSKeyboard.java - A JavaPOS 1.14.0 device control +// POSKeyboard.java - A JavaPOS 1.15.0 device control // //------------------------------------------------------------------------------ @@ -30,7 +30,7 @@ public class POSKeyboard extends BaseJposControl - implements POSKeyboardControl114, JposConst + implements POSKeyboardControl115, JposConst { //-------------------------------------------------------------------------- // Variables @@ -49,6 +49,7 @@ public class POSKeyboard protected POSKeyboardService112 service112; protected POSKeyboardService113 service113; protected POSKeyboardService114 service114; + protected POSKeyboardService115 service115; protected Vector dataListeners; protected Vector directIOListeners; protected Vector errorListeners; @@ -63,7 +64,7 @@ public POSKeyboard() { // Initialize base class instance data deviceControlDescription = "JavaPOS POSKeyboard Device Control"; - deviceControlVersion = deviceVersion114; + deviceControlVersion = deviceVersion115; // Initialize instance data. Initializations are commented out for // efficiency if the Java default is correct. @@ -80,6 +81,7 @@ public POSKeyboard() //service112 = null; //service113 = null; //service114 = null; + //service115 = null; dataListeners = new Vector(); directIOListeners = new Vector(); errorListeners = new Vector(); @@ -824,6 +826,7 @@ protected void setDeviceService(BaseService service, int nServiceVersion) service112 = null; service113 = null; service114 = null; + service115 = null; } else { @@ -1011,6 +1014,20 @@ protected void setDeviceService(BaseService service, int nServiceVersion) } } + if(serviceVersion >= deviceVersion115) + { + try + { + service115 = (POSKeyboardService115)service; + } + catch(Exception e) + { + throw new JposException(JPOS_E_NOSERVICE, + "Service does not fully implement POSKeyboardService115 interface", + e); + } + } + } } diff --git a/src/main/java/jpos/POSPower.java b/src/main/java/jpos/POSPower.java index e42729b..8733e2a 100644 --- a/src/main/java/jpos/POSPower.java +++ b/src/main/java/jpos/POSPower.java @@ -1,10 +1,10 @@ -////////////////////////////////////////////////////////////////////// -// -// The JavaPOS library source code is now under the CPL license, which -// is an OSS Apache-like license. The complete license is located at: -// http://www.ibm.com/developerworks/library/os-cpl.html -// -////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////// +// +// The JavaPOS library source code is now under the CPL license, which +// is an OSS Apache-like license. The complete license is located at: +// http://www.ibm.com/developerworks/library/os-cpl.html +// +////////////////////////////////////////////////////////////////////// //------------------------------------------------------------------------------ // // This software is provided "AS IS". The JavaPOS working group (including @@ -17,7 +17,7 @@ // software or its derivatives.Permission to use, copy, modify, and distribute // the software and its documentation for any purpose is hereby granted. // -// POSPower.java - A JavaPOS 1.14.0 device control +// POSPower.java - A JavaPOS 1.15.0 device control // //------------------------------------------------------------------------------ @@ -30,7 +30,7 @@ public class POSPower extends BaseJposControl - implements POSPowerControl114, JposConst + implements POSPowerControl115, JposConst { //-------------------------------------------------------------------------- // Variables @@ -46,6 +46,7 @@ public class POSPower protected POSPowerService112 service112; protected POSPowerService113 service113; protected POSPowerService114 service114; + protected POSPowerService115 service115; protected Vector directIOListeners; protected Vector statusUpdateListeners; @@ -58,7 +59,7 @@ public POSPower() { // Initialize base class instance data deviceControlDescription = "JavaPOS POSPower Device Control"; - deviceControlVersion = deviceVersion114; + deviceControlVersion = deviceVersion115; // Initialize instance data. Initializations are commented out for // efficiency if the Java default is correct. @@ -72,6 +73,7 @@ public POSPower() //service112 = null; //service113 = null; //service114 = null; + //service115 = null; directIOListeners = new Vector(); statusUpdateListeners = new Vector(); } @@ -1288,6 +1290,7 @@ protected void setDeviceService(BaseService service, int nServiceVersion) service112 = null; service113 = null; service114 = null; + service115 = null; } else { @@ -1433,6 +1436,20 @@ protected void setDeviceService(BaseService service, int nServiceVersion) } } + if(serviceVersion >= deviceVersion115) + { + try + { + service115 = (POSPowerService115)service; + } + catch(Exception e) + { + throw new JposException(JPOS_E_NOSERVICE, + "Service does not fully implement POSPowerService115 interface", + e); + } + } + } } diff --git a/src/main/java/jpos/POSPrinter.java b/src/main/java/jpos/POSPrinter.java index a396bd3..bfdabab 100644 --- a/src/main/java/jpos/POSPrinter.java +++ b/src/main/java/jpos/POSPrinter.java @@ -1,10 +1,10 @@ -////////////////////////////////////////////////////////////////////// -// -// The JavaPOS library source code is now under the CPL license, which -// is an OSS Apache-like license. The complete license is located at: -// http://www.ibm.com/developerworks/library/os-cpl.html -// -////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////// +// +// The JavaPOS library source code is now under the CPL license, which +// is an OSS Apache-like license. The complete license is located at: +// http://www.ibm.com/developerworks/library/os-cpl.html +// +////////////////////////////////////////////////////////////////////// //------------------------------------------------------------------------------ // // This software is provided "AS IS". The JavaPOS working group (including @@ -17,7 +17,7 @@ // software or its derivatives.Permission to use, copy, modify, and distribute // the software and its documentation for any purpose is hereby granted. // -// POSPrinter.java - A JavaPOS 1.14.0 device control +// POSPrinter.java - A JavaPOS 1.15.0 device control // //------------------------------------------------------------------------------ @@ -30,7 +30,7 @@ public class POSPrinter extends BaseJposControl - implements POSPrinterControl114, JposConst + implements POSPrinterControl115, JposConst { //-------------------------------------------------------------------------- // Variables @@ -49,6 +49,7 @@ public class POSPrinter protected POSPrinterService112 service112; protected POSPrinterService113 service113; protected POSPrinterService114 service114; + protected POSPrinterService115 service115; protected Vector directIOListeners; protected Vector errorListeners; protected Vector outputCompleteListeners; @@ -63,7 +64,7 @@ public POSPrinter() { // Initialize base class instance data deviceControlDescription = "JavaPOS POSPrinter Device Control"; - deviceControlVersion = deviceVersion114; + deviceControlVersion = deviceVersion115; // Initialize instance data. Initializations are commented out for // efficiency if the Java default is correct. @@ -80,6 +81,7 @@ public POSPrinter() //service112 = null; //service113 = null; //service114 = null; + //service115 = null; directIOListeners = new Vector(); errorListeners = new Vector(); outputCompleteListeners = new Vector(); @@ -5260,6 +5262,7 @@ protected void setDeviceService(BaseService service, int nServiceVersion) service112 = null; service113 = null; service114 = null; + service115 = null; } else { @@ -5447,6 +5450,20 @@ protected void setDeviceService(BaseService service, int nServiceVersion) } } + if(serviceVersion >= deviceVersion115) + { + try + { + service115 = (POSPrinterService115)service; + } + catch(Exception e) + { + throw new JposException(JPOS_E_NOSERVICE, + "Service does not fully implement POSPrinterService115 interface", + e); + } + } + } } diff --git a/src/main/java/jpos/PointCardRW.java b/src/main/java/jpos/PointCardRW.java index 808698c..0c80e83 100644 --- a/src/main/java/jpos/PointCardRW.java +++ b/src/main/java/jpos/PointCardRW.java @@ -1,10 +1,10 @@ -////////////////////////////////////////////////////////////////////// -// -// The JavaPOS library source code is now under the CPL license, which -// is an OSS Apache-like license. The complete license is located at: -// http://www.ibm.com/developerworks/library/os-cpl.html -// -////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////// +// +// The JavaPOS library source code is now under the CPL license, which +// is an OSS Apache-like license. The complete license is located at: +// http://www.ibm.com/developerworks/library/os-cpl.html +// +////////////////////////////////////////////////////////////////////// //------------------------------------------------------------------------------ // // This software is provided "AS IS". The JavaPOS working group (including @@ -17,7 +17,7 @@ // software or its derivatives.Permission to use, copy, modify, and distribute // the software and its documentation for any purpose is hereby granted. // -// PointCardRW.java - A JavaPOS 1.14.0 device control +// PointCardRW.java - A JavaPOS 1.15.0 device control // //------------------------------------------------------------------------------ @@ -30,7 +30,7 @@ public class PointCardRW extends BaseJposControl - implements PointCardRWControl114, JposConst + implements PointCardRWControl115, JposConst { //-------------------------------------------------------------------------- // Variables @@ -46,6 +46,7 @@ public class PointCardRW protected PointCardRWService112 service112; protected PointCardRWService113 service113; protected PointCardRWService114 service114; + protected PointCardRWService115 service115; protected Vector dataListeners; protected Vector directIOListeners; protected Vector errorListeners; @@ -61,7 +62,7 @@ public PointCardRW() { // Initialize base class instance data deviceControlDescription = "JavaPOS PointCardRW Device Control"; - deviceControlVersion = deviceVersion114; + deviceControlVersion = deviceVersion115; // Initialize instance data. Initializations are commented out for // efficiency if the Java default is correct. @@ -75,6 +76,7 @@ public PointCardRW() //service112 = null; //service113 = null; //service114 = null; + //service115 = null; dataListeners = new Vector(); directIOListeners = new Vector(); errorListeners = new Vector(); @@ -2592,6 +2594,7 @@ protected void setDeviceService(BaseService service, int nServiceVersion) service112 = null; service113 = null; service114 = null; + service115 = null; } else { @@ -2737,6 +2740,20 @@ protected void setDeviceService(BaseService service, int nServiceVersion) } } + if(serviceVersion >= deviceVersion115) + { + try + { + service115 = (PointCardRWService115)service; + } + catch(Exception e) + { + throw new JposException(JPOS_E_NOSERVICE, + "Service does not fully implement PointCardRWService115 interface", + e); + } + } + } } diff --git a/src/main/java/jpos/RFIDScanner.java b/src/main/java/jpos/RFIDScanner.java index beb72c6..d7de46f 100644 --- a/src/main/java/jpos/RFIDScanner.java +++ b/src/main/java/jpos/RFIDScanner.java @@ -1,10 +1,10 @@ -////////////////////////////////////////////////////////////////////// -// -// The JavaPOS library source code is now under the CPL license, which -// is an OSS Apache-like license. The complete license is located at: -// http://www.ibm.com/developerworks/library/os-cpl.html -// -////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////// +// +// The JavaPOS library source code is now under the CPL license, which +// is an OSS Apache-like license. The complete license is located at: +// http://www.ibm.com/developerworks/library/os-cpl.html +// +////////////////////////////////////////////////////////////////////// //------------------------------------------------------------------------------ // // This software is provided "AS IS". The JavaPOS working group (including @@ -17,7 +17,7 @@ // software or its derivatives.Permission to use, copy, modify, and distribute // the software and its documentation for any purpose is hereby granted. // -// RFIDScanner.java - A JavaPOS 1.14.0 device control +// RFIDScanner.java - A JavaPOS 1.15.0 device control // //------------------------------------------------------------------------------ @@ -30,7 +30,7 @@ public class RFIDScanner extends BaseJposControl - implements RFIDScannerControl114, JposConst + implements RFIDScannerControl115, JposConst { //-------------------------------------------------------------------------- // Variables @@ -39,6 +39,7 @@ public class RFIDScanner protected RFIDScannerService112 service112; protected RFIDScannerService113 service113; protected RFIDScannerService114 service114; + protected RFIDScannerService115 service115; protected Vector dataListeners; protected Vector directIOListeners; protected Vector errorListeners; @@ -54,13 +55,14 @@ public RFIDScanner() { // Initialize base class instance data deviceControlDescription = "JavaPOS RFIDScanner Device Control"; - deviceControlVersion = deviceVersion114; + deviceControlVersion = deviceVersion115; // Initialize instance data. Initializations are commented out for // efficiency if the Java default is correct. //service112 = null; //service113 = null; //service114 = null; + //service115 = null; dataListeners = new Vector(); directIOListeners = new Vector(); errorListeners = new Vector(); @@ -1305,6 +1307,7 @@ protected void setDeviceService(BaseService service, int nServiceVersion) service112 = null; service113 = null; service114 = null; + service115 = null; } else { @@ -1352,6 +1355,20 @@ protected void setDeviceService(BaseService service, int nServiceVersion) } } + if(serviceVersion >= deviceVersion115) + { + try + { + service115 = (RFIDScannerService115)service; + } + catch(Exception e) + { + throw new JposException(JPOS_E_NOSERVICE, + "Service does not fully implement RFIDScannerService115 interface", + e); + } + } + } } diff --git a/src/main/java/jpos/RemoteOrderDisplay.java b/src/main/java/jpos/RemoteOrderDisplay.java index 49632f5..6f5cab8 100644 --- a/src/main/java/jpos/RemoteOrderDisplay.java +++ b/src/main/java/jpos/RemoteOrderDisplay.java @@ -1,10 +1,10 @@ -////////////////////////////////////////////////////////////////////// -// -// The JavaPOS library source code is now under the CPL license, which -// is an OSS Apache-like license. The complete license is located at: -// http://www.ibm.com/developerworks/library/os-cpl.html -// -////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////// +// +// The JavaPOS library source code is now under the CPL license, which +// is an OSS Apache-like license. The complete license is located at: +// http://www.ibm.com/developerworks/library/os-cpl.html +// +////////////////////////////////////////////////////////////////////// //------------------------------------------------------------------------------ // // This software is provided "AS IS". The JavaPOS working group (including @@ -17,7 +17,7 @@ // software or its derivatives.Permission to use, copy, modify, and distribute // the software and its documentation for any purpose is hereby granted. // -// RemoteOrderDisplay.java - A JavaPOS 1.14.0 device control +// RemoteOrderDisplay.java - A JavaPOS 1.15.0 device control // //------------------------------------------------------------------------------ @@ -30,7 +30,7 @@ public class RemoteOrderDisplay extends BaseJposControl - implements RemoteOrderDisplayControl114, JposConst + implements RemoteOrderDisplayControl115, JposConst { //-------------------------------------------------------------------------- // Variables @@ -48,6 +48,7 @@ public class RemoteOrderDisplay protected RemoteOrderDisplayService112 service112; protected RemoteOrderDisplayService113 service113; protected RemoteOrderDisplayService114 service114; + protected RemoteOrderDisplayService115 service115; protected Vector dataListeners; protected Vector directIOListeners; protected Vector errorListeners; @@ -63,7 +64,7 @@ public RemoteOrderDisplay() { // Initialize base class instance data deviceControlDescription = "JavaPOS RemoteOrderDisplay Device Control"; - deviceControlVersion = deviceVersion114; + deviceControlVersion = deviceVersion115; // Initialize instance data. Initializations are commented out for // efficiency if the Java default is correct. @@ -79,6 +80,7 @@ public RemoteOrderDisplay() //service112 = null; //service113 = null; //service114 = null; + //service115 = null; dataListeners = new Vector(); directIOListeners = new Vector(); errorListeners = new Vector(); @@ -1966,6 +1968,7 @@ protected void setDeviceService(BaseService service, int nServiceVersion) service112 = null; service113 = null; service114 = null; + service115 = null; } else { @@ -2139,6 +2142,20 @@ protected void setDeviceService(BaseService service, int nServiceVersion) } } + if(serviceVersion >= deviceVersion115) + { + try + { + service115 = (RemoteOrderDisplayService115)service; + } + catch(Exception e) + { + throw new JposException(JPOS_E_NOSERVICE, + "Service does not fully implement RemoteOrderDisplayService115 interface", + e); + } + } + } } diff --git a/src/main/java/jpos/Scale.java b/src/main/java/jpos/Scale.java index 2058839..2ed213c 100644 --- a/src/main/java/jpos/Scale.java +++ b/src/main/java/jpos/Scale.java @@ -1,10 +1,10 @@ -////////////////////////////////////////////////////////////////////// -// -// The JavaPOS library source code is now under the CPL license, which -// is an OSS Apache-like license. The complete license is located at: -// http://www.ibm.com/developerworks/library/os-cpl.html -// -////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////// +// +// The JavaPOS library source code is now under the CPL license, which +// is an OSS Apache-like license. The complete license is located at: +// http://www.ibm.com/developerworks/library/os-cpl.html +// +////////////////////////////////////////////////////////////////////// //------------------------------------------------------------------------------ // // This software is provided "AS IS". The JavaPOS working group (including @@ -17,7 +17,7 @@ // software or its derivatives.Permission to use, copy, modify, and distribute // the software and its documentation for any purpose is hereby granted. // -// Scale.java - A JavaPOS 1.14.0 device control +// Scale.java - A JavaPOS 1.15.0 device control // //------------------------------------------------------------------------------ @@ -30,7 +30,7 @@ public class Scale extends BaseJposControl - implements ScaleControl114, JposConst + implements ScaleControl115, JposConst { //-------------------------------------------------------------------------- // Variables @@ -49,6 +49,7 @@ public class Scale protected ScaleService112 service112; protected ScaleService113 service113; protected ScaleService114 service114; + protected ScaleService115 service115; protected Vector directIOListeners; protected Vector dataListeners; protected Vector errorListeners; @@ -63,7 +64,7 @@ public Scale() { // Initialize base class instance data deviceControlDescription = "JavaPOS Scale Device Control"; - deviceControlVersion = deviceVersion114; + deviceControlVersion = deviceVersion115; // Initialize instance data. Initializations are commented out for // efficiency if the Java default is correct. @@ -80,6 +81,7 @@ public Scale() //service112 = null; //service113 = null; //service114 = null; + //service115 = null; directIOListeners = new Vector(); dataListeners = new Vector(); errorListeners = new Vector(); @@ -1834,13 +1836,13 @@ public void setSpecialTare(int mode, int data) } public void setTarePrioity(int priority) - throws JposException - { - setTarePriority(priority); - } + throws JposException + { + setTarePriority(priority); + } - public void setTarePriority(int priority) - throws JposException + public void setTarePriority(int priority) + throws JposException { // Make sure control is opened if(!bOpen) @@ -1935,6 +1937,7 @@ protected void setDeviceService(BaseService service, int nServiceVersion) service112 = null; service113 = null; service114 = null; + service115 = null; } else { @@ -2122,6 +2125,20 @@ protected void setDeviceService(BaseService service, int nServiceVersion) } } + if(serviceVersion >= deviceVersion115) + { + try + { + service115 = (ScaleService115)service; + } + catch(Exception e) + { + throw new JposException(JPOS_E_NOSERVICE, + "Service does not fully implement ScaleService115 interface", + e); + } + } + } } diff --git a/src/main/java/jpos/Scanner.java b/src/main/java/jpos/Scanner.java index 4ea0bed..936c553 100644 --- a/src/main/java/jpos/Scanner.java +++ b/src/main/java/jpos/Scanner.java @@ -1,10 +1,10 @@ -////////////////////////////////////////////////////////////////////// -// -// The JavaPOS library source code is now under the CPL license, which -// is an OSS Apache-like license. The complete license is located at: -// http://www.ibm.com/developerworks/library/os-cpl.html -// -////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////// +// +// The JavaPOS library source code is now under the CPL license, which +// is an OSS Apache-like license. The complete license is located at: +// http://www.ibm.com/developerworks/library/os-cpl.html +// +////////////////////////////////////////////////////////////////////// //------------------------------------------------------------------------------ // // This software is provided "AS IS". The JavaPOS working group (including @@ -17,7 +17,7 @@ // software or its derivatives.Permission to use, copy, modify, and distribute // the software and its documentation for any purpose is hereby granted. // -// Scanner.java - A JavaPOS 1.14.0 device control +// Scanner.java - A JavaPOS 1.15.0 device control // //------------------------------------------------------------------------------ @@ -30,7 +30,7 @@ public class Scanner extends BaseJposControl - implements ScannerControl114, JposConst + implements ScannerControl115, JposConst { //-------------------------------------------------------------------------- // Variables @@ -49,6 +49,7 @@ public class Scanner protected ScannerService112 service112; protected ScannerService113 service113; protected ScannerService114 service114; + protected ScannerService115 service115; protected Vector dataListeners; protected Vector directIOListeners; protected Vector errorListeners; @@ -63,7 +64,7 @@ public Scanner() { // Initialize base class instance data deviceControlDescription = "JavaPOS Scanner Device Control"; - deviceControlVersion = deviceVersion114; + deviceControlVersion = deviceVersion115; // Initialize instance data. Initializations are commented out for // efficiency if the Java default is correct. @@ -80,6 +81,7 @@ public Scanner() //service112 = null; //service113 = null; //service114 = null; + //service115 = null; dataListeners = new Vector(); directIOListeners = new Vector(); errorListeners = new Vector(); @@ -856,6 +858,7 @@ protected void setDeviceService(BaseService service, int nServiceVersion) service112 = null; service113 = null; service114 = null; + service115 = null; } else { @@ -1043,6 +1046,20 @@ protected void setDeviceService(BaseService service, int nServiceVersion) } } + if(serviceVersion >= deviceVersion115) + { + try + { + service115 = (ScannerService115)service; + } + catch(Exception e) + { + throw new JposException(JPOS_E_NOSERVICE, + "Service does not fully implement ScannerService115 interface", + e); + } + } + } } diff --git a/src/main/java/jpos/SignatureCapture.java b/src/main/java/jpos/SignatureCapture.java index 2e47c98..f3c69aa 100644 --- a/src/main/java/jpos/SignatureCapture.java +++ b/src/main/java/jpos/SignatureCapture.java @@ -1,10 +1,10 @@ -////////////////////////////////////////////////////////////////////// -// -// The JavaPOS library source code is now under the CPL license, which -// is an OSS Apache-like license. The complete license is located at: -// http://www.ibm.com/developerworks/library/os-cpl.html -// -////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////// +// +// The JavaPOS library source code is now under the CPL license, which +// is an OSS Apache-like license. The complete license is located at: +// http://www.ibm.com/developerworks/library/os-cpl.html +// +////////////////////////////////////////////////////////////////////// //------------------------------------------------------------------------------ // // This software is provided "AS IS". The JavaPOS working group (including @@ -17,7 +17,7 @@ // software or its derivatives.Permission to use, copy, modify, and distribute // the software and its documentation for any purpose is hereby granted. // -// SignatureCapture.java - A JavaPOS 1.14.0 device control +// SignatureCapture.java - A JavaPOS 1.15.0 device control // //------------------------------------------------------------------------------ @@ -30,7 +30,7 @@ public class SignatureCapture extends BaseJposControl - implements SignatureCaptureControl114, JposConst + implements SignatureCaptureControl115, JposConst { //-------------------------------------------------------------------------- // Variables @@ -49,6 +49,7 @@ public class SignatureCapture protected SignatureCaptureService112 service112; protected SignatureCaptureService113 service113; protected SignatureCaptureService114 service114; + protected SignatureCaptureService115 service115; protected Vector dataListeners; protected Vector directIOListeners; protected Vector errorListeners; @@ -63,7 +64,7 @@ public SignatureCapture() { // Initialize base class instance data deviceControlDescription = "JavaPOS SignatureCapture Device Control"; - deviceControlVersion = deviceVersion114; + deviceControlVersion = deviceVersion115; // Initialize instance data. Initializations are commented out for // efficiency if the Java default is correct. @@ -80,6 +81,7 @@ public SignatureCapture() //service112 = null; //service113 = null; //service114 = null; + //service115 = null; dataListeners = new Vector(); directIOListeners = new Vector(); errorListeners = new Vector(); @@ -1006,6 +1008,7 @@ protected void setDeviceService(BaseService service, int nServiceVersion) service112 = null; service113 = null; service114 = null; + service115 = null; } else { @@ -1193,6 +1196,20 @@ protected void setDeviceService(BaseService service, int nServiceVersion) } } + if(serviceVersion >= deviceVersion115) + { + try + { + service115 = (SignatureCaptureService115)service; + } + catch(Exception e) + { + throw new JposException(JPOS_E_NOSERVICE, + "Service does not fully implement SignatureCaptureService115 interface", + e); + } + } + } } diff --git a/src/main/java/jpos/SmartCardRW.java b/src/main/java/jpos/SmartCardRW.java index f448054..63fcfa6 100644 --- a/src/main/java/jpos/SmartCardRW.java +++ b/src/main/java/jpos/SmartCardRW.java @@ -1,10 +1,10 @@ -////////////////////////////////////////////////////////////////////// -// -// The JavaPOS library source code is now under the CPL license, which -// is an OSS Apache-like license. The complete license is located at: -// http://www.ibm.com/developerworks/library/os-cpl.html -// -////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////// +// +// The JavaPOS library source code is now under the CPL license, which +// is an OSS Apache-like license. The complete license is located at: +// http://www.ibm.com/developerworks/library/os-cpl.html +// +////////////////////////////////////////////////////////////////////// //------------------------------------------------------------------------------ // // This software is provided "AS IS". The JavaPOS working group (including @@ -17,7 +17,7 @@ // software or its derivatives.Permission to use, copy, modify, and distribute // the software and its documentation for any purpose is hereby granted. // -// SmartCardRW.java - A JavaPOS 1.14.0 device control +// SmartCardRW.java - A JavaPOS 1.15.0 device control // //------------------------------------------------------------------------------ @@ -30,7 +30,7 @@ public class SmartCardRW extends BaseJposControl - implements SmartCardRWControl114, JposConst + implements SmartCardRWControl115, JposConst { //-------------------------------------------------------------------------- // Variables @@ -43,6 +43,7 @@ public class SmartCardRW protected SmartCardRWService112 service112; protected SmartCardRWService113 service113; protected SmartCardRWService114 service114; + protected SmartCardRWService115 service115; protected Vector dataListeners; protected Vector directIOListeners; protected Vector errorListeners; @@ -58,7 +59,7 @@ public SmartCardRW() { // Initialize base class instance data deviceControlDescription = "JavaPOS SmartCardRW Device Control"; - deviceControlVersion = deviceVersion114; + deviceControlVersion = deviceVersion115; // Initialize instance data. Initializations are commented out for // efficiency if the Java default is correct. @@ -69,6 +70,7 @@ public SmartCardRW() //service112 = null; //service113 = null; //service114 = null; + //service115 = null; dataListeners = new Vector(); directIOListeners = new Vector(); errorListeners = new Vector(); @@ -1177,6 +1179,7 @@ protected void setDeviceService(BaseService service, int nServiceVersion) service112 = null; service113 = null; service114 = null; + service115 = null; } else { @@ -1280,6 +1283,20 @@ protected void setDeviceService(BaseService service, int nServiceVersion) } } + if(serviceVersion >= deviceVersion115) + { + try + { + service115 = (SmartCardRWService115)service; + } + catch(Exception e) + { + throw new JposException(JPOS_E_NOSERVICE, + "Service does not fully implement SmartCardRWService115 interface", + e); + } + } + } } diff --git a/src/main/java/jpos/ToneIndicator.java b/src/main/java/jpos/ToneIndicator.java index e16b593..579bcaa 100644 --- a/src/main/java/jpos/ToneIndicator.java +++ b/src/main/java/jpos/ToneIndicator.java @@ -1,10 +1,10 @@ -////////////////////////////////////////////////////////////////////// -// -// The JavaPOS library source code is now under the CPL license, which -// is an OSS Apache-like license. The complete license is located at: -// http://www.ibm.com/developerworks/library/os-cpl.html -// -////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////// +// +// The JavaPOS library source code is now under the CPL license, which +// is an OSS Apache-like license. The complete license is located at: +// http://www.ibm.com/developerworks/library/os-cpl.html +// +////////////////////////////////////////////////////////////////////// //------------------------------------------------------------------------------ // // This software is provided "AS IS". The JavaPOS working group (including @@ -17,7 +17,7 @@ // software or its derivatives.Permission to use, copy, modify, and distribute // the software and its documentation for any purpose is hereby granted. // -// ToneIndicator.java - A JavaPOS 1.14.0 device control +// ToneIndicator.java - A JavaPOS 1.15.0 device control // //------------------------------------------------------------------------------ @@ -30,7 +30,7 @@ public class ToneIndicator extends BaseJposControl - implements ToneIndicatorControl114, JposConst + implements ToneIndicatorControl115, JposConst { //-------------------------------------------------------------------------- // Variables @@ -49,6 +49,7 @@ public class ToneIndicator protected ToneIndicatorService112 service112; protected ToneIndicatorService113 service113; protected ToneIndicatorService114 service114; + protected ToneIndicatorService115 service115; protected Vector directIOListeners; protected Vector errorListeners; protected Vector outputCompleteListeners; @@ -63,7 +64,7 @@ public ToneIndicator() { // Initialize base class instance data deviceControlDescription = "JavaPOS ToneIndicator Device Control"; - deviceControlVersion = deviceVersion114; + deviceControlVersion = deviceVersion115; // Initialize instance data. Initializations are commented out for // efficiency if the Java default is correct. @@ -80,6 +81,7 @@ public ToneIndicator() //service112 = null; //service113 = null; //service114 = null; + //service115 = null; directIOListeners = new Vector(); errorListeners = new Vector(); outputCompleteListeners = new Vector(); @@ -1259,6 +1261,7 @@ protected void setDeviceService(BaseService service, int nServiceVersion) service112 = null; service113 = null; service114 = null; + service115 = null; } else { @@ -1446,6 +1449,20 @@ protected void setDeviceService(BaseService service, int nServiceVersion) } } + if(serviceVersion >= deviceVersion115) + { + try + { + service115 = (ToneIndicatorService115)service; + } + catch(Exception e) + { + throw new JposException(JPOS_E_NOSERVICE, + "Service does not fully implement ToneIndicatorService115 interface", + e); + } + } + } } From 7d1d8c7026aecae8ec50980e6f6d9c6e298ea12e Mon Sep 17 00:00:00 2001 From: Martin <37701263+mjpcger@users.noreply.github.com> Date: Mon, 11 Apr 2022 15:22:22 +0200 Subject: [PATCH 3/4] Missing implementation added Missing implementation for method registerServiceToMedium added. --- src/main/java/jpos/ElectronicValueRW.java | 31 +++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/src/main/java/jpos/ElectronicValueRW.java b/src/main/java/jpos/ElectronicValueRW.java index d7f7afc..47742c7 100644 --- a/src/main/java/jpos/ElectronicValueRW.java +++ b/src/main/java/jpos/ElectronicValueRW.java @@ -3889,6 +3889,37 @@ public void openDailyEVService(int[] data, Object[] object) throws JposException } } + @Override + public void registerServiceToMedium(int sequenceNumber, int timeout) throws JposException { + // Make sure control is opened + if(!bOpen) + { + throw new JposException(JPOS_E_CLOSED, "Control not opened"); + } + + // Make sure service supports at least version 1.15.0 + if(serviceVersion < deviceVersion115) + { + throw new JposException(JPOS_E_NOSERVICE, + "Device Service is not 1.15.0 compliant."); + } + + // Perform the operation + try + { + service115.registerServiceToMedium(sequenceNumber, timeout); + } + catch(JposException je) + { + throw je; + } + catch(Exception e) + { + throw new JposException(JPOS_E_FAILURE, + "Unhandled exception from Device Service", e); + } + } + public void retrieveResultInformation(String name, String[] value) throws JposException { From e95e37cbd1ece785b84bf9df79f664e8be600a45 Mon Sep 17 00:00:00 2001 From: Martin <37701263+mjpcger@users.noreply.github.com> Date: Thu, 21 Apr 2022 22:45:37 +0200 Subject: [PATCH 4/4] Changes due to interface corrections - Method setPaymentMedia added. - Parameter object in several methods changed: Type changed from Object[] to Object, name to obj to match the UPOS specification. --- .gitignore | 1 + src/main/java/jpos/ElectronicValueRW.java | 55 ++++++++++++++++++----- 2 files changed, 44 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 35fb748..194dbdf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /bin/ /build/ /.gradle/ +*.stub diff --git a/src/main/java/jpos/ElectronicValueRW.java b/src/main/java/jpos/ElectronicValueRW.java index 47742c7..fd056d3 100644 --- a/src/main/java/jpos/ElectronicValueRW.java +++ b/src/main/java/jpos/ElectronicValueRW.java @@ -3300,6 +3300,37 @@ public int getPaymentMedia() throws JposException { } } + @Override + public void setPaymentMedia(int paymentMedia) throws JposException { + // Make sure control is opened + if(!bOpen) + { + throw new JposException(JPOS_E_CLOSED, "Control not opened"); + } + + // Make sure service supports at least version 1.15.0 + if(serviceVersion < deviceVersion115) + { + throw new JposException(JPOS_E_NOSERVICE, + "Device Service is not 1.15.0 compliant."); + } + + // Perform the operation + try + { + service115.setPaymentMedia(paymentMedia); + } + catch(JposException je) + { + throw je; + } + catch(Exception e) + { + throw new JposException(JPOS_E_FAILURE, + "Unhandled exception from Device Service", e); + } + } + @Override public String getSlipNumber() throws JposException { // Make sure control is opened @@ -3456,7 +3487,7 @@ public void accessDailyLog(int sequenceNumber, int type, int timeout) throws Jpo } @Override - public void accessData(int dataType, int[] data, Object[] object) throws JposException { + public void accessData(int dataType, int[] data, Object obj) throws JposException { // Make sure control is opened if(!bOpen) { @@ -3473,7 +3504,7 @@ public void accessData(int dataType, int[] data, Object[] object) throws JposExc // Perform the operation try { - service115.accessData(dataType, data,object); + service115.accessData(dataType, data,obj); } catch(JposException je) { @@ -3487,7 +3518,7 @@ public void accessData(int dataType, int[] data, Object[] object) throws JposExc } @Override - public void activateEVService(int[] data, Object[] object) throws JposException { + public void activateEVService(int[] data, Object obj) throws JposException { // Make sure control is opened if(!bOpen) { @@ -3504,7 +3535,7 @@ public void activateEVService(int[] data, Object[] object) throws JposException // Perform the operation try { - service115.activateEVService(data, object); + service115.activateEVService(data, obj); } catch(JposException je) { @@ -3797,7 +3828,7 @@ public void checkServiceRegistrationToMedium(int sequenceNumber, int timeout) th } @Override - public void closeDailyEVService(int[] data, Object[] object) throws JposException { + public void closeDailyEVService(int[] data, Object obj) throws JposException { // Make sure control is opened if(!bOpen) { @@ -3814,7 +3845,7 @@ public void closeDailyEVService(int[] data, Object[] object) throws JposExceptio // Perform the operation try { - service115.closeDailyEVService(data, object); + service115.closeDailyEVService(data, obj); } catch(JposException je) { @@ -3828,7 +3859,7 @@ public void closeDailyEVService(int[] data, Object[] object) throws JposExceptio } @Override - public void deactivateEVService(int[] data, Object[] object) throws JposException { + public void deactivateEVService(int[] data, Object obj) throws JposException { // Make sure control is opened if(!bOpen) { @@ -3845,7 +3876,7 @@ public void deactivateEVService(int[] data, Object[] object) throws JposExceptio // Perform the operation try { - service115.deactivateEVService(data, object); + service115.deactivateEVService(data, obj); } catch(JposException je) { @@ -3859,7 +3890,7 @@ public void deactivateEVService(int[] data, Object[] object) throws JposExceptio } @Override - public void openDailyEVService(int[] data, Object[] object) throws JposException { + public void openDailyEVService(int[] data, Object obj) throws JposException { // Make sure control is opened if(!bOpen) { @@ -3876,7 +3907,7 @@ public void openDailyEVService(int[] data, Object[] object) throws JposException // Perform the operation try { - service115.openDailyEVService(data, object); + service115.openDailyEVService(data, obj); } catch(JposException je) { @@ -3984,7 +4015,7 @@ public void unregisterServiceToMedium(int sequenceNumber, int timeout) throws Jp } @Override - public void updateData(int dataType, int[] data, Object[] object) throws JposException { + public void updateData(int dataType, int[] data, Object obj) throws JposException { // Make sure control is opened if(!bOpen) { @@ -4001,7 +4032,7 @@ public void updateData(int dataType, int[] data, Object[] object) throws JposExc // Perform the operation try { - service115.updateData(dataType, data, object); + service115.updateData(dataType, data, obj); } catch(JposException je) {