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:
ServicePermissionRule.getPermission(ServicePermissionRuleContext)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SgetEntitySelection()Returns the current selection.ServiceKeygetServiceKey()Returns the current service key.SessiongetSession()Returns the current session.ToolbarLocationgetToolbarLocation()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.booleanisForDisplay()Returnstruewhen the permission is being evaluated for displaying or hiding the service as a toolbar action (a button or a menu item).booleanisForDisplayInDefaultMenu()Returnstruewhen the permission is being evaluated for displaying or hiding the service as part of a EBX® default menu.booleanisForExecution()Returnstruewhen the permission is being evaluated for executing the service (launched from a toolbar or accessed from a web component).
-
-
-
Method Detail
-
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:
getEntitySelectionin interfaceUserServiceInvocationContext<S extends EntitySelection>
-
getSession
Session getSession()
Returns the current session. Never returnsnull.
-
getServiceKey
ServiceKey getServiceKey()
Returns the current service key.
-
isForDisplay
boolean isForDisplay()
Returnstruewhen the permission is being evaluated for displaying or hiding the service as a toolbar action (a button or a menu item).- See Also:
getToolbarLocation()
-
isForDisplayInDefaultMenu
boolean isForDisplayInDefaultMenu()
Returnstruewhen the permission is being evaluated for displaying or hiding the service as part of a EBX® default menu.
-
isForExecution
boolean isForExecution()
Returnstruewhen 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. ReturnsnullwhenisForDisplay()isfalse.
-
-