@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, waitgetResourceType, 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 MenuItempublic String getCaption()
getCaption in interface MenuItempublic MenuPosition getPosition()
getPosition in interface MenuItempublic void setEnabled(boolean enabled)
setEnabled in interface MenuItem@JsIgnore public void addEnabledStateChangeListener(EnabledStateChangeListener listener)
HasEnabledStateChangeListenersaddEnabledStateChangeListener in interface HasEnabledStateChangeListenerspublic void accept(MenuVisitor visitor)
MenuItemMenuVisitor to visit this menu item and its
children.public String getIdentifier()
ResourceResource.getResourceType()).getIdentifier in interface Resource@JsIgnore public List<ResourceActionRef> getResourceActions()
MenuItemResourceActionRef 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 ResourceCopyright © 2012–2018 JBoss by Red Hat. All rights reserved.