Interface SessionPermissions
-
public interface SessionPermissionsDefines a facade for checking the user's session permissions (access rights or actions) on dataspaces, snapshots, datasets, records, and nodes (tables, ...).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description AccessPermissiongetAdaptationAccessPermission(Adaptation aDataSetOrRecord)Returns the current user's access rights on the specified dataset or record.AccessPermissiongetGlobalPermissionToAdministration()Returns whether the user has permission to access the Administration area in the user interface.AccessPermissiongetGlobalPermissionToDataModel()Returns whether the user has permission to access the Data Models area in the user interface.AccessPermissiongetGlobalPermissionToDataServices()Returns whether the user has permission to access the Data Services area in the user interface.AccessPermissiongetGlobalPermissionToDataSpace()Returns whether the user has permission to access the Dataspaces area in the user interface.AccessPermissiongetGlobalPermissionToWorkflowModel()Returns whether the user has permission to access the Workflow Models area in the user interface.AccessPermissiongetHomeAccessPermission(AdaptationHome aDataSpaceOrSnapshot)Returns the current user's access rights on the dataspace or snapshot specified.ActionPermissiongetHomeActionPermissionForService(ServiceKey serviceKey, AdaptationHome aDataSpaceOrSnapshot)Returns the current user's permissions for executing the dataspace or snapshot service specified.ActionPermissiongetHomeActionPermissionToChangeOwner(AdaptationHome aDataSpaceOrSnapshot)Returns the current user's permissions for changing the owner of the dataspace or snapshot specified.ActionPermissiongetHomeActionPermissionToChangePermission(AdaptationHome aDataSpaceOrSnapshot)Returns the current user's permissions for changing permissions of the dataspace or snapshot specified.ActionPermissiongetHomeActionPermissionToCloseHome(AdaptationHome aDataSpaceOrSnapshot)Returns the current user's permissions for closing the dataspace or snapshot specified.ActionPermissiongetHomeActionPermissionToCreateChildBranch(AdaptationHome aDataSpace)Returns the current user's permissions for creating child dataspaces from the dataspace specified.ActionPermissiongetHomeActionPermissionToCreateChildVersion(AdaptationHome aDataSpace)Returns the current user's permissions for creating child snapshots from the dataspace specified.ActionPermissiongetHomeActionPermissionToCreateRootInstance(AdaptationHome aDataSpaceOrSnapshot)Returns the current user's permissions for creating a root dataset.ActionPermissiongetHomeActionPermissionToExportArchive(AdaptationHome aDataSpaceOrSnapshot)Returns the current user's permission for performing an archive export of the dataspace or snapshot specified.ActionPermissiongetHomeActionPermissionToImportArchive(AdaptationHome aDataSpace)Returns the current user's permissions for performing an archive import into the dataspace specified.ActionPermissiongetHomeActionPermissionToInitializeMerge(AdaptationHome aDataSpace)Returns the current user's permissions for merging the dataspace specified.ActionPermissiongetHomeActionPermissionToLockHome(LockSpec aSpec, AdaptationHome aDataSpace)Returns the current user's permissions for locking the dataspace specified.ActionPermissiongetHomeActionPermissionToUnlockHome(LockSpec aSpec, AdaptationHome aDataSpace)Returns the current user's permissions for unlocking the dataspace specified.ActionPermissiongetInstanceActionPermissionForService(ServiceKey serviceKey, Adaptation aDataSet)Returns the current user's permissions for executing the dataset service specified.ActionPermissiongetInstanceActionPermissionToActivateInstance(Adaptation aDataSet)Returns the current user's permissions for activating the dataset specified.ActionPermissiongetInstanceActionPermissionToCreateChild(Adaptation aDataSet)Returns the current user's permissions for creating child datasets from the dataset specified.ActionPermissiongetInstanceActionPermissionToCreateDuplicate(Adaptation aDataSet)Returns the current user's permissions for duplicating the dataset specified.ActionPermissiongetInstanceActionPermissionToDeleteInstance(Adaptation aDataSet)Returns the current user's permissions for deleting the dataset specified.AccessPermissiongetNodeAccessPermission(SchemaNode aNode, Adaptation aDataSetOrRecord)Returns the current user's access rights on the specified node in an update/display context.AccessPermissiongetNodeAccessPermissionForCreate(SchemaNode aNode, AdaptationTable aTable)Returns the current user's access rights on the specified node in a creation context.AccessPermissiongetNodeAccessPermissionForForm(SchemaNode aNode, Adaptation aDataSetOrRecord)Returns the current user's access rights on the specified node when displayed in a form.ActionPermissiongetNodeActionPermissionForService(ServiceKey aServiceKey, SchemaNode aNode, Adaptation aDataSetOrRecord)Returns the current user's permissions for executing the service on the specified node.ActionPermissiongetOccurrenceActionPermissionToDelete(Adaptation aRecord, AdaptationTable aTable)Returns the current user's permissions for deleting the specified table record.ActionPermissiongetOccurrenceActionPermissionToOccult(Adaptation aRecord, AdaptationTable aTable)Returns the current user's permissions for occulting the specified table record.ActionPermissiongetOccurrenceActionPermissionToOverwrite(Adaptation aRecord, AdaptationTable aTable)Returns the current user's permissions for overwriting the specified table record.SessiongetSession()Deprecated.Since 5.4.1, this method returnsnullif this instance has been created directly to evaluate user permissions.ActionPermissiongetTableActionPermissionForService(ServiceKey serviceKey, AdaptationTable aTable)Returns the current user's permissions for executing the service in the table specified.ActionPermissiongetTableActionPermissionToCreateRootOccurrence(AdaptationTable aTable)Returns the current user's permissions for creating a table record in the table specified.booleanisHomeOwner(AdaptationHome aDataSpaceOrSnapshot)Returns whether the current user is the owner of the dataspace or snapshot specified.
-
-
-
Method Detail
-
getGlobalPermissionToAdministration
AccessPermission getGlobalPermissionToAdministration()
Returns whether the user has permission to access the Administration area in the user interface.
-
getGlobalPermissionToDataSpace
AccessPermission getGlobalPermissionToDataSpace()
Returns whether the user has permission to access the Dataspaces area in the user interface.
-
getGlobalPermissionToDataModel
AccessPermission getGlobalPermissionToDataModel()
Returns whether the user has permission to access the Data Models area in the user interface.
-
getGlobalPermissionToWorkflowModel
AccessPermission getGlobalPermissionToWorkflowModel()
Returns whether the user has permission to access the Workflow Models area in the user interface.
-
getGlobalPermissionToDataServices
AccessPermission getGlobalPermissionToDataServices()
Returns whether the user has permission to access the Data Services area in the user interface.
-
getHomeAccessPermission
AccessPermission getHomeAccessPermission(AdaptationHome aDataSpaceOrSnapshot)
Returns the current user's access rights on the dataspace or snapshot specified.
-
getAdaptationAccessPermission
AccessPermission getAdaptationAccessPermission(Adaptation aDataSetOrRecord)
Returns the current user's access rights on the specified dataset or record.
-
getNodeAccessPermission
AccessPermission getNodeAccessPermission(SchemaNode aNode, Adaptation aDataSetOrRecord)
Returns the current user's access rights on the specified node in an update/display context.When the specified node is not terminal, the access permission returned by this method is
read-onlyif at least one of its children is nothidden, returnshiddenotherwise.Note: There can be additional permission rules applying while in a creation context, in this case
getNodeAccessPermissionForCreate(SchemaNode, AdaptationTable)should be used instead.
-
getNodeAccessPermissionForCreate
AccessPermission getNodeAccessPermissionForCreate(SchemaNode aNode, AdaptationTable aTable)
Returns the current user's access rights on the specified node in a creation context.When the specified node is not terminal, the access permission returned by this method is
read-onlyif at least one of its children is nothidden, returnshiddenotherwise.- Since:
- 5.9.0
-
getNodeAccessPermissionForForm
AccessPermission getNodeAccessPermissionForForm(SchemaNode aNode, Adaptation aDataSetOrRecord)
Returns the current user's access rights on the specified node when displayed in a form.When the specified node is a table record node and the specified adaptation is a dataset, permissions are evaluated in the context of a record creation. In such a case, there can be some additional permission rules applying (see
AccessRuleForCreate).The access permission returned by this method is never less restrictive than the one returned by getNodeAccessPermission(SchemaNode, Adaptation).
- Since:
- 5.8.0
-
getNodeActionPermissionForService
ActionPermission getNodeActionPermissionForService(ServiceKey aServiceKey, SchemaNode aNode, Adaptation aDataSetOrRecord)
Returns the current user's permissions for executing the service on the specified node. If the specified service is not found,ActionPermission.getDisabled()is returned.- Since:
- 5.4.2
-
getHomeActionPermissionToCreateChildBranch
ActionPermission getHomeActionPermissionToCreateChildBranch(AdaptationHome aDataSpace)
Returns the current user's permissions for creating child dataspaces from the dataspace specified.
-
getHomeActionPermissionToCreateChildVersion
ActionPermission getHomeActionPermissionToCreateChildVersion(AdaptationHome aDataSpace)
Returns the current user's permissions for creating child snapshots from the dataspace specified.
-
getHomeActionPermissionToInitializeMerge
ActionPermission getHomeActionPermissionToInitializeMerge(AdaptationHome aDataSpace)
Returns the current user's permissions for merging the dataspace specified.
-
getHomeActionPermissionToExportArchive
ActionPermission getHomeActionPermissionToExportArchive(AdaptationHome aDataSpaceOrSnapshot)
Returns the current user's permission for performing an archive export of the dataspace or snapshot specified.
-
getHomeActionPermissionToImportArchive
ActionPermission getHomeActionPermissionToImportArchive(AdaptationHome aDataSpace)
Returns the current user's permissions for performing an archive import into the dataspace specified.
-
getHomeActionPermissionToCloseHome
ActionPermission getHomeActionPermissionToCloseHome(AdaptationHome aDataSpaceOrSnapshot)
Returns the current user's permissions for closing the dataspace or snapshot specified.
-
isHomeOwner
boolean isHomeOwner(AdaptationHome aDataSpaceOrSnapshot)
Returns whether the current user is the owner of the dataspace or snapshot specified.
-
getHomeActionPermissionToLockHome
ActionPermission getHomeActionPermissionToLockHome(LockSpec aSpec, AdaptationHome aDataSpace)
Returns the current user's permissions for locking the dataspace specified.- See Also:
LockSpec.lock(AdaptationHome, Session)
-
getHomeActionPermissionToUnlockHome
ActionPermission getHomeActionPermissionToUnlockHome(LockSpec aSpec, AdaptationHome aDataSpace)
Returns the current user's permissions for unlocking the dataspace specified.- See Also:
LockSpec.unlock(AdaptationHome, Session)
-
getHomeActionPermissionToCreateRootInstance
ActionPermission getHomeActionPermissionToCreateRootInstance(AdaptationHome aDataSpaceOrSnapshot)
Returns the current user's permissions for creating a root dataset.
-
getHomeActionPermissionToChangeOwner
ActionPermission getHomeActionPermissionToChangeOwner(AdaptationHome aDataSpaceOrSnapshot)
Returns the current user's permissions for changing the owner of the dataspace or snapshot specified.
-
getHomeActionPermissionToChangePermission
ActionPermission getHomeActionPermissionToChangePermission(AdaptationHome aDataSpaceOrSnapshot)
Returns the current user's permissions for changing permissions of the dataspace or snapshot specified.
-
getHomeActionPermissionForService
ActionPermission getHomeActionPermissionForService(ServiceKey serviceKey, AdaptationHome aDataSpaceOrSnapshot)
Returns the current user's permissions for executing the dataspace or snapshot service specified. If the specified service is not found,ActionPermission.getDisabled()is returned.
-
getInstanceActionPermissionToCreateChild
ActionPermission getInstanceActionPermissionToCreateChild(Adaptation aDataSet)
Returns the current user's permissions for creating child datasets from the dataset specified.
-
getInstanceActionPermissionToCreateDuplicate
ActionPermission getInstanceActionPermissionToCreateDuplicate(Adaptation aDataSet)
Returns the current user's permissions for duplicating the dataset specified.
-
getInstanceActionPermissionToDeleteInstance
ActionPermission getInstanceActionPermissionToDeleteInstance(Adaptation aDataSet)
Returns the current user's permissions for deleting the dataset specified.
-
getInstanceActionPermissionToActivateInstance
ActionPermission getInstanceActionPermissionToActivateInstance(Adaptation aDataSet)
Returns the current user's permissions for activating the dataset specified.
-
getInstanceActionPermissionForService
ActionPermission getInstanceActionPermissionForService(ServiceKey serviceKey, Adaptation aDataSet)
Returns the current user's permissions for executing the dataset service specified. If the specified service is not found,ActionPermission.getDisabled()is returned.
-
getTableActionPermissionToCreateRootOccurrence
ActionPermission getTableActionPermissionToCreateRootOccurrence(AdaptationTable aTable)
Returns the current user's permissions for creating a table record in the table specified.Warning
Access right on the table node for the current session is ignored when calling this method. To perform this additional check, method
getNodeAccessPermission(SchemaNode, Adaptation)should also be called on the table node.
-
getTableActionPermissionForService
ActionPermission getTableActionPermissionForService(ServiceKey serviceKey, AdaptationTable aTable)
Returns the current user's permissions for executing the service in the table specified. If the specified service is not found,ActionPermission.getDisabled()is returned.- Since:
- 5.4.2
-
getOccurrenceActionPermissionToOverwrite
ActionPermission getOccurrenceActionPermissionToOverwrite(Adaptation aRecord, AdaptationTable aTable)
Returns the current user's permissions for overwriting the specified table record.Warning
Access right on the table node for the current session is ignored when calling this method. To perform this additional check, method
getNodeAccessPermission(SchemaNode, Adaptation)should also be called on the table node.- Throws:
IllegalArgumentException- ifaRecordis a dataset.
-
getOccurrenceActionPermissionToOccult
ActionPermission getOccurrenceActionPermissionToOccult(Adaptation aRecord, AdaptationTable aTable)
Returns the current user's permissions for occulting the specified table record.Warning
Access right on the table node for the current session is ignored when calling this method. To perform this additional check, method
getNodeAccessPermission(SchemaNode, Adaptation)should also be called on the table node.- Throws:
IllegalArgumentException- ifaRecordis a dataset.
-
getOccurrenceActionPermissionToDelete
ActionPermission getOccurrenceActionPermissionToDelete(Adaptation aRecord, AdaptationTable aTable)
Returns the current user's permissions for deleting the specified table record.Warning
Access right on the table node for the current session is ignored when calling this method. To perform this additional check, method
getNodeAccessPermission(SchemaNode, Adaptation)should also be called on the table node.- Throws:
IllegalArgumentException- ifaRecordis a dataset.
-
getSession
@Deprecated Session getSession()
Deprecated.Since 5.4.1, this method returnsnullif this instance has been created directly to evaluate user permissions.Returns the associated user session, ornullif this instance has been created directly to evaluate user permissions.
-
-