public interface ServicePermissionRuleContext<S extends EntitySelection> extends UserServiceInvocationContext<S>
ServicePermissionRule.getPermission(ServicePermissionRuleContext)
Modifier and Type | Method and Description |
---|---|
S |
getEntitySelection()
Returns the current selection.
|
ServiceKey |
getServiceKey()
Returns the current service key.
|
Session |
getSession()
Returns the current session.
|
ToolbarLocation |
getToolbarLocation()
When the permission is being evaluated for displaying
or hiding the service as a toolbar action (a button or a menu item),
returns the toolbar location containing this action.
|
boolean |
isForDisplay()
Returns
true when the permission is being evaluated for displaying
or hiding the service as a toolbar action (a button or a menu item). |
boolean |
isForDisplayInDefaultMenu()
Returns
true when the permission is being evaluated for displaying
or hiding the service as part of a EBX® default menu. |
boolean |
isForExecution()
Returns
true when the permission is being evaluated for executing
the service (launched from a toolbar or accessed from a web component). |
S getEntitySelection()
null
.
Note: In the context of permission evaluation, the returned selection can be affected by whether a service permission is being evaluated for display or for execution. For instance when evaluating the service permission in a table view for display, the TableViewEntitySelection.getSelectedRecords() method will always return an empty result.
getEntitySelection
in interface UserServiceInvocationContext<S extends EntitySelection>
Session getSession()
null
.ServiceKey getServiceKey()
boolean isForDisplay()
true
when the permission is being evaluated for displaying
or hiding the service as a toolbar action (a button or a menu item).getToolbarLocation()
boolean isForDisplayInDefaultMenu()
true
when the permission is being evaluated for displaying
or hiding the service as part of a EBX® default menu.boolean isForExecution()
true
when the permission is being evaluated for executing
the service (launched from a toolbar or accessed from a web component).ToolbarLocation getToolbarLocation()
null
when isForDisplay()
is false
.