public class PCTransactionsManager
extends java.lang.Object
Constructor and Description |
---|
PCTransactionsManager() |
Modifier and Type | Method and Description |
---|---|
static void |
decline(PCUser user,
java.util.List<PCTransaction> transactions,
PCKeysProcessor keysProcessor,
PCMultipleDeclinationCallback callback)
Decline transaction
|
static void |
decline(PCUser user,
PCTransaction transaction,
PCDeclineCallback callback)
Decline transaction
|
static PCDeclination |
declineOffline(PCUser user,
PCTransaction transaction)
Decline in offline-mode
|
static void |
getAutoSignTransactionList(PCUser user,
PCListTransactionsCallback callback)
Get list of transactions identifiers from PCSDK Server for transactions which can be signed
automatically
|
static void |
getTransaction(PCUser user,
java.lang.String transactionId,
PCGetTransactionCallback callback)
Get transaction data from PCSDK Server
|
static void |
getTransactionBinaryData(PCUser user,
PCTransaction transaction,
PCGetTransactionBinaryDataCallback callback)
This method is used for transactions which contain binary data.
|
static void |
getTransactionList(PCUser user,
PCListTransactionsCallback callback)
Get list of transactions identifiers from PCSDK Server
|
static PCTransaction |
importTransaction(java.lang.String source)
Create transaction object by input string
|
static void |
setTransactionBinaryData(PCTransaction transaction,
java.io.InputStream data,
PCSetTransactionBinaryDataCallback callback)
Sets binary data for the transaction.
|
static void |
sign(PCUser user,
java.util.List<PCTransaction> transactions,
PCKeysProcessor keysProcessor,
PCMultipleConfirmationCallback callback)
Sign (confirm) multiple transactions
|
static void |
sign(PCUser user,
java.util.List<PCTransaction> transactions,
PCKeysProcessor keysProcessor,
ScoringSettings scoringSettings,
PCExtendedAuth extAuth,
PCMultipleConfirmationCallback callback)
Sign (confirm) multiple transactions
|
static void |
sign(PCUser user,
PCTransaction transaction,
PCExtendedAuth extAuth,
PCSignCallback callback)
Sign (confirm) transaction with Extended authentication
|
static void |
sign(PCUser user,
PCTransaction transaction,
PCSignCallback callback)
Sing (confirm) transaction
|
static PCConfirmation |
signOffline(PCUser user,
PCTransaction transaction)
Sign in offline-mode
|
public static void getTransactionList(PCUser user, PCListTransactionsCallback callback)
user
- User objectcallback
- callback to process results
PCListTransactionsCallback
public static void getAutoSignTransactionList(PCUser user, PCListTransactionsCallback callback)
user
- User objectcallback
- callback to process results
PCListTransactionsCallback
public static void getTransaction(PCUser user, java.lang.String transactionId, PCGetTransactionCallback callback)
user
- User objecttransactionId
- Transaction identifiercallback
- callback to process results
PCGetTransactionCallback
public static void getTransactionBinaryData(PCUser user, PCTransaction transaction, PCGetTransactionBinaryDataCallback callback)
PCTransaction.hasBinaryData()
first. In your
PCGetTransactionBinaryDataCallback.success(PCTransaction)
method you will receive
a PCTransaction
object with filled binary data.PCTransaction.getStoredBinaryData()
()}
method.user
- target PCUser
objecttransaction
- PCTransaction
for which binary data needs to be downloadedcallback
- PCGetTransactionBinaryDataCallback
for processing the resultpublic static void setTransactionBinaryData(PCTransaction transaction, java.io.InputStream data, PCSetTransactionBinaryDataCallback callback)
getTransactionBinaryData(PCUser, PCTransaction, PCGetTransactionBinaryDataCallback)
and can be used when binary data (e.g. PDF file) is already present on the device and there is no need to
download it from the server.getTransactionBinaryData(PCUser, PCTransaction, PCGetTransactionBinaryDataCallback)
),
it will overwritten.transaction
- Target PCTransaction
data
- Stream of data. It will be read by PCSDK and copied into a temporary filecallback
- Instance PCSetTransactionBinaryDataCallback
for handling resultspublic static void sign(PCUser user, PCTransaction transaction, PCSignCallback callback)
user
- User object. isReadyToSign must be truetransaction
- Transaction objectcallback
- callback to process results
PCSignCallback
public static void sign(PCUser user, PCTransaction transaction, PCExtendedAuth extAuth, PCSignCallback callback)
user
- User object. isReadyToSign must be truetransaction
- Transaction objectextAuth
- Extended authentication datacallback
- callback to process results
PCSignCallback
public static void sign(PCUser user, java.util.List<PCTransaction> transactions, PCKeysProcessor keysProcessor, PCMultipleConfirmationCallback callback)
user
- User object. isReadyToSign must be truetransactions
- List of transactions to be confirmedkeysProcessor
- Instance of keys processor. PCRegularKeysProcessor.getInstance()
must be used if
signature keys are stored on a devicecallback
- Instance of PCMultipleConfirmationCallback
to process resultspublic static void sign(PCUser user, java.util.List<PCTransaction> transactions, PCKeysProcessor keysProcessor, ScoringSettings scoringSettings, PCExtendedAuth extAuth, PCMultipleConfirmationCallback callback)
user
- User object. isReadyToSign must be truetransactions
- List of transactions to be confirmedkeysProcessor
- Instance of keys processor. PCRegularKeysProcessor.getInstance()
must be used if
signature keys are stored on a devicescoringSettings
- Scoring settings to make PC Server check device scoring when confirming transactions.
Pass null if scoring is not neededextAuth
- Extended authentication datacallback
- Instance of PCMultipleConfirmationCallback
to process resultspublic static void decline(PCUser user, PCTransaction transaction, PCDeclineCallback callback)
user
- User object. isReadyToSign must be truetransaction
- Transaction objectcallback
- callback to process resultspublic static void decline(PCUser user, java.util.List<PCTransaction> transactions, PCKeysProcessor keysProcessor, PCMultipleDeclinationCallback callback)
user
- User object. isReadyToSign must be truetransactions
- Transaction objectcallback
- callback to process resultspublic static PCConfirmation signOffline(PCUser user, PCTransaction transaction)
user
- User object. isReadyToSign must be truetransaction
- Transaction objectpublic static PCDeclination declineOffline(PCUser user, PCTransaction transaction)
user
- User object. isReadyToSign must be truetransaction
- Transaction objectpublic static PCTransaction importTransaction(java.lang.String source)
source
- Input string with transaction data