org.riotfamily.riot.security.policy
Class LoggingPolicy

java.lang.Object
  extended by org.riotfamily.riot.security.policy.LoggingPolicy
All Implemented Interfaces:
AuthorizationPolicy, Ordered

public class LoggingPolicy
extends Object
implements AuthorizationPolicy

A logging policy for debugging purposes.

Since:
6.5
Author:
Alf Werder [alf dot werder at artundweise dot de]

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.riotfamily.riot.security.policy.AuthorizationPolicy
AuthorizationPolicy.Permission
 
Field Summary
 
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Constructor Summary
LoggingPolicy()
           
 
Method Summary
 void assertIsGranted(RiotUser user, String action, Object object)
           
 int getOrder()
           
 AuthorizationPolicy.Permission getPermission(RiotUser user, String action, Object object)
          Returns the permission for the given user, action and object.
 void setOrder(int order)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoggingPolicy

public LoggingPolicy()
Method Detail

getOrder

public int getOrder()
Specified by:
getOrder in interface Ordered

setOrder

public void setOrder(int order)

getPermission

public AuthorizationPolicy.Permission getPermission(RiotUser user,
                                                    String action,
                                                    Object object)
Description copied from interface: AuthorizationPolicy
Returns the permission for the given user, action and object.

Specified by:
getPermission in interface AuthorizationPolicy
action - The action to be performed
object - The object on which the action is to be performed

assertIsGranted

public void assertIsGranted(RiotUser user,
                            String action,
                            Object object)
                     throws PermissionDeniedException
Throws:
PermissionDeniedException