org.entityfs.util.security
Class TrueAccessGranter

java.lang.Object
  extended by org.entityfs.util.security.TrueAccessGranter
All Implemented Interfaces:
AccessGranter

public class TrueAccessGranter
extends Object
implements AccessGranter

This is an AccessGranter that always permits all kinds of access to all entities.

Instances of this class are stateless. Use the singleton instance GRANTER instead of instantiating the class.

Since:
1.0
Author:
Karl Gustafsson

Field Summary
static TrueAccessGranter GRANTER
          The singleton instance.
 
Constructor Summary
TrueAccessGranter()
           
 
Method Summary
 boolean hasAccess(Subject s, Permission p)
          Is the subject authorized for the permission?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GRANTER

public static final TrueAccessGranter GRANTER
The singleton instance.

Constructor Detail

TrueAccessGranter

public TrueAccessGranter()
Method Detail

hasAccess

public boolean hasAccess(Subject s,
                         Permission p)
Description copied from interface: AccessGranter
Is the subject authorized for the permission?

Specified by:
hasAccess in interface AccessGranter
Parameters:
s - The subject. Might be null.
p - The permission.
Returns:
true if the subject is authorized for the permission, false if not.