public abstract class PermissionMapping extends Object
Constructor and Description |
---|
PermissionMapping() |
Modifier and Type | Method and Description |
---|---|
boolean |
canCacheResult(User user,
Right right,
Object target)
check, if the permission-result should be cached to avoid repeated expensive calculations
|
abstract Class<?>[] |
forClasses()
Define the classes where this mapping applies to.
|
PermissionMapping |
getParentMapping()
Deprecated.
use
parentRewrite(PermissionQuery) . this method is inherently broken, in case of heterogenous list of persistents
need to be checked. in that case, the parent mapping for the first object in the list will be used. |
void |
init(Agent agent,
Right right,
List<? extends Persistent> wanted)
The init method allows to read and cache some data.
|
DNF |
parentRewrite(PermissionQuery query)
passes the current permission-query to the next
PermissionMapping implementation in the registration-hierarchy. |
abstract DNF |
rewrite(PermissionQuery q)
The rewrite method defines the modified permission query as DNF object.
|
@Deprecated public final PermissionMapping getParentMapping()
parentRewrite(PermissionQuery)
. this method is inherently broken, in case of heterogenous list of persistents
need to be checked. in that case, the parent mapping for the first object in the list will be used.public final DNF parentRewrite(PermissionQuery query)
PermissionMapping
implementation in the registration-hierarchy.
simmilar to calling super.rewrite() but since usually no explicit (type)hierarchy is available at implementation time, the runtime-hiearchy needs to be used.query
- the querypublic abstract Class<?>[] forClasses()
public void init(Agent agent, Right right, List<? extends Persistent> wanted)
public abstract DNF rewrite(PermissionQuery q)
q
- the permission querypublic boolean canCacheResult(User user, Right right, Object target)
user
- the userright
- the checked righttarget
- the targettrue
do cache the result, false
do not cache the result. default: true
@enterprise 10.0.39049 Copyright © 2024 FREQUENTIS AG. All Rights Reserved.