Interface IPolicyProvider


public interface IPolicyProvider
Class IPolicyProvider
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    getAccess(IThingID policyProviderConfigID, IThingID thingID, IThingID userID)
    Evaludates and returns user's rightset on the given object
    getAccessEx(IThingID policyProviderConfigID, IThingID thingID, IThingID userID)
    Evaludates and returns user's rightset on the given object
    boolean
    Returns flag that indicates if AccessMechanics could cache the results of this Policy providers.
    void
    onLogin(IThingID userID, IThingID securityRealmID, IThingID policyProviderConfigID)
    This method is called when user logs into the portal.
  • Method Details

    • getAccess

      int getAccess(IThingID policyProviderConfigID, IThingID thingID, IThingID userID) throws PortalException
      Evaludates and returns user's rightset on the given object
      Parameters:
      policyProviderConfigID -
      thingID -
      userID -
      Returns:
      Throws:
      PortalException
    • getAccessEx

      IRightSet getAccessEx(IThingID policyProviderConfigID, IThingID thingID, IThingID userID) throws PortalException
      Evaludates and returns user's rightset on the given object
      Parameters:
      policyProviderConfigID -
      thingID -
      userID -
      Returns:
      Throws:
      PortalException
    • isCacheable

      boolean isCacheable() throws PortalException
      Returns flag that indicates if AccessMechanics could cache the results of this Policy providers. Usually this could be set to true if acl are static or policy provider handles invalidation of AccessMechanics cache
      Returns:
      Throws:
      PortalException
    • onLogin

      void onLogin(IThingID userID, IThingID securityRealmID, IThingID policyProviderConfigID) throws PortalException
      This method is called when user logs into the portal. The default implementation is to invalidate all user cache for the list of things assigned to the security realm. Custom Policy Provider may override this method to implements its own behavour, to cache rights, etc.
      Parameters:
      userID - thing ID of the logged in user
      securityRealmID - thing ID of the security realm
      policyProviderConfigID - thing ID of the policy provider configuration object
      Throws:
      PortalException