public interface AccountServiceLocal extends AccountService
AccountService| Modifier and Type | Method and Description |
|---|---|
boolean |
canDispose(java.util.Collection<UserAccount> accounts)
checks if the accounts can be disposed safely.
|
void |
checkActive(Account account)
Checks that the given account is active, throwing an
IllegalActionException in case it is an inactive user account, or the owner is
inactive |
void |
checkActive(AccountOwner owner)
Checks that the given account owner is active, throwing an
IllegalActionException in case it is a removed or pending user |
ClosedAccountBalance |
closeBalance(Account account)
Closes the balance for the given account
|
void |
createMissingOrActivateAccount(UserAccountType accountType,
ProductOwner owner,
java.math.BigDecimal creditLimit,
java.math.BigDecimal upperCreditLimit)
Creates the account for the given account type if it still doesn't exists for the given ProductOwner, or activates it.
|
SystemAccount |
createSystemAccount(SystemAccountType type)
Creates a new system account
|
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(DirectTransaction transaction)
Dereserves the amount for the transaction which was previously awaiting authorization
|
void |
disposeAccounts(User user,
java.util.Collection<UserAccount> lostAccounts)
Disposes the accounts for the user.
|
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(AccountOwner accountOwner,
java.util.Date date,
java.util.Date receivedSince,
boolean includeRates)
Similar to
list(AccountOwner), but returns each account with the account status, at the given time point. |
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(AccountOwner 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
|
org.cyclos.impl.utils.validation.Validator |
getCanDisposeValidator()
gets a Validator for checking if an account can be disposed.
|
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.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
|
boolean |
hasTransfers(java.util.Set<UserAccountType> userAccounts,
java.util.Set<Group> groups)
Returns true if there is at least one transfer performed from or to a user of any of the specified groups, to or from any of the given
accounts.
|
void |
incrementBalanceCounter(Account account)
Increments the counter for closing the given account's balance
|
<A extends Account> |
list(AccountOwner 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(AccountOwner owner,
AccountType type)
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
|
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(DirectTransaction transaction)
Reserves the amount for a given payment pending authorization
|
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. |
getAccountBalanceLimitsOverviewData, getAccountHistoriesOverviewData, getAccountHistoryData, getAccountHistoryStatus, getAccountsSummary, getAccountStatus, getUserAccountLimitData, getUserAccountsLimits, getUserWithBalanceSearchData, hasAccessibleAccounts, listTransferFiltersForAccountHistoriesOverview, load, printAccountHistory, searchAccountBalanceLimitsOverview, searchAccountHistoriesOverview, searchAccountHistory, searchUsersWithBalances, setBalanceLimitboolean canDispose(java.util.Collection<UserAccount> accounts) throws FrameworkException
FrameworkExceptionvoid checkActive(Account account) throws IllegalActionException
IllegalActionException in case it is an inactive user account, or the owner is
inactiveIllegalActionExceptioncheckActive(AccountOwner)void checkActive(AccountOwner owner) throws IllegalActionException
IllegalActionException in case it is a removed or pending userIllegalActionExceptionClosedAccountBalance closeBalance(Account account) throws FrameworkException
FrameworkExceptionvoid createMissingOrActivateAccount(UserAccountType accountType, ProductOwner owner, java.math.BigDecimal creditLimit, java.math.BigDecimal upperCreditLimit) throws FrameworkException
upperCreditLimit - creditLimit - FrameworkExceptionSystemAccount createSystemAccount(SystemAccountType type) throws FrameworkException
FrameworkExceptionOrderAmountReservation dereserveAmount(Order order) throws FrameworkException
FrameworkExceptionScheduledPaymentInstallmentAmountReservation dereserveAmount(ScheduledPaymentInstallment installment) throws FrameworkException
IllegalActionException - When the given installment is not in a state which allows dereserving amountFrameworkExceptionPendingAuthorizationAmountReservation dereserveAmountForAuthorization(DirectTransaction transaction) throws FrameworkException
IllegalActionException - When the given transfer is not in a state which allows returning the reserved amountFrameworkExceptionvoid disposeAccounts(User user, java.util.Collection<UserAccount> lostAccounts) throws IllegalActionException
user - lostAccounts - the accounts to be disposed ofIllegalActionException - if any of the accounts cannot be disposed of because of existing dependencies (scheduled payments, amount
reservations, balances).java.util.List<Account> getAccountsByCurrency(Currency currency)
AccountStatusVO getAccountStatus(Account account, java.util.Date date, RateVisibility rateVisibility) throws FrameworkException
rateVisibility - if null RateVisibility.NOT is usedFrameworkExceptionjava.util.List<AccountWithStatusVO> getAccountsWithStatus(AccountOwner accountOwner, java.util.Date date, java.util.Date receivedSince, boolean includeRates) throws FrameworkException
list(AccountOwner), but returns each account with the account status, at the given time point.FrameworkExceptionjava.math.BigDecimal getAvailableBalance(Account account, java.util.Date date) throws FrameworkException
FrameworkExceptionjava.math.BigDecimal getAvailableBalanceByAccountType(AccountOwner accountOwner, AccountType accountType)
java.math.BigDecimal getAverageBalance(Account account, java.math.BigDecimal balanceDiff, DatePeriod period, boolean positive, java.math.BigDecimal freebase) throws FrameworkException
FrameworkExceptionjava.math.BigDecimal getBalance(Account account, java.util.Date date) throws FrameworkException
FrameworkExceptionorg.cyclos.impl.utils.validation.Validator getCanDisposeValidator()
throws FrameworkException
FrameworkExceptioncanDispose(Collection)java.math.BigDecimal getCreditLimit(Account account, java.util.Date date) throws FrameworkException
FrameworkExceptionAccountLimitLog getLimitLog(Account account, java.util.Date date) throws FrameworkException
FrameworkExceptionjava.util.List<TransferStatusFlow> getManagedFlows(Account account) throws FrameworkException
FrameworkExceptionjava.lang.String getOwnerName(Account account) throws FrameworkException
FrameworkExceptionjava.math.BigDecimal getUpperCreditLimit(Account account, java.util.Date date) throws FrameworkException
FrameworkExceptionjava.util.List<UserAccountData> getUserAccountsData(User user) throws FrameworkException
FrameworkExceptionjava.util.List<TransferStatusFlow> getVisibleFlows(Account account) throws FrameworkException
FrameworkExceptionboolean hasAccess(Account account) throws FrameworkException
FrameworkExceptionboolean hasTransfers(java.util.Set<UserAccountType> userAccounts, java.util.Set<Group> groups)
void incrementBalanceCounter(Account account) throws FrameworkException
FrameworkException<A extends Account> java.util.List<A> list(AccountOwner owner) throws FrameworkException
FrameworkException<A extends Account> A load(AccountLocator locator) throws FrameworkException
FrameworkException<A extends Account> A load(AccountOwner owner, AccountType type) throws FrameworkException
FrameworkExceptionvoid removeLastClosedAccountBalances(Transfer transfer)
OrderAmountReservation reserveAmount(Order order) throws FrameworkException, InsufficientBalanceException, IllegalActionException
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 amountFrameworkExceptionScheduledPaymentAmountReservation reserveAmount(ScheduledPayment scheduledPayment) throws FrameworkException, InsufficientBalanceException, IllegalActionException
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 amountFrameworkExceptionPendingAuthorizationAmountReservation reserveAmountForAuthorization(DirectTransaction transaction) throws FrameworkException, InsufficientBalanceException, IllegalActionException
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 amountFrameworkExceptionAccountWithStatusVO toAccountWithStatus(Account account, java.util.Date date, java.util.Date paymentsSince, boolean includeRates) throws FrameworkException
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 dateFrameworkException