Package org.cyclos.services.banking
Interface TransactionService
-
- All Superinterfaces:
Service
- All Known Subinterfaces:
TransactionServiceLocal
public interface TransactionService extends Service
Service interface to access generic transactions, be them payments or scheduled payments
-
-
Field Summary
Fields Modifier and Type Field Description static BigDecimalMAX_TRANSACTION_AMOUNT_EXCLUSIVEThe maximum amount of a transaction, exclusive.static intMAX_TRANSACTION_AMOUNT_INTEGERSThe power of 10 for .
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DeviceConfirmationVOcreateDeviceConfirmationForReceive(@NotNull PerformInternalTransactionDTO parameters)Creates a new pending for approval device confirmation for the payer.SerializableInputStreamdeviceConfirmationBarcodeForReceive(InternalAccountOwner payer, DeviceConfirmationBarcodeParams params)Generates a two-dimensional barcode (QR code), only if the confirmation was not already approved nor rejected for the given payer.FileInfoexportInstallments(@NotNull ExportFormatVO format, @NotNull InstallmentQuery query)Exports a installments search results to fileFileInfoexportInstallmentsOverview(@NotNull ExportFormatVO format, @NotNull InstallmentOverviewQuery query)Exports an installments overview search results to fileFileInfoexportOverview(@NotNull ExportFormatVO format, @NotNull TransactionOverviewQuery query)Exports a transaction overview search results to fileFileInfoexportTransaction(@NotNull ExportFormatVO format, @NotNull TransactionVO transaction)Exports the details of a given transaction to fileFileInfoexportTransactions(@NotNull ExportFormatVO format, @NotNull TransactionQuery query)Exports a transactions search results to fileTransactionDatagetData(@NotNull TransactionVO vo)Returns data for a transactionInstallmentOverviewSearchDatagetInstallmentsOverviewSearchData()Returns data for searching installments overviewInstallmentSearchDatagetInstallmentsSearchData(InternalAccountOwner owner)Returns data for searching installments from an account owner perspectivePage<MaturityTableItemData>getMaturityTable(@NotNull MaturityTableQuery query)returns the maturity table which the user can view in case of paying with a zero d-rate of an earlier account state, when MaturityPolicy.HISTORY is valid.TransactionOverviewSearchDatagetOverviewSearchData(boolean pendingMyAuthorization)Returns data used to search for transaction overviewPerformPaymentDatagetPaymentData(InternalAccountOwner from, InternalAccountOwner to, TransferTypeVO transferType)Returns data used to prepare a payment matching the given from / to account owners.PerformPaymentToOwnerDatagetPaymentToOwnerData(InternalAccountOwner from, InternalAccountOwner to, TransferTypeVO transferType)Returns simplified data used to prepare a payment matching the given argumentsPerformPaymentTypeDatagetPaymentTypeData(InternalAccountOwner from, InternalAccountOwner to, TransferTypeVO transferType)Returns the data related to a payment type for a paymentReceivePaymentDatagetReceivePaymentData()Returns data used to receive a paymentReceivePaymentFromUserDatagetReceivePaymentFromUserData(UserLocatorVO locator, TransferTypeVO transferType)Returns data used to receive a payment from a specific user.PerformPaymentTypeDatagetReceivePaymentTypeData(UserLocatorVO locator, TransferTypeVO transferType)Returns the data related to a payment type for receiving a payment from a specific user and payment typeTransactionSearchDatagetSearchData(InternalAccountOwner owner)Returns data used to search for transactions for the given ownerTransactionVOload(@NotNull Long id)Loads a transaction details by id, returning a proper detailed implementation (for example,PaymentVOorScheduledPaymentVO).TransactionVOloadByTransactionNumber(@NotNull String transactionNumber)Returns a transfer by transaction number, or throwsEntityNotFoundExceptionif not foundTransferVOprocessInstallment(InstallmentActionDTO action)Settles an installment.voidremoveDeviceConfirmationForReceive(String deviceConfirmationId, @NotNull PerformInternalTransactionDTO parameters)Removes a confirmation for the payer.voidrequestNewOTPForReceive(@NotNull PerformInternalTransactionDTO parameters, @NotNull SendMedium medium)Generates a new OTP (removing any previous password, if any) and sends it to the payer by the specified medium using the confirmation password type for theBuiltInChannel.POSchannel for the specified payer.
It has the same security controls as forPaymentService.receive(PerformPaymentDTO), that is the logged user must be allowed to receive payments from the specified payer.Page<TransactionResultVO>search(@NotNull TransactionQuery query)Searches for transactions from the point-of-view of a given account owner, according to the given queryPage<InstallmentResultVO>searchInstallments(@NotNull InstallmentQuery query)Searches for installments from an account owner perspective, according to the given queryPage<InstallmentResultVO>searchInstallmentsOverview(@NotNull InstallmentOverviewQuery query)Searches for installments overview, according to the given queryPage<TransactionResultVO>searchOverview(@NotNull TransactionOverviewQuery query)Searches for transactions, according to the given queryvoidsettleInstallment(InstallmentActionDTO action)Settles an installment.DeviceConfirmationVOviewDeviceConfirmationForReceive(String deviceConfirmationId, @NotNull PerformInternalTransactionDTO dto)Loads the details of a confirmation belonging to the payment payer.
-
-
-
Field Detail
-
MAX_TRANSACTION_AMOUNT_INTEGERS
static final int MAX_TRANSACTION_AMOUNT_INTEGERS
The power of 10 for .- See Also:
- Constant Field Values
-
MAX_TRANSACTION_AMOUNT_EXCLUSIVE
static final BigDecimal MAX_TRANSACTION_AMOUNT_EXCLUSIVE
The maximum amount of a transaction, exclusive. The actual max amount is less than this value, with the decimal digits defined by the currency.
-
-
Method Detail
-
createDeviceConfirmationForReceive
DeviceConfirmationVO createDeviceConfirmationForReceive(@NotNull @NotNull PerformInternalTransactionDTO parameters) throws FrameworkException
Creates a new pending for approval device confirmation for the payer. It has the same security controls as forPaymentService.receive(PerformPaymentDTO), that is the logged user must be allowed to receive payments from the specified payer.- Throws:
FrameworkException
-
deviceConfirmationBarcodeForReceive
SerializableInputStream deviceConfirmationBarcodeForReceive(InternalAccountOwner payer, DeviceConfirmationBarcodeParams params) throws FrameworkException
Generates a two-dimensional barcode (QR code), only if the confirmation was not already approved nor rejected for the given payer. The logged use must be allowed to locate for receive the payer.- Throws:
FrameworkException
-
exportInstallments
FileInfo exportInstallments(@NotNull @NotNull ExportFormatVO format, @NotNull @NotNull InstallmentQuery query)
Exports a installments search results to file
-
exportInstallmentsOverview
FileInfo exportInstallmentsOverview(@NotNull @NotNull ExportFormatVO format, @NotNull @NotNull InstallmentOverviewQuery query)
Exports an installments overview search results to file
-
exportOverview
FileInfo exportOverview(@NotNull @NotNull ExportFormatVO format, @NotNull @NotNull TransactionOverviewQuery query)
Exports a transaction overview search results to file
-
exportTransaction
FileInfo exportTransaction(@NotNull @NotNull ExportFormatVO format, @NotNull @NotNull TransactionVO transaction) throws FrameworkException
Exports the details of a given transaction to file- Throws:
FrameworkException
-
exportTransactions
FileInfo exportTransactions(@NotNull @NotNull ExportFormatVO format, @NotNull @NotNull TransactionQuery query)
Exports a transactions search results to file
-
getData
TransactionData getData(@NotNull @NotNull TransactionVO vo) throws FrameworkException
Returns data for a transaction- Throws:
FrameworkException
-
getInstallmentsOverviewSearchData
InstallmentOverviewSearchData getInstallmentsOverviewSearchData() throws FrameworkException
Returns data for searching installments overview- Throws:
FrameworkException
-
getInstallmentsSearchData
InstallmentSearchData getInstallmentsSearchData(InternalAccountOwner owner) throws FrameworkException
Returns data for searching installments from an account owner perspective- Throws:
FrameworkException
-
getMaturityTable
Page<MaturityTableItemData> getMaturityTable(@NotNull @NotNull MaturityTableQuery query) throws FrameworkException
returns the maturity table which the user can view in case of paying with a zero d-rate of an earlier account state, when MaturityPolicy.HISTORY is valid.- Throws:
FrameworkException
-
getOverviewSearchData
TransactionOverviewSearchData getOverviewSearchData(boolean pendingMyAuthorization) throws FrameworkException
Returns data used to search for transaction overview- Throws:
FrameworkException
-
getPaymentData
PerformPaymentData getPaymentData(InternalAccountOwner from, InternalAccountOwner to, TransferTypeVO transferType) throws FrameworkException
Returns data used to prepare a payment matching the given from / to account owners. The given payment type is optional. If not passed in, will return detailed data for the first available payment type. If passed in, will return detailed data for that payment type, and must be valid.- Throws:
FrameworkException
-
getPaymentToOwnerData
PerformPaymentToOwnerData getPaymentToOwnerData(InternalAccountOwner from, InternalAccountOwner to, TransferTypeVO transferType) throws FrameworkException
Returns simplified data used to prepare a payment matching the given arguments- Throws:
FrameworkException
-
getPaymentTypeData
PerformPaymentTypeData getPaymentTypeData(InternalAccountOwner from, InternalAccountOwner to, TransferTypeVO transferType) throws FrameworkException
Returns the data related to a payment type for a payment- Throws:
FrameworkException
-
getReceivePaymentData
ReceivePaymentData getReceivePaymentData() throws FrameworkException
Returns data used to receive a payment- Throws:
FrameworkException
-
getReceivePaymentFromUserData
ReceivePaymentFromUserData getReceivePaymentFromUserData(UserLocatorVO locator, TransferTypeVO transferType) throws FrameworkException, PosPayerException
Returns data used to receive a payment from a specific user. The given payment type is optional. If not passed in, will return detailed data for the first available payment type. If passed in, will return detailed data for that payment type, and must be valid.- Throws:
PosPayerNotInChannelException- When the chosen user doesn't have the POS channel enabled (either by preference or permission)FrameworkExceptionPosPayerException
-
getReceivePaymentTypeData
PerformPaymentTypeData getReceivePaymentTypeData(UserLocatorVO locator, TransferTypeVO transferType) throws FrameworkException, PosPayerException
Returns the data related to a payment type for receiving a payment from a specific user and payment type- Throws:
PosPayerNotInChannelException- When the chosen user doesn't have the POS channel enabled (either by preference or permission)FrameworkExceptionPosPayerException
-
getSearchData
TransactionSearchData getSearchData(InternalAccountOwner owner) throws FrameworkException
Returns data used to search for transactions for the given owner- Throws:
FrameworkException
-
load
TransactionVO load(@NotNull @NotNull Long id) throws FrameworkException
Loads a transaction details by id, returning a proper detailed implementation (for example,PaymentVOorScheduledPaymentVO).- Throws:
FrameworkException
-
loadByTransactionNumber
TransactionVO loadByTransactionNumber(@NotNull @NotNull String transactionNumber) throws FrameworkException
Returns a transfer by transaction number, or throwsEntityNotFoundExceptionif not found- Throws:
FrameworkException
-
processInstallment
TransferVO processInstallment(InstallmentActionDTO action) throws FrameworkException
Settles an installment. Currently only scheduled payment installments can be settled.- Throws:
FrameworkException
-
removeDeviceConfirmationForReceive
void removeDeviceConfirmationForReceive(String deviceConfirmationId, @NotNull @NotNull PerformInternalTransactionDTO parameters) throws FrameworkException
Removes a confirmation for the payer. It has the same security controls as forPaymentService.receive(PerformPaymentDTO), that is the logged user must be allowed to receive payments from the specified payer.- Throws:
FrameworkException
-
requestNewOTPForReceive
void requestNewOTPForReceive(@NotNull @NotNull PerformInternalTransactionDTO parameters, @NotNull @NotNull SendMedium medium) throws FrameworkException, SmsSendingExceptionGenerates a new OTP (removing any previous password, if any) and sends it to the payer by the specified medium using the confirmation password type for theBuiltInChannel.POSchannel for the specified payer.
It has the same security controls as forPaymentService.receive(PerformPaymentDTO), that is the logged user must be allowed to receive payments from the specified payer.- Parameters:
parameters- the payment to be received.medium- the medium used to send the OTP.- Throws:
SmsSendingException- only if medium isSendMedium.SMSand the OTP could not be sent to any enabled for sms phone.FrameworkException
-
search
Page<TransactionResultVO> search(@NotNull @NotNull TransactionQuery query) throws FrameworkException
Searches for transactions from the point-of-view of a given account owner, according to the given query- Throws:
FrameworkException
-
searchInstallments
Page<InstallmentResultVO> searchInstallments(@NotNull @NotNull InstallmentQuery query) throws FrameworkException
Searches for installments from an account owner perspective, according to the given query- Throws:
FrameworkException
-
searchInstallmentsOverview
Page<InstallmentResultVO> searchInstallmentsOverview(@NotNull @NotNull InstallmentOverviewQuery query) throws FrameworkException
Searches for installments overview, according to the given query- Throws:
FrameworkException
-
searchOverview
Page<TransactionResultVO> searchOverview(@NotNull @NotNull TransactionOverviewQuery query) throws FrameworkException
Searches for transactions, according to the given query- Throws:
FrameworkException
-
settleInstallment
void settleInstallment(InstallmentActionDTO action) throws FrameworkException
Settles an installment. Currently only scheduled payment installments can be settled.- Throws:
FrameworkException
-
viewDeviceConfirmationForReceive
DeviceConfirmationVO viewDeviceConfirmationForReceive(String deviceConfirmationId, @NotNull @NotNull PerformInternalTransactionDTO dto) throws FrameworkException
Loads the details of a confirmation belonging to the payment payer. It has the same security controls as forPaymentService.receive(PerformPaymentDTO), that is the logged user must be allowed to receive payments from the specified payer.- Throws:
FrameworkException
-
-