public abstract class AuthMenuLogic extends Object implements IMenuStateLogic, IMenuAuthLogic
Menu
by looking at the root MenuItem
, the current
focussed MenuItem
and the User
. The user aspect determines what part of the Menu
the user is authorized to see/use.IMenuStateLogic}
,
IMenuAuthLogic}
,
AuthState}
Constructor and Description |
---|
AuthMenuLogic() |
Modifier and Type | Method and Description |
---|---|
MenuItemState |
getCurrentState(MenuItem rootItem,
MenuItem focussedItem)
Overrides
IMenuStateLogic method to supply null to the method that takes the User param. |
abstract MenuItemState |
getCurrentState(MenuItem rootItem,
MenuItem focussedItem,
User user)
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getItemAuthState
public MenuItemState getCurrentState(MenuItem rootItem, MenuItem focussedItem)
IMenuStateLogic
method to supply null to the method that takes the User
param.
This is done so that all Auth implementations focus on one method and cater to User
being null
to handle all scenarios.getCurrentState
in interface IMenuStateLogic
rootItem
- as MenuItem
as the Menu (navigation tree)focussedItem
- as MenuItem
; the item that is in Focususer
- as @nullable trueMenuItemState
of the Entire menu to be shownpublic abstract MenuItemState getCurrentState(MenuItem rootItem, MenuItem focussedItem, User user)
User
is auth to see/use a MenuItem
,
the rest is same as super#getCurrentState(MenuItem, MenuItem)
. If User
is null
then it is upto the implementation on how it impace the resultant state.rootItem
- as MenuItem
as the Menu (navigation tree)focussedItem
- as MenuItem
; the item that is in Focususer
- as @nullable trueMenuItemState
Copyright © 2018. All rights reserved.