|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.retail.saf.provider.kiosk.KioskSalesTransaction
Provides an implementation of SalesTransaction
for Kiosk applications.
Field Summary | |
---|---|
protected com.ibm.retail.saf.provider.CashReceiptImage |
cashReceiptImage
|
protected com.ibm.retail.saf.provider.PaymentResult |
paymentResult
|
protected com.ibm.retail.saf.provider.kiosk.KioskPOSProvider |
server
|
protected com.ibm.retail.saf.provider.SalesTransaction |
serverTransaction
|
protected com.ibm.retail.saf.provider.TransactionResult |
transactionResult
|
protected com.ibm.retail.saf.provider.POSStatus |
transactionState
|
Constructor Summary | |
---|---|
KioskSalesTransaction(com.ibm.retail.saf.provider.kiosk.KioskPOSProviderImpl provider)
Constructor |
Method Summary | |
---|---|
void |
cancel()
Cancels the transaction. |
void |
confirm()
Provides confirmation that the client has received the results from a point-of-sale transaction request. |
com.ibm.retail.saf.provider.CashReceiptImage |
getCashReceiptImage()
Get the image of the point-of-sale cash receipt produced by the transaction. |
com.ibm.retail.saf.provider.PaymentResult |
getPaymentResults()
Returns the results from a payment operation on this transaction. |
com.ibm.retail.saf.provider.TransactionID |
getTransactionID()
Get the transaction identifier. |
com.ibm.retail.saf.provider.TransactionTotals |
getTransactionTotals()
Get the transaction totals. |
boolean |
isCancelAllowed()
Returns true if the transaction is in a state that allows it to be cancelled. |
boolean |
isConfirmAllowed()
Returns true if the transaction is in a state that allows it to be confirmed. |
boolean |
isPaymentAllowed()
Returns true if the transaction is in a state that allows a payment operation to be performed. |
boolean |
isSalesAllowed()
Returns true if the transaction is in a state that allows sales operations to be performed. |
com.ibm.retail.saf.provider.PaymentResult |
payBalance(com.ibm.retail.saf.provider.PaymentRequest paymentRequest)
Sends a request to the point-of-sale system to tender payment for the balance and complete the transaction. |
com.ibm.retail.saf.provider.TransactionResult |
performSales(com.ibm.retail.saf.provider.TransactionRequest transactionRequest)
Sends a transaction request to the point-of-sale system to perform the sales operations on the transaction. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected com.ibm.retail.saf.provider.kiosk.KioskPOSProvider server
protected com.ibm.retail.saf.provider.SalesTransaction serverTransaction
protected com.ibm.retail.saf.provider.POSStatus transactionState
protected com.ibm.retail.saf.provider.TransactionResult transactionResult
protected com.ibm.retail.saf.provider.PaymentResult paymentResult
protected com.ibm.retail.saf.provider.CashReceiptImage cashReceiptImage
Constructor Detail |
public KioskSalesTransaction(com.ibm.retail.saf.provider.kiosk.KioskPOSProviderImpl provider) throws TransactionInProgressException, java.rmi.RemoteException, POSException
provider
-
TransactionInProgressException
java.rmi.RemoteException
POSException
Method Detail |
public com.ibm.retail.saf.provider.TransactionResult performSales(com.ibm.retail.saf.provider.TransactionRequest transactionRequest) throws TransactionStateException, java.rmi.RemoteException, POSException
SalesTransaction
This method provides a means to submit sales information to the point-of-sale system to initiate processing of a sales transaction.
The TransactionRequest
provided by the caller must include all the items
to be included in the transaction.
Additional information such as customer loyalty information may also be included in the request.
The point-of-sale system will process the request and will return an
TransationResult
object if no exceptions occur.
If the processing of the items is unsuccessful, an exception is thrown detailing the error
condition.
If the transaction processing is successfully performed on the POS and no exceptions are thrown,
a TransationResult
object is returned to the client containing the results.
If the POS is not able to receive and process the request, an exception is thrown which details the error condition.
performSales
in interface SalesTransaction
transactionRequest
- contains the information for the point-of-sale to process this request.
POSException
- if the point-of-sale system is unable to process the request.
The exception wrappers the cause and provides
further details on the current condition.
TransactionStateException
- if the state of the transaction does not allow this request.
is unable to process this request.
java.rmi.RemoteException
public com.ibm.retail.saf.provider.PaymentResult payBalance(com.ibm.retail.saf.provider.PaymentRequest paymentRequest) throws TransactionStateException, TenderException, java.rmi.RemoteException, POSException
SalesTransaction
This method provides a means to submit the payment information to the point-of-sale system for completion of the sales transaction.
The PaymentRequest
provided by the caller includes the customer payment information
needed for the point-of-sale system to complete payment for the transaction.
The point-of-sale system will process the
request and put the results of the operation into the PaymentResult
object.
If the POS is not able to receive and process the request, an exception is thrown which details the error condition.
payBalance
in interface SalesTransaction
paymentRequest
- contains the information for the point-of-sale to process this request
TenderException
- if the payment request failed on the point-of-sale system.
POSException
- if the point-of-sale system is unable to process the request.
TransactionStateException
- if the transaction is not in the proper state.
java.rmi.RemoteException
public void confirm() throws TransactionStateException, java.rmi.RemoteException, POSException
SalesTransaction
This method provides a means for the client to acknowledge receipt of the payment results
from the complete
method and is used to ensure integrity of the
payment processing operation. Transactions that are not confirmed are handled as exceptions.
A SalesTransation
must be in the complete state before this method can
be called. A SalesTransation
is complete after it has been
successfully tendered using the complete
method.
confirm
in interface SalesTransaction
TransactionStateException
- if the transaction is not in the proper state.
POSException
- if the point-of-sale system is unable to process the request.
java.rmi.RemoteException
public void cancel() throws TransactionStateException, java.rmi.RemoteException, POSException
SalesTransaction
cancel
in interface SalesTransaction
POSException
- if the point-of-sale system is unable to process the request.
TransactionStateException
- if the transaction is not in the proper state.
java.rmi.RemoteException
public com.ibm.retail.saf.provider.TransactionID getTransactionID()
Transaction
The TransactionID
is used to identify the transaction.
getTransactionID
in interface Transaction
public com.ibm.retail.saf.provider.TransactionTotals getTransactionTotals()
Transaction
The TransactionTotals
contain the totals produced by the
processing of the transaction. This information includes the total
amount and tax.
getTransactionTotals
in interface Transaction
public com.ibm.retail.saf.provider.CashReceiptImage getCashReceiptImage()
Transaction
The CashReceiptImage
contains raw and formatted print lines
that were sent to the point-of-sale receipt printer during the processing
of the transaction.
getCashReceiptImage
in interface Transaction
public com.ibm.retail.saf.provider.PaymentResult getPaymentResults()
Transaction
getPaymentResults
in interface Transaction
public boolean isSalesAllowed()
SalesTransaction
Sales operations are invoked through the method performSales
.
isSalesAllowed
in interface SalesTransaction
public boolean isCancelAllowed()
SalesTransaction
A transaction is cancelled by invoking the cancel
method.
The current transaction must be confirmed or cancelled before a POSProvider
will make a new transaction.
isCancelAllowed
in interface SalesTransaction
public boolean isPaymentAllowed()
SalesTransaction
A payment operation is performed by invoking the payBalance
method.
isPaymentAllowed
in interface SalesTransaction
public boolean isConfirmAllowed()
SalesTransaction
A transaction is confirmed by invoking the confirm
method.
isConfirmAllowed
in interface SalesTransaction
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |