Package org.cyclos.impl.banking
Interface TransactionAuthorizationServiceLocal
-
- All Superinterfaces:
Service,TransactionAuthorizationService
- All Known Implementing Classes:
TransactionAuthorizationServiceImpl
public interface TransactionAuthorizationServiceLocal extends TransactionAuthorizationService
Local interface for transfer authorization service
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidauthorizeFirstLevelIfNeeded(BasePayment transaction)If the given transaction is pending authorization and the logged user could authorize the first level, the transaction is immediately authorized.voidcancel(BasePayment payment, String comments)Cancel the given payment and set the comments to the correspondingTransactionAuthorizationintcancelAll(UserAccount account)Cancels all payments pending authorization from or to the given accountvoidexpire(BasePayment payment)Expires the given payment (invoked by a polling task)Pair<TransactionAuthorizationType,AuthorizationLevel>initialAuthorization(PaymentTransferType transferType, BigDecimal transactionAmount)Returns the first authorization condition for a given transfervoidnotifyPendingAuthorization(BasePayment transaction)Notifies the next authorizer in line about the pending transaction to be authorized.<T extends BasePayment>
voidregisterHandler(AuthorizationAction action, Class<T> transactionClass, Consumer<T> handler)Registers a handler which runs when an authorization action takes place over the given transaction-
Methods inherited from interface org.cyclos.services.banking.TransactionAuthorizationService
authorize, cancel, deny
-
-
-
-
Method Detail
-
authorizeFirstLevelIfNeeded
void authorizeFirstLevelIfNeeded(BasePayment transaction)
If the given transaction is pending authorization and the logged user could authorize the first level, the transaction is immediately authorized.
-
cancel
void cancel(BasePayment payment, String comments)
Cancel the given payment and set the comments to the correspondingTransactionAuthorization
-
cancelAll
int cancelAll(UserAccount account)
Cancels all payments pending authorization from or to the given account
-
expire
void expire(BasePayment payment)
Expires the given payment (invoked by a polling task)- Throws:
IllegalAccessException- if the payment's authorization status is notTransactionAuthorizationStatus.PENDING_AUTHORIZATION
-
initialAuthorization
Pair<TransactionAuthorizationType,AuthorizationLevel> initialAuthorization(PaymentTransferType transferType, BigDecimal transactionAmount)
Returns the first authorization condition for a given transfer
-
notifyPendingAuthorization
void notifyPendingAuthorization(BasePayment transaction)
Notifies the next authorizer in line about the pending transaction to be authorized.
-
registerHandler
<T extends BasePayment> void registerHandler(AuthorizationAction action, Class<T> transactionClass, Consumer<T> handler)
Registers a handler which runs when an authorization action takes place over the given transaction
-
-