Package org.cyclos.impl.banking
Interface AccountHandler
-
public interface AccountHandlerHandler for accounts
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetAccountNumber(IAccount account)Returns the masked account number for the given account, if applicable.InternalAccountOwnergetAccountOwner()Returns the account owner of the logged user.
If there is a logged admin, returnsSystemAccountOwner.booleanisSystemAccountOwner(AccountOwner owner)LocateAccountOwnerResultlocate(AccountOwner accountOwner)Locates a non-removed account ownerLocateAccountOwnerResultlocate(AccountOwner accountOwner, boolean allowRemoved)Locates an account owner, using no specific principal types - the same ones used to locate users will be attemptedLocateAccountOwnerResultlocate(AccountOwner accountOwner, boolean allowById, boolean allowContact, boolean allowOperators, boolean allowRemoved, 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.LocateAccountOwnerResultlocateOrCurrent(AccountOwner accountOwner)Locates a non-removed account ownerLocateAccountOwnerResultlocateOrCurrent(AccountOwner accountOwner, boolean allowRemoved)Likelocate(AccountOwner), except that if the given owner is null, returns the owner of the logged user.AccountOwnertoAccountOwnerVO(LocateAccountOwnerResult result)Same astoAccountOwnerVO(LocateAccountOwnerResult, boolean), but never allowing operators.AccountOwnertoAccountOwnerVO(LocateAccountOwnerResult result, boolean allowOperator)Returns either aBasicUserVOor aSystemAccountOwner.AccountOwnertoAccountOwnerVO(AccountOwner accountOwner)Same astoAccountOwnerVO(AccountOwner, boolean), but never allowing operators.AccountOwnertoAccountOwnerVO(AccountOwner accountOwner, boolean allowOperator)LiketoAccountOwnerVO(InternalAccountOwner, boolean)but supportingExternalAccountOwnerInternalAccountOwnertoAccountOwnerVO(InternalAccountOwner accountOwner)Same astoAccountOwnerVO(InternalAccountOwner, boolean), but never allowing operators.InternalAccountOwnertoAccountOwnerVO(InternalAccountOwner accountOwner, boolean allowOperator)ReturnSystemAccountOwnerorBasicUserVO.
-
-
-
Method Detail
-
getAccountNumber
String getAccountNumber(IAccount account)
Returns the masked account number for the given account, if applicable. Otherwise, null.
-
getAccountOwner
InternalAccountOwner getAccountOwner()
Returns the account owner of the logged user.
If there is a logged admin, returnsSystemAccountOwner. If any other user, returns it. Otherwise, returns null.
-
isSystemAccountOwner
boolean isSystemAccountOwner(AccountOwner owner)
- Returns:
- true if the owner parameter is the SystemAccountOwner
-
locate
LocateAccountOwnerResult locate(AccountOwner accountOwner)
Locates a non-removed account owner- See Also:
locate(AccountOwner, boolean)
-
locate
LocateAccountOwnerResult locate(AccountOwner accountOwner, boolean allowRemoved)
Locates an account owner, using no specific principal types - the same ones used to locate users will be attempted- Parameters:
allowRemoved- whether to allow removed users or not
-
locate
LocateAccountOwnerResult locate(AccountOwner accountOwner, boolean allowById, boolean allowContact, boolean allowOperators, boolean allowRemoved, 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. In case of an admin a result with theSystemAccountOwnerwill be created.- Returns:
- a result with a
SystemAccountOwner,ExternalAccountOwneror the user representing the specified owner.
-
locateOrCurrent
LocateAccountOwnerResult locateOrCurrent(AccountOwner accountOwner)
Locates a non-removed account owner- See Also:
locateOrCurrent(AccountOwner, boolean)
-
locateOrCurrent
LocateAccountOwnerResult locateOrCurrent(AccountOwner accountOwner, boolean allowRemoved)
Likelocate(AccountOwner), except that if the given owner is null, returns the owner of the logged user.- Parameters:
allowRemoved- whether removed users are allowed or not
-
toAccountOwnerVO
AccountOwner toAccountOwnerVO(AccountOwner accountOwner)
Same astoAccountOwnerVO(AccountOwner, boolean), but never allowing operators.
-
toAccountOwnerVO
AccountOwner toAccountOwnerVO(AccountOwner accountOwner, boolean allowOperator)
LiketoAccountOwnerVO(InternalAccountOwner, boolean)but supportingExternalAccountOwner
-
toAccountOwnerVO
InternalAccountOwner toAccountOwnerVO(InternalAccountOwner accountOwner)
Same astoAccountOwnerVO(InternalAccountOwner, boolean), but never allowing operators.
-
toAccountOwnerVO
InternalAccountOwner toAccountOwnerVO(InternalAccountOwner accountOwner, boolean allowOperator)
-
toAccountOwnerVO
AccountOwner toAccountOwnerVO(LocateAccountOwnerResult result)
Same astoAccountOwnerVO(LocateAccountOwnerResult, boolean), but never allowing operators.
-
toAccountOwnerVO
AccountOwner toAccountOwnerVO(LocateAccountOwnerResult result, boolean allowOperator)
Returns either aBasicUserVOor aSystemAccountOwner.
-
-