Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

My1.15 adds #7

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/bin/
/build/
/.gradle/
*.stub
15 changes: 8 additions & 7 deletions src/main/java/jpos/BaseJposControl.java
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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


//--------------------------------------------------------------------------
Expand Down
36 changes: 26 additions & 10 deletions src/main/java/jpos/Belt.java
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
//
//------------------------------------------------------------------------------

Expand All @@ -30,7 +30,7 @@

public class Belt
extends BaseJposControl
implements BeltControl114, JposConst
implements BeltControl115, JposConst
{
//--------------------------------------------------------------------------
// Variables
Expand All @@ -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;

Expand All @@ -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();
}
Expand Down Expand Up @@ -1249,6 +1251,7 @@ protected void setDeviceService(BaseService service, int nServiceVersion)
service112 = null;
service113 = null;
service114 = null;
service115 = null;
}
else
{
Expand Down Expand Up @@ -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);
}
}
}
}

Expand Down
37 changes: 27 additions & 10 deletions src/main/java/jpos/BillAcceptor.java
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
//
//------------------------------------------------------------------------------

Expand All @@ -30,7 +30,7 @@

public class BillAcceptor
extends BaseJposControl
implements BillAcceptorControl114, JposConst
implements BillAcceptorControl115, JposConst
{
//--------------------------------------------------------------------------
// Variables
Expand All @@ -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;
Expand All @@ -53,14 +54,15 @@ 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.
//service111 = null;
//service112 = null;
//service113 = null;
//service114 = null;
//service115 = null;
dataListeners = new Vector();
directIOListeners = new Vector();
statusUpdateListeners = new Vector();
Expand Down Expand Up @@ -1079,6 +1081,7 @@ protected void setDeviceService(BaseService service, int nServiceVersion)
service112 = null;
service113 = null;
service114 = null;
service115 = null;
}
else
{
Expand Down Expand Up @@ -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);
}
}

}
}

Expand Down
37 changes: 27 additions & 10 deletions src/main/java/jpos/BillDispenser.java
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
//
//------------------------------------------------------------------------------

Expand All @@ -30,7 +30,7 @@

public class BillDispenser
extends BaseJposControl
implements BillDispenserControl114, JposConst
implements BillDispenserControl115, JposConst
{
//--------------------------------------------------------------------------
// Variables
Expand All @@ -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;

Expand All @@ -52,14 +53,15 @@ 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.
//service111 = null;
//service112 = null;
//service113 = null;
//service114 = null;
//service115 = null;
directIOListeners = new Vector();
statusUpdateListeners = new Vector();
}
Expand Down Expand Up @@ -952,6 +954,7 @@ protected void setDeviceService(BaseService service, int nServiceVersion)
service112 = null;
service113 = null;
service114 = null;
service115 = null;
}
else
{
Expand Down Expand Up @@ -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);
}
}

}
}

Expand Down
37 changes: 27 additions & 10 deletions src/main/java/jpos/Biometrics.java
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
//
//------------------------------------------------------------------------------

Expand All @@ -30,7 +30,7 @@

public class Biometrics
extends BaseJposControl
implements BiometricsControl114, JposConst
implements BiometricsControl115, JposConst
{
//--------------------------------------------------------------------------
// Variables
Expand All @@ -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;
Expand All @@ -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.
Expand All @@ -64,6 +65,7 @@ public Biometrics()
//service112 = null;
//service113 = null;
//service114 = null;
//service115 = null;
dataListeners = new Vector();
directIOListeners = new Vector();
errorListeners = new Vector();
Expand Down Expand Up @@ -1384,6 +1386,7 @@ protected void setDeviceService(BaseService service, int nServiceVersion)
service112 = null;
service113 = null;
service114 = null;
service115 = null;
}
else
{
Expand Down Expand Up @@ -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);
}
}

}
}

Expand Down
Loading