| java.lang.Object org.mockejb.MockUser
MockUser | public class MockUser implements Principal(Code) | | Provides simple implementation of java.security.Principal.
Also stores the roles for the principal.
The only purpose of this class is to support two security-related
methods on EJBContext, so the implementation is very simple.
author: Alexander Ananiev |
hasRole | public boolean hasRole(String role)(Code) | | Checks if the given role belongs to this user
Parameters: role - role to check true if this user has the given role |
setRole | public void setRole(String role)(Code) | | Sets the role that this user has meaning that
this user only has one role
Parameters: role - name of the role |
setRoles | public void setRoles(String[] roles)(Code) | | Sets the roles that this user has
Parameters: roles - role names |
|
|