public class PCOperationsManager
extends java.lang.Object
PCOperation
class.Modifier and Type | Method and Description |
---|---|
static void |
getOperation(PCUser user,
java.lang.String operationId,
PCGetOperationCallback callback)
Gets operation data from PCSDK Server
|
static void |
getOperationList(PCUser user,
PCListOperationsCallback callback)
Gets list of operations identifiers from PCSDK Server
|
static PCOperation |
importOperation(java.lang.String operationJson)
Imports operation from server response
|
static void |
processOperation(PCUser user,
PCOperation operation,
java.util.List<PCTransaction> transactionsToConfirm,
java.util.List<PCTransaction> transactionsToDecline,
PCKeysProcessor keysProcessor,
PCExtendedAuth extAuth,
PCProcessOperationCallback callback)
This method processes an operation similarly to
processOperation(PCUser, PCOperation, List, List, PCProcessOperationCallback)
but PCExtendedAuth is additionally used. |
static void |
processOperation(PCUser user,
PCOperation operation,
java.util.List<PCTransaction> transactionsToConfirm,
java.util.List<PCTransaction> transactionsToDecline,
PCKeysProcessor keysProcessor,
PCProcessOperationCallback callback)
Processes the operation by specifying which transactions must be confirmed and which transactions must be declined.
Each transaction in transactionsToConfirm or transactionsToDecline must be the reference to one of transactions returned by PCOperation.getTransactions() . |
static void |
processOperation(PCUser user,
PCOperation operation,
java.util.List<PCTransaction> transactionsToConfirm,
java.util.List<PCTransaction> transactionsToDecline,
PCProcessOperationCallback callback)
Processes an operation using
PCRegularKeysProcessor . |
public static void getOperationList(PCUser user, PCListOperationsCallback callback)
user
- Target PCUser
objectcallback
- PCGetOperationCallback
for handling resultspublic static void getOperation(PCUser user, java.lang.String operationId, PCGetOperationCallback callback)
user
- Target PCUser
objectoperationId
- Operation identifiercallback
- PCGetOperationCallback
for handling resultspublic static void processOperation(PCUser user, PCOperation operation, java.util.List<PCTransaction> transactionsToConfirm, java.util.List<PCTransaction> transactionsToDecline, PCProcessOperationCallback callback)
PCRegularKeysProcessor
.public static void processOperation(PCUser user, PCOperation operation, java.util.List<PCTransaction> transactionsToConfirm, java.util.List<PCTransaction> transactionsToDecline, PCKeysProcessor keysProcessor, PCProcessOperationCallback callback)
PCOperation.getTransactions()
. If some other transaction is passed, the operation will not be
processed and error of type PCError.PC_ERROR_ALIEN_TRANSACTION_IN_OPERATION
will be
returned trough the callback.PCError.PC_ERROR_MISS_TRANSACTIONS_TO_PROCESS
will be passed to callback.PCError.PC_ERROR_INVALID_METHOD_USAGE
will arise.PCError.PC_ERROR_USER_NOT_READY_TO_SIGN
is passed to callback.PCError.PC_ERROR_TRANSACTION_BINARY_DATA_IS_REQUIRED
will arise and the whole
operation will be prevented from further processing.PCProcessOperationCallback
to find out which types of errors can occur at different moments and
how they should be handled.user
- Target PCUser
operation
- Target PCOperation
to be processedtransactionsToConfirm
- List of PCTransaction
to be confirmedtransactionsToDecline
- List of PCTransaction
to be declinedkeysProcessor
- Keys processor for calculating confirmation/declination codes and signatures.
For default processing PCRegularKeysProcessor.getInstance()
should be
passed.callback
- PCProcessOperationCallback
to handle resultspublic static void processOperation(PCUser user, PCOperation operation, java.util.List<PCTransaction> transactionsToConfirm, java.util.List<PCTransaction> transactionsToDecline, PCKeysProcessor keysProcessor, PCExtendedAuth extAuth, PCProcessOperationCallback callback)
processOperation(PCUser, PCOperation, List, List, PCProcessOperationCallback)
but PCExtendedAuth
is additionally used.user
- Target PCUser
operation
- Target PCOperation
to be processedtransactionsToConfirm
- List of PCTransaction
to be confirmedtransactionsToDecline
- List of PCTransaction
to be declinedkeysProcessor
- Target keys processorextAuth
- PCExtendedAuth
object for external authenticationcallback
- PCProcessOperationCallback
to handle resultsprocessOperation(PCUser, PCOperation, List, List, PCProcessOperationCallback)
public static PCOperation importOperation(java.lang.String operationJson)
operationJson
- Server response in JSON formatPCOperation
or null if operation cannot be imported from given JSON