Interface IPolicyProvider
public interface IPolicyProvider
Class IPolicyProvider
-
Method Summary
Modifier and TypeMethodDescriptionint
Evaludates and returns user's rightset on the given objectgetAccessEx
(IThingID policyProviderConfigID, IThingID thingID, IThingID userID) Evaludates and returns user's rightset on the given objectboolean
Returns flag that indicates if AccessMechanics could cache the results of this Policy providers.void
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
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 usersecurityRealmID
- thing ID of the security realmpolicyProviderConfigID
- thing ID of the policy provider configuration object- Throws:
PortalException
-