Interface DataAccessControlling
public interface DataAccessControlling
Aspect providing means to ensure access to data via a bound
DataAccessSession.
The operational workflow for users of this aspect shall use:
verifyAccess()to find out about, whether access to the session's data is granted;requireAccess(BaseContext)to instruct the session to acquire access to data, while providing the execution context to allow for appropriate options for dialogs, if applicable.
Note: To provide localized messages, the ApplicationAgent can be employed, optionally provided by
the given base context (e.g., given via the data session).
- Since:
- 5.2.180803
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classException thrown, when access to the session's data is denied. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SessionAspectType<DataAccessControlling>Aspect providing means to ensure access to data. -
Method Summary
Modifier and TypeMethodDescription@Nullable StringProvides a label being used for an action to acquire access.voidrequireAccess(@NotNull BaseContext context) Requires the session to enable accessing its data and provide the current access state.voidVerifies the current accessibility on the session's data.
-
Field Details
-
TYPE
Aspect providing means to ensure access to data.- Since:
- 5.2.180803
-
-
Method Details
-
verifyAccess
Verifies the current accessibility on the session's data.- Throws:
DataAccessControlling.AccessDeniedException- If access is denied.- Since:
- 5.2.180803
-
requireAccess
void requireAccess(@NotNull @NotNull BaseContext context) throws DataAccessControlling.AccessDeniedException Requires the session to enable accessing its data and provide the current access state.- Parameters:
context- The context to operate in, providing environment information.- Throws:
DataAccessControlling.AccessDeniedException- If access is denied.- Since:
- 5.2.180803
-
getAcquireAccessLabel
Provides a label being used for an action to acquire access.- Returns:
- The action label or
nullto use a system provided label. - Since:
- 5.2.180803
-