public interface AccountHandler
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getAccountNumber(Account account)
Returns the masked account number for the given account, if applicable.
|
InternalAccountOwner |
getAccountOwner()
Returns the account owner of the logged user.
If there is a logged admin, returns SystemAccountOwner. |
boolean |
isSystemAccountOwner(AccountOwner owner) |
org.cyclos.impl.banking.LocateAccountOwnerResult |
locate(AccountOwner accountOwner)
Locates an account owner, using no specific principal types - the same ones used to locate users will be
attempted
|
org.cyclos.impl.banking.LocateAccountOwnerResult |
locate(AccountOwner accountOwner,
boolean allowById,
boolean allowContact,
java.util.Collection<PrincipalType> principalTypes,
PrincipalType defaultPrincipalType,
boolean forReceive)
Locate and normalize the specified account owner using the specified principal types (if null then try with all
allowed principal types).
This method MUST be invoked before work with any instances of AccountOwner. If the account owner parameter represents a user it will be located. |
org.cyclos.impl.banking.LocateAccountOwnerResult |
locateOrCurrent(AccountOwner accountOwner)
Like
locate(AccountOwner), except that if the given owner is null, returns the owner of the logged user. |
AccountOwner |
toAccountOwnerVO(AccountOwner accountOwner)
Like
toAccountOwnerVO(InternalAccountOwner) but supporting ExternalAccountOwner |
InternalAccountOwner |
toAccountOwnerVO(InternalAccountOwner accountOwner)
Return
SystemAccountOwner or UserDetailedVO. |
AccountOwner |
toAccountOwnerVO(org.cyclos.impl.banking.LocateAccountOwnerResult result)
If the result represents a user there are two options:
If the user was located then returns a LocatedUserVO
If the user was not located then returns a UserDetailedVOOtherwise returns a SystemAccountOwner |
java.lang.String getAccountNumber(Account account)
InternalAccountOwner getAccountOwner()
SystemAccountOwner. If any other user, returns it.
Otherwise, returns null.boolean isSystemAccountOwner(AccountOwner owner)
org.cyclos.impl.banking.LocateAccountOwnerResult locate(AccountOwner accountOwner)
org.cyclos.impl.banking.LocateAccountOwnerResult locate(AccountOwner accountOwner, boolean allowById, boolean allowContact, java.util.Collection<PrincipalType> principalTypes, PrincipalType defaultPrincipalType, boolean forReceive)
SystemAccountOwner will be
created.SystemAccountOwner, ExternalAccountOwner or the user representing the
specified owner.org.cyclos.impl.banking.LocateAccountOwnerResult locateOrCurrent(AccountOwner accountOwner)
locate(AccountOwner), except that if the given owner is null, returns the owner of the logged user.AccountOwner toAccountOwnerVO(AccountOwner accountOwner)
toAccountOwnerVO(InternalAccountOwner) but supporting ExternalAccountOwnerInternalAccountOwner toAccountOwnerVO(InternalAccountOwner accountOwner)
AccountOwner toAccountOwnerVO(org.cyclos.impl.banking.LocateAccountOwnerResult result)
LocatedUserVOUserDetailedVOSystemAccountOwner