Package com.groiss.accesscontrol
Class PermissionMapping
java.lang.Object
com.groiss.accesscontrol.PermissionMapping
- All Implemented Interfaces:
IPermissionMapping
Overwrite behaviour of Permission-check for classes.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal void
doInit
(Agent theAgent, Right theRight, List<? extends Persistent> theWanted) This init method is called by the permission-system itself.final IPermissionMapping
Deprecated, for removal: This API element is subject to removal in a future version.void
init
(Agent agent, Right right, List<? extends Persistent> wanted) The init method allows to read and cache some data.final DNF
parentRewrite
(PermissionQuery query) Passes the current permission-query to the nextPermissionMapping
implementation in the registration-hierarchy.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.groiss.accesscontrol.IPermissionMapping
canCacheResult, forClasses, rewrite
-
Constructor Details
-
PermissionMapping
public PermissionMapping()
-
-
Method Details
-
getParentMapping
Deprecated, for removal: This API element is subject to removal in a future version.useparentRewrite(PermissionQuery)
. This method is inherently broken, in case of heterogeneous list of persistent need to be checked. In that case, the parent mapping for the first object in the list will be used.Return the parent permission mapping, this is the mapping that would be used if the current mapping had not been added to the rules. If no mapping is defined, the NULL_MAPPER is returned. Its rewrite method always returns null.- Returns:
- a permission mapper
-
parentRewrite
Passes the current permission-query to the nextPermissionMapping
implementation in the registration-hierarchy. Similar to calling super.rewrite() but since usually no explicit (type)hierarchy is available at implementation time, the runtime-hiearchy needs to be used.- Parameters:
query
- the query- Returns:
- the result
-
doInit
This init method is called by the permission-system itself.- Specified by:
doInit
in interfaceIPermissionMapping
-
init
The init method allows to read and cache some data.
-
parentRewrite(PermissionQuery)
.