JavaPOSWorkingGroup / javapos-contracts

Hosts the interfaces and data types of the UnifiedPOS reference implementation for Java.
Other
8 stars 9 forks source link

"get" prefix is missing for property method ElectronicValueRWControl114.CapTrainingMode #2

Closed kuniss closed 6 years ago

kuniss commented 7 years ago

Normally, all capabilities and properties have a "get" prefix in JavaPOS. Seems this prefix was forgotten to be added for the property CapTrainingMode of category ElectronicValueRW; see jpos/ElectronicValueRWControl114.java.

A new property method needs to be added which includes the "get" prefix. Control implementations may forward the call to this new property to the original method w/o the "get" prefix. The originally property method should be marked as deprecated.

The "get" prefix is also missing at the service interface; see jpos/services/ElectronicValueRWService114.java. But here it should not be corrected as it would break existing implementations if any.

kuniss commented 6 years ago

As we will not be able to fix this issue completely due to the backward compatibility constraints, I recommend to get at least the Device Control interface to applications right.

The intention here is that application programmers are not so close to and familiar with UnifiedPOS, knowing such details. Device Service implementers are may be more familiar with such specific hassles.

My proposal is to add an new method getCapTrainingMode to the Device Control interface of ElectronicValueRW aligned to the common naming schema, requesting that it must call the not naming schema aligned Device Service interface method CapTrainingMode. And, to let the Device Service interface of ElectronicValueRW unchanged.

This will allow application programmers to use the naming schema aligned property in their code when using the newest version of JavaPOS contracts ignoring the not name schema aligned one.

On the other side, a newer implementation of Device Controls will be able to deal with Device Service implementations which are based on the last 1.14 JavaPOS contract library implementing the not naming schema aligned property. In fact, the Device Service interface will not change for a new version of the JavaPOS contracts library.

kuniss commented 6 years ago

According to the proposal above we will not change anything on the service interface. Therefore, this issues is closed.

kuniss commented 6 years ago

Forgotten: the ElectronicValueRWControl114 interface has to be altered by adding the naming schema aligned new name getCapTrainingMode.

kuniss commented 6 years ago

Solved with release javapos-contracts-1.14.3.