Interface ServicePermissionRuleContext<S extends EntitySelection>
- All Superinterfaces:
UserServiceInvocationContext<S>
public interface ServicePermissionRuleContext<S extends EntitySelection>
extends UserServiceInvocationContext<S>
Provides the context in which a service permission rule is being evaluated. Permissions can be
evaluated for display or for execution.
- Since:
- 5.8.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns the current selection.Returns the current service key.Returns the current session.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
Returnstrue
when the permission is being evaluated for displaying or hiding the service as a toolbar action (a button or a menu item).boolean
Returnstrue
when the permission is being evaluated for displaying or hiding the service as part of a EBX® default menu.boolean
Returnstrue
when the permission is being evaluated for executing the service (launched from a toolbar or accessed from a web component).
-
Method Details
-
getEntitySelection
S getEntitySelection()Returns the current selection. Never returnsnull
.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.
- Specified by:
getEntitySelection
in interfaceUserServiceInvocationContext<S extends EntitySelection>
-
getSession
Session getSession()Returns the current session. Never returnsnull
. -
getServiceKey
ServiceKey getServiceKey()Returns the current service key. -
isForDisplay
boolean isForDisplay()Returnstrue
when the permission is being evaluated for displaying or hiding the service as a toolbar action (a button or a menu item).- See Also:
-
isForDisplayInDefaultMenu
boolean isForDisplayInDefaultMenu()Returnstrue
when the permission is being evaluated for displaying or hiding the service as part of a EBX® default menu. -
isForExecution
boolean isForExecution()Returnstrue
when the permission is being evaluated for executing the service (launched from a toolbar or accessed from a web component). -
getToolbarLocation
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. Returnsnull
whenisForDisplay()
isfalse
.
-