Class PermissionMapping

java.lang.Object
com.groiss.accesscontrol.PermissionMapping
All Implemented Interfaces:
IPermissionMapping

public abstract class PermissionMapping extends Object implements IPermissionMapping
Overwrite behaviour of Permission-check for classes.
  • Constructor Details

    • PermissionMapping

      public PermissionMapping()
  • Method Details

    • getParentMapping

      @Deprecated(forRemoval=true, since="10.0") public final IPermissionMapping getParentMapping()
      Deprecated, for removal: This API element is subject to removal in a future version.
      use parentRewrite(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

      public final DNF parentRewrite(PermissionQuery query)
      Passes the current permission-query to the next PermissionMapping 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

      public final void doInit(Agent theAgent, Right theRight, List<? extends Persistent> theWanted)
      This init method is called by the permission-system itself.
      Specified by:
      doInit in interface IPermissionMapping
    • init

      public void init(Agent agent, Right right, List<? extends Persistent> wanted)
      The init method allows to read and cache some data.