@JsType public class DefaultMenuGroup extends Object implements MenuGroup
Constructor and Description |
---|
DefaultMenuGroup(List<MenuItem> menuItems,
List<ResourceActionRef> resourceActionRefs,
List<String> permissionNames,
String contributionPoint,
String caption,
MenuPosition position,
int order) |
Modifier and Type | Method and Description |
---|---|
void |
accept(MenuVisitor visitor)
Causes the given
MenuVisitor to visit this menu item and its
children. |
void |
addEnabledStateChangeListener(EnabledStateChangeListener listener)
Called when the enabled state of a Widget changes
|
String |
getCaption() |
String |
getContributionPoint() |
List<Resource> |
getDependencies()
A list of dependent resources.
|
String |
getIdentifier()
An identifier that is unique among all the resources of the same type
(see
Resource.getResourceType() ). |
List<MenuItem> |
getItems() |
int |
getOrder() |
List<String> |
getPermissions()
Get the list of permission names this menu item is restricted to.
|
MenuPosition |
getPosition() |
List<ResourceActionRef> |
getResourceActions()
Get the list of
ResourceActionRef actions this menu item is
restricted to. |
boolean |
isEnabled() |
void |
setEnabled(boolean enabled) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getResourceType, isType
@JsIgnore public DefaultMenuGroup(List<MenuItem> menuItems, List<ResourceActionRef> resourceActionRefs, List<String> permissionNames, String contributionPoint, String caption, MenuPosition position, int order)
public String getContributionPoint()
getContributionPoint
in interface MenuItem
public String getCaption()
getCaption
in interface MenuItem
public MenuPosition getPosition()
getPosition
in interface MenuItem
public void setEnabled(boolean enabled)
setEnabled
in interface MenuItem
@JsIgnore public void addEnabledStateChangeListener(EnabledStateChangeListener listener)
HasEnabledStateChangeListeners
addEnabledStateChangeListener
in interface HasEnabledStateChangeListeners
public void accept(MenuVisitor visitor)
MenuItem
MenuVisitor
to visit this menu item and its
children.public String getIdentifier()
Resource
Resource.getResourceType()
).getIdentifier
in interface Resource
@JsIgnore public List<ResourceActionRef> getResourceActions()
MenuItem
ResourceActionRef
actions this menu item is
restricted to.
The menu item will be available provided all the given actions are authorized within the current context.
getResourceActions
in interface MenuItem
@JsIgnore public List<String> getPermissions()
MenuItem
The menu item will be available provided all the given permissions are authorized within the current context.
getPermissions
in interface MenuItem
@JsIgnore public List<Resource> getDependencies()
Resource
The dependency list is used for instance to determine if a user can access a given resource. Should the access to all its dependencies is denied, it is denied for this instance as well.
getDependencies
in interface Resource
Copyright © 2012–2018 JBoss by Red Hat. All rights reserved.