Package org.apache.catalina.realm
Class UserDatabaseRealm.UserDatabasePrincipal
- java.lang.Object
- 
- org.apache.catalina.realm.GenericPrincipal
- 
- org.apache.catalina.realm.UserDatabaseRealm.UserDatabasePrincipal
 
 
- 
- All Implemented Interfaces:
- java.io.Serializable,- java.security.Principal,- TomcatPrincipal
 - Enclosing class:
- UserDatabaseRealm
 
 public static final class UserDatabaseRealm.UserDatabasePrincipal extends GenericPrincipal - See Also:
- Serialized Form
 
- 
- 
Field Summary- 
Fields inherited from class org.apache.catalina.realm.GenericPrincipalgssCredential, loginContext, name, password, roles, userPrincipal
 
- 
 - 
Constructor SummaryConstructors Constructor Description UserDatabasePrincipal(User user, UserDatabase database)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String[]getRoles()booleanhasRole(java.lang.String role)Does the user represented by this Principal possess the specified role?- 
Methods inherited from class org.apache.catalina.realm.GenericPrincipalgetGssCredential, getName, getPassword, getUserPrincipal, logout, setGssCredential, toString
 
- 
 
- 
- 
- 
Constructor Detail- 
UserDatabasePrincipalpublic UserDatabasePrincipal(User user, UserDatabase database) 
 
- 
 - 
Method Detail- 
getRolespublic java.lang.String[] getRoles() - Overrides:
- getRolesin class- GenericPrincipal
 
 - 
hasRolepublic boolean hasRole(java.lang.String role) Description copied from class:GenericPrincipalDoes the user represented by this Principal possess the specified role?- Overrides:
- hasRolein class- GenericPrincipal
- Parameters:
- role- Role to be tested
- Returns:
- trueif this Principal has been assigned the given role, otherwise- false
 
 
- 
 
-