com.evermind.security
Interface User

All Superinterfaces:
java.security.Principal

public interface User
extends java.security.Principal


Method Summary
 void addToGroup(Group group)
          Adds the user to the specified group (if possible), throws UnsupportedOperationException if not possible.
 boolean authenticate(java.lang.String password)
          Verify this user.
 java.lang.String getCertificateIssuerDN()
          Retrieves the certificate issuer DN for this user, null if certificates are not supported or this user is not associated with a certificate.
 java.math.BigInteger getCertificateSerial()
          Retrieves the certificate serial ID for this user, null if certificates are not supported or this user is not associated with a certificate.
 java.lang.String getDescription()
          Returns a short description of this user or null if no description is present.
 java.util.Set getGroups()
          Returns the groups that this user belongs to, if known/supported.
 java.util.Locale getLocale()
          Return this users Locale or null if none specified.
 java.lang.String getName()
          Returns the username of this user
 java.lang.String getPassword()
          Gets the user password, may result in an exception if it's not supported by the current UserManager (for security or other reasons).
 boolean hasPermission(java.security.Permission permission)
          Check if this user has the named permission.
 boolean isMemberOf(Group group)
          See if this user is a member of the specified group.
 void removeFromGroup(Group group)
          Removes the user from the specified group, throws UnsupportedOperationException if not supported in this manager.
 void setCertificate(java.lang.String issuerDN, java.math.BigInteger serial)
          Sets the certificate associated with this user, may throw UnsupportedOperationException if certificates are not supported by this UserManager.
 void setCertificate(java.security.cert.X509Certificate cert)
          Sets the certificate associated with this user, may throw UnsupportedOperationException if certificates are not supported by this UserManager.
 void setDescription(java.lang.String description)
          Sets the description of this user, throws UnsupportedOperationException if not possible.
 void setPassword(java.lang.String password)
          Sets the user password, may result in an exception if it's not supported by the current UserManager.
 
Methods inherited from interface java.security.Principal
equals, hashCode, toString
 

Method Detail

getName


public java.lang.String getName()
Returns the username of this user
Specified by:
getName in interface java.security.Principal

getDescription


public java.lang.String getDescription()
Returns a short description of this user or null if no description is present.

setDescription


public void setDescription(java.lang.String description)
Sets the description of this user, throws UnsupportedOperationException if not possible.

authenticate


public boolean authenticate(java.lang.String password)
Verify this user.

getLocale


public java.util.Locale getLocale()
Return this users Locale or null if none specified.

hasPermission


public boolean hasPermission(java.security.Permission permission)
Check if this user has the named permission.

isMemberOf


public boolean isMemberOf(Group group)
See if this user is a member of the specified group.

setPassword


public void setPassword(java.lang.String password)
Sets the user password, may result in an exception if it's not supported by the current UserManager.

getPassword


public java.lang.String getPassword()
Gets the user password, may result in an exception if it's not supported by the current UserManager (for security or other reasons).

getCertificateSerial


public java.math.BigInteger getCertificateSerial()
Retrieves the certificate serial ID for this user, null if certificates are not supported or this user is not associated with a certificate.

getCertificateIssuerDN


public java.lang.String getCertificateIssuerDN()
Retrieves the certificate issuer DN for this user, null if certificates are not supported or this user is not associated with a certificate.

setCertificate


public void setCertificate(java.lang.String issuerDN,
                           java.math.BigInteger serial)
                    throws java.lang.UnsupportedOperationException
Sets the certificate associated with this user, may throw UnsupportedOperationException if certificates are not supported by this UserManager.

setCertificate


public void setCertificate(java.security.cert.X509Certificate cert)
Sets the certificate associated with this user, may throw UnsupportedOperationException if certificates are not supported by this UserManager.

addToGroup


public void addToGroup(Group group)
                throws java.lang.UnsupportedOperationException
Adds the user to the specified group (if possible), throws UnsupportedOperationException if not possible.

removeFromGroup


public void removeFromGroup(Group group)
                     throws java.lang.UnsupportedOperationException
Removes the user from the specified group, throws UnsupportedOperationException if not supported in this manager.

getGroups


public java.util.Set getGroups()
                        throws java.lang.UnsupportedOperationException
Returns the groups that this user belongs to, if known/supported.