public interface AccountServiceLocal extends AccountService
AccountService| Modifier and Type | Interface and Description |
|---|---|
static class |
AccountServiceLocal.AdjustAccountsResult |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ATTR_ACCOUNT_TYPE
Script bind variable: the account type
|
static java.lang.String |
ATTR_OWNER
Script bind variable: the account owner (either an
User or SystemAccountOwner) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accountNumberExistsOrIsReserved(AccountNumberConfiguration accountNumberConfiguration,
java.lang.String accountNumber)
Returns true if the given account number is used in an existing account
or is reserved to be used for a pending user
|
AccountServiceLocal.AdjustAccountsResult |
adjustAccounts(User user)
Creates / disposes accounts for the given user
|
void |
checkActive(Account account)
If the given account is not active, throws an
IllegalActionException |
void |
checkActive(AccountOwner owner)
If the given owner is a user which is either pending or removed, throes an
IllegalActionException |
ClosedAccountBalance |
closeBalance(Account account)
Closes the balance for the given account
|
SystemAccount |
createSystemAccount(SystemAccountType type)
Creates a new system account
|
ExternalPaymentNegativeAmountReservation |
dereserveAmount(ExternalPayment externalPayment)
Cancels the amount reservation related to the given external payment
|
OrderAmountReservation |
dereserveAmount(Order order)
Cancels the amount reservation related to the given order
|
ScheduledPaymentInstallmentAmountReservation |
dereserveAmount(ScheduledPaymentInstallment installment)
Dereserves the amount for the given installment
|
PendingAuthorizationAmountReservation |
dereserveAmountForAuthorization(BasePayment transaction)
Dereserves the amount for the transaction which was previously awaiting authorization
|
VoucherAmountReservation |
dereserveAmountIfNeeded(Voucher voucher)
If the voucher pack had an amount reservation, dereserve the amount for the given voucher
|
void |
fillTransSearchData(ITransSearchData data,
Account account,
InternalAccountOwner accountOwner)
Fills the given data with data common to transfer and transaction search.
|
Account |
findByNumber(java.lang.String number)
Returns the account with the given number
|
java.lang.String |
generateNumber(AccountType type,
InternalAccountOwner owner)
Generates an unique account number for the given type and owner.
|
java.util.List<Account> |
getAccountsByCurrency(Currency currency)
Returns all the logged user accounts for the given currency
|
AccountStatusVO |
getAccountStatus(Account account,
java.util.Date date,
RateVisibility rateVisibility)
Returns the account status for the given account at the given time
|
java.util.List<AccountWithStatusVO> |
getAccountsWithStatus(InternalAccountOwner accountOwner,
java.util.Date date,
java.util.Date receivedSince,
boolean includeRates)
Similar to
list(InternalAccountOwner), but returns each account with the account status, at the given
time point. |
OrderAmountReservation |
getAmountDereservation(Order order)
Returns the
OrderAmountReservation that canceled the order reserved amount, or null if none |
PendingAuthorizationAmountReservation |
getAmountDereservationForAuthorization(BasePayment transaction)
Returns the
PendingAuthorizationAmountReservation created when a payment was no longer pending
authorization, or null if none |
OrderAmountReservation |
getAmountReservation(Order order)
Returns the
OrderAmountReservation that reserved amount when the order was submitted, or null if none |
PendingAuthorizationAmountReservation |
getAmountReservationForAuthorization(BasePayment transaction)
Returns the
PendingAuthorizationAmountReservation created when a payment was submitted for authorization,
or null if none |
java.math.BigDecimal |
getAvailableBalance(Account account,
java.util.Date date)
Returns the available balance for the given account at the given date
|
java.math.BigDecimal |
getAvailableBalanceByAccountType(InternalAccountOwner accountOwner,
AccountType accountType)
Returns the available balance for the account that has the given account owner and type
|
java.math.BigDecimal |
getAverageBalance(Account account,
java.math.BigDecimal balanceDiff,
DatePeriod period,
boolean positive,
java.math.BigDecimal freebase)
Returns the balance average for the given account over the given period.
|
java.math.BigDecimal |
getBalance(Account account,
java.util.Date date)
Returns the raw balance for the given account at the given time
|
java.math.BigDecimal |
getCreditLimit(Account account,
java.util.Date date)
Returns the credit limit of the given account at the given date
|
AccountLimitLog |
getLimitLog(Account account,
java.util.Date date)
Returns the limit log which is valid on the given time.
|
java.util.List<TransferStatusFlow> |
getManagedFlows(Account account)
Returns the managed transfer status flows for the logged user over the given account
|
java.lang.String |
getOwnerName(Account account)
Returns the owner name: if is a system account, get the system account type.
|
java.util.Set<UserStatus> |
getPossibleStatusesToOwnAccounts()
Returns possible statuses the user can have in order to have active accounts
|
java.math.BigDecimal |
getUpperCreditLimit(Account account,
java.util.Date date)
Returns the upper credit limit of the given account at the given date
|
java.util.List<UserAccountData> |
getUserAccountsData(User user)
Returns the user's accounts data visible in profile
|
java.util.List<TransferStatusFlow> |
getVisibleFlows(Account account)
Returns the visible transfer status flows for the logged user over the given account
|
boolean |
hasAccess(Account account)
Returns whether the given account is accessible by the logged user
|
void |
incrementBalanceCounter(Account account)
Increments the counter for closing the given account's balance
|
boolean |
isActive(Account account)
Returns whether the given account is active.
|
<A extends Account> |
list(InternalAccountOwner owner)
Returns the available accounts for the given owner
|
<A extends Account> |
load(AccountLocator locator)
Loads an account for the given locator, without checking permissions for the logged user
|
<A extends Account> |
load(InternalAccountOwner owner,
AccountType type)
Loads an account for the given owner / type, without checking permissions for the logged user
|
<A extends Account> |
load(InternalAccountOwner owner,
AccountType type,
boolean allowDisposed)
Loads an account for the given owner / type, without checking permissions for the logged user.
|
void |
removeLastClosedAccountBalances(Transfer transfer)
Removes all the closes from the initial date to now of the from and to account of the transfer
|
ExternalPaymentAmountReservation |
reserveAmount(ExternalPayment externalPayment)
Reserves the amount for the given external payment
|
OrderAmountReservation |
reserveAmount(Order order)
Reserves the amount for the given webshop order
|
ScheduledPaymentAmountReservation |
reserveAmount(ScheduledPayment scheduledPayment)
Reserves the total amount for the given scheduled payment
|
PendingAuthorizationAmountReservation |
reserveAmountForAuthorization(BasePayment transaction)
Reserves the amount for a given payment pending authorization
|
VoucherPackAmountReservation |
reserveAmountIfNeeded(VoucherPack voucherPack)
Reserves the total amount for the given voucher pack (count * amount) on the source account of the redeem type,
if that account is limited.
|
AccountWithStatusVO |
toAccountWithStatus(Account account,
java.util.Date date,
java.util.Date paymentsSince,
boolean includeRates)
Converts the given account with
AccountWithStatusVO, getting the status at the given time point. |
exportAccountHistoryToCSV, exportAccountLimitsToCSV, exportHistoriesOverviewToCSV, exportUserBalanceToCSV, getAccountBalanceLimitsOverviewData, getAccountHistoriesOverviewData, getAccountHistoriesOverviewStatus, getAccountHistoryData, getAccountHistoryStatus, getAccountsSummary, getAccountStatus, getAccountWithStatus, getPermissions, getUserAccountLimitData, getUserAccountsLimits, getUsersWithBalancesOverview, getUserWithBalanceSearchData, hasAccessibleAccounts, load, printAccountHistory, searchAccountBalanceLimitsOverview, searchAccountHistoriesOverview, searchAccountHistory, searchUsersWithBalances, setBalanceLimitstatic final java.lang.String ATTR_ACCOUNT_TYPE
static final java.lang.String ATTR_OWNER
User or SystemAccountOwner)boolean accountNumberExistsOrIsReserved(AccountNumberConfiguration accountNumberConfiguration, java.lang.String accountNumber)
AccountServiceLocal.AdjustAccountsResult adjustAccounts(User user)
void checkActive(Account account) throws IllegalActionException
IllegalActionExceptionIllegalActionExceptionisActive(Account)void checkActive(AccountOwner owner) throws IllegalActionException
IllegalActionExceptionIllegalActionExceptionClosedAccountBalance closeBalance(Account account)
SystemAccount createSystemAccount(SystemAccountType type)
ExternalPaymentNegativeAmountReservation dereserveAmount(ExternalPayment externalPayment)
OrderAmountReservation dereserveAmount(Order order)
ScheduledPaymentInstallmentAmountReservation dereserveAmount(ScheduledPaymentInstallment installment)
IllegalActionException - When the given installment is not in a state which allows dereserving amountPendingAuthorizationAmountReservation dereserveAmountForAuthorization(BasePayment transaction)
IllegalActionException - When the given transfer is not in a state which allows returning the reserved
amountVoucherAmountReservation dereserveAmountIfNeeded(Voucher voucher)
void fillTransSearchData(ITransSearchData data, Account account, InternalAccountOwner accountOwner)
Account findByNumber(java.lang.String number)
EntityNotFoundException - If there are is no account with the given numberjava.lang.String generateNumber(AccountType type, InternalAccountOwner owner)
java.util.List<Account> getAccountsByCurrency(Currency currency)
AccountStatusVO getAccountStatus(Account account, java.util.Date date, RateVisibility rateVisibility)
rateVisibility - if null RateVisibility.NOT is usedjava.util.List<AccountWithStatusVO> getAccountsWithStatus(InternalAccountOwner accountOwner, java.util.Date date, java.util.Date receivedSince, boolean includeRates)
list(InternalAccountOwner), but returns each account with the account status, at the given
time point.OrderAmountReservation getAmountDereservation(Order order)
OrderAmountReservation that canceled the order reserved amount, or null if nonePendingAuthorizationAmountReservation getAmountDereservationForAuthorization(BasePayment transaction)
PendingAuthorizationAmountReservation created when a payment was no longer pending
authorization, or null if noneOrderAmountReservation getAmountReservation(Order order)
OrderAmountReservation that reserved amount when the order was submitted, or null if nonePendingAuthorizationAmountReservation getAmountReservationForAuthorization(BasePayment transaction)
PendingAuthorizationAmountReservation created when a payment was submitted for authorization,
or null if nonejava.math.BigDecimal getAvailableBalance(Account account, java.util.Date date)
java.math.BigDecimal getAvailableBalanceByAccountType(InternalAccountOwner accountOwner, AccountType accountType)
java.math.BigDecimal getAverageBalance(Account account, java.math.BigDecimal balanceDiff, DatePeriod period, boolean positive, java.math.BigDecimal freebase)
java.math.BigDecimal getBalance(Account account, java.util.Date date)
java.math.BigDecimal getCreditLimit(Account account, java.util.Date date)
AccountLimitLog getLimitLog(Account account, java.util.Date date)
java.util.List<TransferStatusFlow> getManagedFlows(Account account)
java.lang.String getOwnerName(Account account)
java.util.Set<UserStatus> getPossibleStatusesToOwnAccounts()
java.math.BigDecimal getUpperCreditLimit(Account account, java.util.Date date)
java.util.List<UserAccountData> getUserAccountsData(User user)
java.util.List<TransferStatusFlow> getVisibleFlows(Account account)
boolean hasAccess(Account account)
void incrementBalanceCounter(Account account)
boolean isActive(Account account)
<A extends Account> java.util.List<A> list(InternalAccountOwner owner)
<A extends Account> A load(AccountLocator locator)
<A extends Account> A load(InternalAccountOwner owner, AccountType type)
<A extends Account> A load(InternalAccountOwner owner, AccountType type, boolean allowDisposed)
void removeLastClosedAccountBalances(Transfer transfer)
ExternalPaymentAmountReservation reserveAmount(ExternalPayment externalPayment)
InsufficientBalanceException - When there is not enough funds on the expected account to reserveIllegalActionException - When the given external payment is not in a state which allows reserving amountOrderAmountReservation reserveAmount(Order order)
InsufficientBalanceException - When there is not enough funds on the expected account to reserveIllegalActionException - When the given order is not in a state which allows reserving amountScheduledPaymentAmountReservation reserveAmount(ScheduledPayment scheduledPayment)
InsufficientBalanceException - When there is not enough funds on the expected account to reserveIllegalActionException - When the given scheduled payment is not in a state which allows reserving amountPendingAuthorizationAmountReservation reserveAmountForAuthorization(BasePayment transaction)
InsufficientBalanceException - When there is not enough funds on the expected account to reserveIllegalActionException - When the given transfer is not in a state which allows reserving amountVoucherPackAmountReservation reserveAmountIfNeeded(VoucherPack voucherPack)
InsufficientBalanceException - When there is not enough funds on the expected account to reserveIllegalActionException - When the given voucher pack is not in a state which allows reserving amountAccountWithStatusVO toAccountWithStatus(Account account, java.util.Date date, java.util.Date paymentsSince, boolean includeRates)
AccountWithStatusVO, getting the status at the given time point. If
paymentsSince is not null, will
also
return the sum of incoming payments since the given date