public interface AccountHandler
| Modifier and Type | Method and Description |
|---|---|
AccountOwner |
getAccountOwner()
Returns the account owner of the logged user.
If there is a logged admin, returns SystemAccountOwner. |
boolean |
isSystemAccountOwner(AccountOwner owner) |
AccountOwner |
normalize(AccountOwner owner)
This method must be invoked before work with any instances of AccountOwner.
If owner is a user containing the role ADMIN then it returns a SystemAccountOwner. |
AccountOwner |
normalizeOrCurrent(AccountOwner owner)
Same as
normalize(AccountOwner), except that if the given owner is null, returns the owner of the logged user. |
AccountOwner getAccountOwner()
SystemAccountOwner. If any other user, returns it.
Otherwise, returns null.boolean isSystemAccountOwner(AccountOwner owner)
AccountOwner normalize(AccountOwner owner)
SystemAccountOwner. Otherwise it returns the same owner instance
(including null).owner - SystemAccountOwner or the owner itself.AccountOwner normalizeOrCurrent(AccountOwner owner)
normalize(AccountOwner), except that if the given owner is null, returns the owner of the logged user.normalize(AccountOwner),
getAccountOwner()