public interface TransactionServiceLocal extends TransactionService
TransactionService| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ATTR_AUTHORIZATION_LEVEL
Script bind variable: the
AuthorizationLevel (if the payment would be authorized) |
static java.lang.String |
ATTR_FROM_OWNER
Script bind variable: the
InternalAccountOwner from |
static java.lang.String |
ATTR_FROM_OWNER_RESULT
Script bind variable: the
LocateAccountOwnerResult of the from |
static java.lang.String |
ATTR_NEW_STATUS
Script bind variable: the new status
|
static java.lang.String |
ATTR_OLD_STATUS
Script bind variable: the old status
|
static java.lang.String |
ATTR_PAYMENT_TYPE
Script bind variable: the
PaymentTransferType |
static java.lang.String |
ATTR_PERFORM_TRANSACTION
Script bind variable: the
PerformTransactionDTO |
static java.lang.String |
ATTR_PREVIEW
Script bind variable: the
PaymentPreviewVO |
static java.lang.String |
ATTR_TO_OWNER
Script bind variable: the
AccountOwner to |
static java.lang.String |
ATTR_TO_OWNER_RESULT
Script bind variable: the
LocateAccountOwnerResult of the to |
static java.lang.String |
ATTR_TRANSACTION
Script bind variable: the
Transaction (only available in the
TransactionExtensionPointEvent.CONFIRM event, on the validated
phase) |
| Modifier and Type | Method and Description |
|---|---|
<Q extends org.cyclos.impl.utils.persistence.DBQuery<?>> |
applyStatusesFilter(TransactionNature nature,
org.cyclos.entities.banking.QTransaction t,
java.util.Set<? extends java.lang.Enum<?>> statuses,
Q query)
Adds a filter by statuses to the given query according to the nature.
|
void |
check(LocateAccountOwnerResult from,
LocateAccountOwnerResult to)
Performs security checks for the given transaction parameters
|
void |
check(LocateAccountOwnerResult from,
LocateAccountOwnerResult to,
TransferType transferType)
Performs security checks for the given transaction parameters, taking into account the current session data
channel and principal type
|
void |
check(PerformInternalTransactionDTO parameters)
Performs security checks for the given transaction parameters
|
void |
checkIgnoringSessionData(LocateAccountOwnerResult from,
LocateAccountOwnerResult to,
TransferType transferType)
Performs security checks for the given transaction parameters, ignoring the current session data channel and
principal type
|
void |
checkPaymentParameters(LocateAccountOwnerResult from,
LocateAccountOwnerResult to,
org.cyclos.impl.banking.PaymentServiceImpl.PaymentOperation paymentOperation,
PaymentTransferType paymentType)
Checks that a payment can be performed from / to the given owners, with the given payment type
|
org.cyclos.impl.utils.persistence.DBQuery<?> |
createQuery(TransactionNature nature,
org.cyclos.entities.banking.QTransaction t,
BaseTransactionQuery params)
Creates a basic query to search transactions.
|
PaymentTransferType |
fill(BasePaymentTypeData data,
LocateAccountOwnerResult from,
LocateAccountOwnerResult to,
PaymentTransferType paymentType)
Fills in the given payment type data from / to the given owners, using the given payment type
|
void |
fill(Transaction transaction,
TransactionData data)
Fills a transaction data
|
void |
fill(Transaction transaction,
TransferType type,
org.cyclos.impl.banking.PaymentServiceImpl.PaymentOperation operation,
LocateAccountOwnerResult from,
LocateAccountOwnerResult to,
java.lang.String fromName,
java.lang.String toName,
java.math.BigDecimal amount,
java.lang.String description,
java.util.Collection<CustomFieldValueDTO> customValues)
Fills data in a transaction
|
Transaction |
findByTransactionNumber(java.lang.String transactionNumber)
Returns a transaction by transaction number, or throws
EntityNotFoundException if not found |
boolean |
isCheckConfirmationPassword(PaymentTransferType paymentType,
InternalAccountOwner owner,
java.math.BigDecimal amount,
java.util.Date date)
It returns true if the confirmation password must be required according to the channel configuration or if it
must not be required
(independently of the channel's configuration) because the
payment's amount is less than or equal the maximum for a pin-less payment.
|
java.util.List<PaymentTransferType> |
listPaymentTypes(LocateAccountOwnerResult from,
LocateAccountOwnerResult to,
boolean receive)
Returns the possible payment types between the given owners
|
LocateAccountOwnerResult |
locateForPayment(InternalAccountOwner owner)
Locate the receiver when performing a payment using the principal types allowed to perform a payment.
|
LocateAccountOwnerResult |
locateForReceiving(InternalAccountOwner owner)
Locate the payer when receiving a payment using the principal types allowed to receive a payment.
Additionally, it checks if the BuiltInChannel.POS channel is accessible for the located payer. |
void |
persist(Transaction transaction)
Persists the given transaction and immediately performs additional actions, such as calling the
CustomFieldValueHandler.processAfterSave(org.cyclos.entities.system.EntityWithCustomValues) method. |
org.cyclos.impl.banking.TransactionValidationData |
prepareValidation(org.cyclos.impl.banking.PrepareValidationParameter parameter)
Returns a validator filled with all common validations, plus some other data which was already loaded.
|
<T> T |
receive(InternalAccountOwner from,
java.util.concurrent.Callable<T> action)
Sets up the session data for receiving a transaction from the given user, invoking the given Callable in it.
|
PaymentTransferType |
resolvePaymentType(InternalAccountOwner from,
AccountOwner to,
CurrencyVO currency,
Channel channel,
PrincipalType principalType,
org.cyclos.impl.banking.PaymentServiceImpl.PaymentOperation paymentOperation)
Returns the payment type matching the from, to, and optionally, currency according to the given payment
operation.
|
<T extends Transaction & HasTransactionStatus<S>,S extends TransactionStatus> |
setStatusAndGetExtensionPoint(T transaction,
S newStatus)
Creates a
ExtensionPointAccessor for a status change, fires the validated event and sets new status |
TransactionEntryVO |
toEntry(InternalAccountOwner owner,
Transaction transaction)
Converts a transaction to the corresponding entry type
|
void |
updatePerformAfterPreview(PerformTransactionDTO dto,
LocateAccountOwnerResult from,
LocateAccountOwnerResult to,
TransferType paymentType)
Updates the given
PerformTransactionDTO to make it suitable to be returned again after a preview |
void |
validateMinTimeBetweenPayments(LocateAccountOwnerResult owner,
PaymentTransferType paymentType)
Validates the minimum time between payments
|
void |
validatePaymentAmount(LocateAccountOwnerResult from,
LocateAccountOwnerResult to,
PaymentTransferType paymentType,
java.math.BigDecimal amount,
java.util.Date date)
Validates an amount to be paid from the given account
|
getData, getMaturityTable, getPaymentData, getPaymentToOwnerData, getPaymentTypeData, getReceivePaymentData, getReceivePaymentFromUserData, getReceivePaymentTypeData, getSearchData, load, loadByTransactionNumber, print, requestNewOTPForReceive, searchstatic final java.lang.String ATTR_PERFORM_TRANSACTION
PerformTransactionDTOstatic final java.lang.String ATTR_TRANSACTION
Transaction (only available in the
TransactionExtensionPointEvent.CONFIRM event, on the validated
phase)static final java.lang.String ATTR_PREVIEW
PaymentPreviewVOstatic final java.lang.String ATTR_PAYMENT_TYPE
PaymentTransferTypestatic final java.lang.String ATTR_FROM_OWNER
InternalAccountOwner fromstatic final java.lang.String ATTR_TO_OWNER
AccountOwner tostatic final java.lang.String ATTR_FROM_OWNER_RESULT
LocateAccountOwnerResult of the fromstatic final java.lang.String ATTR_TO_OWNER_RESULT
LocateAccountOwnerResult of the tostatic final java.lang.String ATTR_AUTHORIZATION_LEVEL
AuthorizationLevel (if the payment would be authorized)static final java.lang.String ATTR_OLD_STATUS
static final java.lang.String ATTR_NEW_STATUS
<Q extends org.cyclos.impl.utils.persistence.DBQuery<?>> Q applyStatusesFilter(@NotNull
TransactionNature nature,
org.cyclos.entities.banking.QTransaction t,
java.util.Set<? extends java.lang.Enum<?>> statuses,
Q query)
createQuery(TransactionNature, QTransaction, BaseTransactionQuery)void check(LocateAccountOwnerResult from, LocateAccountOwnerResult to)
void check(LocateAccountOwnerResult from, LocateAccountOwnerResult to, TransferType transferType)
void check(PerformInternalTransactionDTO parameters)
void checkIgnoringSessionData(LocateAccountOwnerResult from, LocateAccountOwnerResult to, TransferType transferType)
void checkPaymentParameters(LocateAccountOwnerResult from, LocateAccountOwnerResult to, org.cyclos.impl.banking.PaymentServiceImpl.PaymentOperation paymentOperation, PaymentTransferType paymentType)
org.cyclos.impl.utils.persistence.DBQuery<?> createQuery(@Nullable
TransactionNature nature,
org.cyclos.entities.banking.QTransaction t,
BaseTransactionQuery params)
PaymentTransferType fill(BasePaymentTypeData data, LocateAccountOwnerResult from, LocateAccountOwnerResult to, PaymentTransferType paymentType)
void fill(Transaction transaction, TransactionData data)
void fill(Transaction transaction, TransferType type, org.cyclos.impl.banking.PaymentServiceImpl.PaymentOperation operation, LocateAccountOwnerResult from, LocateAccountOwnerResult to, java.lang.String fromName, java.lang.String toName, java.math.BigDecimal amount, java.lang.String description, java.util.Collection<CustomFieldValueDTO> customValues)
Transaction findByTransactionNumber(java.lang.String transactionNumber)
EntityNotFoundException if not foundboolean isCheckConfirmationPassword(PaymentTransferType paymentType, InternalAccountOwner owner, java.math.BigDecimal amount, java.util.Date date)
paymentType - the type used for the payment.the - payerdate - if null then the method will only check the maximum per transaction for a pin-less payment.DateHelper.now() as the last
parameter.java.util.List<PaymentTransferType> listPaymentTypes(LocateAccountOwnerResult from, LocateAccountOwnerResult to, boolean receive)
LocateAccountOwnerResult locateForPayment(InternalAccountOwner owner)
LocateAccountOwnerResult locateForReceiving(InternalAccountOwner owner)
BuiltInChannel.POS channel is accessible for the located payer.void persist(Transaction transaction)
CustomFieldValueHandler.processAfterSave(org.cyclos.entities.system.EntityWithCustomValues) method.org.cyclos.impl.banking.TransactionValidationData prepareValidation(org.cyclos.impl.banking.PrepareValidationParameter parameter)
<T> T receive(InternalAccountOwner from, java.util.concurrent.Callable<T> action)
PaymentTransferType resolvePaymentType(InternalAccountOwner from, AccountOwner to, CurrencyVO currency, Channel channel, PrincipalType principalType, org.cyclos.impl.banking.PaymentServiceImpl.PaymentOperation paymentOperation)
<T extends Transaction & HasTransactionStatus<S>,S extends TransactionStatus> org.cyclos.impl.system.ExtensionPointAccessor setStatusAndGetExtensionPoint(T transaction, S newStatus)
ExtensionPointAccessor for a status change, fires the validated event and sets new statusTransactionEntryVO toEntry(InternalAccountOwner owner, Transaction transaction)
void updatePerformAfterPreview(PerformTransactionDTO dto, LocateAccountOwnerResult from, LocateAccountOwnerResult to, TransferType paymentType)
PerformTransactionDTO to make it suitable to be returned again after a previewvoid validateMinTimeBetweenPayments(LocateAccountOwnerResult owner, PaymentTransferType paymentType)
void validatePaymentAmount(LocateAccountOwnerResult from, LocateAccountOwnerResult to, PaymentTransferType paymentType, java.math.BigDecimal amount, java.util.Date date)