net.sf.jzeno.aop
Class AnonymousUser

java.lang.Object
  extended by net.sf.jzeno.aop.AnonymousUser
All Implemented Interfaces:
java.io.Serializable, User

public class AnonymousUser
extends java.lang.Object
implements User

See Also:
Serialized Form

Constructor Summary
AnonymousUser()
           
 
Method Summary
 java.lang.String getUserName()
           Any user in the system should be identified with a system-wide unique user name.
 boolean hasPermission(java.lang.String permissionName)
           The User implementation should be able to tell wether or not a given user has a requested permission.
 boolean hasRole(java.lang.String roleName)
           The User implementation should be able to tell wether or not a given user has a requested role.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnonymousUser

public AnonymousUser()
Method Detail

hasPermission

public boolean hasPermission(java.lang.String permissionName)
Description copied from interface: User

The User implementation should be able to tell wether or not a given user has a requested permission. Typically your user object could have roles and permissions associated to it, and then the implementation of this method would look up all permissions and return true if the requested permission was associated to the user. But the details of the implementation are up to you.

Specified by:
hasPermission in interface User

hasRole

public boolean hasRole(java.lang.String roleName)
Description copied from interface: User

The User implementation should be able to tell wether or not a given user has a requested role. Typically your user object could have roles to it, and then the implementation of this method would look up all roles and return true if the requested role was assigned to the user. But the details of the implementation are up to you. If you do not wish to implement role based security, this method should just return false.

Specified by:
hasRole in interface User

getUserName

public java.lang.String getUserName()
Description copied from interface: User

Any user in the system should be identified with a system-wide unique user name.

Specified by:
getUserName in interface User