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
Modifier and TypeInterfaceDescriptionstatic class
Exception thrown, when access to the session's data is denied. -
Field Summary
Modifier and TypeFieldDescriptionstatic final SessionAspectType<DataAccessControlling>
Aspect providing means to ensure access to data. -
Method Summary
Modifier and TypeMethodDescription@Nullable String
Provides a label being used for an action to acquire access.void
requireAccess
(@NotNull BaseContext context) Requires the session to enable accessing its data and provide the current access state.void
Verifies 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
null
to use a system provided label. - Since:
- 5.2.180803
-