Package org.uberfire.security
Interface Resource
-
- All Known Subinterfaces:
MenuCustom<T>,MenuGroup,MenuItem,MenuItemCommand,MenuItemPerspective,MenuItemPlain,RuntimeContentResource,RuntimeFeatureResource,RuntimeResource,ToolBar,ToolBarItem
- All Known Implementing Classes:
BaseMenuCustom,DefaultMenuGroup,DefaultToolBar,DefaultToolBarItem,ResourceRef
@JsType public interface ResourceA generic interface for modelling resources, like UI assets: perspectives, screens or editors or even backend resources like repositories, projects, data objects, etc...
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default List<Resource>getDependencies()A list of dependent resources.StringgetIdentifier()An identifier that is unique among all the resources of the same type (seegetResourceType()).default ResourceTypegetResourceType()Get the resource type classifierdefault booleanisType(String typeName)Check if this resource is of the provided type.
-
-
-
Method Detail
-
getIdentifier
String getIdentifier()
An identifier that is unique among all the resources of the same type (seegetResourceType()).
-
getResourceType
default ResourceType getResourceType()
Get the resource type classifier
-
getDependencies
default List<Resource> getDependencies()
A 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.
- Returns:
- A list of resources, never null.
-
isType
default boolean isType(String typeName)
Check if this resource is of the provided type. The type name is used here so this method can be used on instances from external (GWT-compiled) scripts (enum equals and instanceof doesn't work across script boundaries).- Parameters:
typeName- the resource type's name- Returns:
- true if the resource has the provided type, otherwise false.
-
-