Interface IPermissionMapping

All Known Implementing Classes:
PermissionMapping

public interface IPermissionMapping
Interface is used for logging purposes only.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    canCacheResult(User user, Right right, Object target)
    check, if the permission-result should be cached to avoid repeated expensive calculations
    void
    doInit(Agent theAgent, Right theRight, List<? extends Persistent> theWanted)
    This init method is called by the permission-system itself.
    Class<?>[]
    Define the classes where this mapping applies to.
    The rewrite method defines the modified permission query as DNF object.
  • Method Details

    • doInit

      void doInit(Agent theAgent, Right theRight, List<? extends Persistent> theWanted)
      This init method is called by the permission-system itself.
    • rewrite

      DNF rewrite(PermissionQuery q)
      The rewrite method defines the modified permission query as DNF object. Your implementation may return null in cases where the default behaviour shall not be changed.
      Parameters:
      q - the permission query
      Returns:
      null or a DNF object
    • canCacheResult

      default boolean canCacheResult(User user, Right right, Object target)
      check, if the permission-result should be cached to avoid repeated expensive calculations
      Parameters:
      user - the user
      right - the checked right
      target - the target
      Returns:
      true do cache the result, false do not cache the result. default: true
    • forClasses

      Class<?>[] forClasses()
      Define the classes where this mapping applies to.