Class DefaultMenuGroup
- java.lang.Object
-
- org.uberfire.workbench.model.menu.impl.DefaultMenuGroup
-
- All Implemented Interfaces:
RuntimeFeatureResource,RuntimeResource,Resource,HasEnabledStateChangeListeners,MenuGroup,MenuItem
@JsType public class DefaultMenuGroup extends Object implements MenuGroup
-
-
Constructor Summary
Constructors Constructor Description DefaultMenuGroup(List<MenuItem> menuItems, List<ResourceActionRef> resourceActionRefs, List<String> permissionNames, String contributionPoint, String caption, MenuPosition position, int order)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(MenuVisitor visitor)Causes the givenMenuVisitorto visit this menu item and its children.voidaddEnabledStateChangeListener(EnabledStateChangeListener listener)Called when the enabled state of a Widget changesStringgetCaption()StringgetContributionPoint()List<Resource>getDependencies()A list of dependent resources.StringgetIdentifier()An identifier that is unique among all the resources of the same type (seeResource.getResourceType()).List<MenuItem>getItems()intgetOrder()List<String>getPermissions()Get the list of permission names this menu item is restricted to.MenuPositiongetPosition()List<ResourceActionRef>getResourceActions()Get the list ofResourceActionRefactions this menu item is restricted to.booleanisEnabled()voidsetEnabled(boolean enabled)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.uberfire.security.Resource
getResourceType, isType
-
-
-
-
Constructor Detail
-
DefaultMenuGroup
@JsIgnore public DefaultMenuGroup(List<MenuItem> menuItems, List<ResourceActionRef> resourceActionRefs, List<String> permissionNames, String contributionPoint, String caption, MenuPosition position, int order)
-
-
Method Detail
-
getContributionPoint
public String getContributionPoint()
- Specified by:
getContributionPointin interfaceMenuItem
-
getCaption
public String getCaption()
- Specified by:
getCaptionin interfaceMenuItem
-
getPosition
public MenuPosition getPosition()
- Specified by:
getPositionin interfaceMenuItem
-
setEnabled
public void setEnabled(boolean enabled)
- Specified by:
setEnabledin interfaceMenuItem
-
addEnabledStateChangeListener
@JsIgnore public void addEnabledStateChangeListener(EnabledStateChangeListener listener)
Description copied from interface:HasEnabledStateChangeListenersCalled when the enabled state of a Widget changes- Specified by:
addEnabledStateChangeListenerin interfaceHasEnabledStateChangeListeners
-
accept
public void accept(MenuVisitor visitor)
Description copied from interface:MenuItemCauses the givenMenuVisitorto visit this menu item and its children.
-
getIdentifier
public String getIdentifier()
Description copied from interface:ResourceAn identifier that is unique among all the resources of the same type (seeResource.getResourceType()).- Specified by:
getIdentifierin interfaceResource
-
getResourceActions
@JsIgnore public List<ResourceActionRef> getResourceActions()
Description copied from interface:MenuItemGet the list ofResourceActionRefactions this menu item is restricted to.The menu item will be available provided all the given actions are authorized within the current context.
- Specified by:
getResourceActionsin interfaceMenuItem
-
getPermissions
@JsIgnore public List<String> getPermissions()
Description copied from interface:MenuItemGet the list of permission names this menu item is restricted to.The menu item will be available provided all the given permissions are authorized within the current context.
- Specified by:
getPermissionsin interfaceMenuItem
-
getDependencies
@JsIgnore public List<Resource> getDependencies()
Description copied from interface:ResourceA list of dependent resources.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.
- Specified by:
getDependenciesin interfaceResource- Returns:
- A list of resources, never null.
-
-