|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.glite.security.voms.database.DBUser
A class representing the users in a VO. Essentially, a database wrapper class for the users table.
Method Summary | |
int |
countCapabilities()
Return the number of capabilities that this user has. |
int |
countGroups()
Return the number of groups that this user is a member of, including the VO group. |
int |
countRoles()
Return the number of role-group pairs that this user has. |
static DBUser |
createUser(java.lang.String dn,
java.lang.String cn,
DBCA ca,
java.lang.String certUri,
java.lang.String mail)
Creates a new user in the database. |
void |
deleteUser()
Deletes a user from the database. |
static java.util.List |
getAllUsernames()
|
User |
getAsUser()
Return this as a User. |
DBCA |
getCA()
Return the CA of this user. |
java.lang.String[] |
getCapabilityNames()
Return the names of all capabilities that this user has. |
java.lang.String |
getCertUri()
Return the URI to the user's certificate. |
java.lang.String |
getCN()
Return the common name of this user. |
DBAdmin |
getCreatedBy()
Return the admin who created this user. |
long |
getCreatedSerial()
Return the serial number of the transaction that committed this user. |
java.lang.String |
getDN()
Return the distinguished name of this user. |
java.lang.String[] |
getGroupnames()
Return the names of all groups that this user is a member of, including the VO group, in an unspecified order. |
static DBUser |
getInstance(java.lang.String name,
DBCA ca)
|
static DBUser |
getInstance(User user)
|
static DBUser |
getInstanceFromSecurityContext()
Returns the user object associated with the current client. |
java.lang.String |
getMail()
Return the email address of this user. |
java.lang.String[] |
getRolenames()
Return the names of all role-group pairs that this user has. |
void |
setAttributes(java.lang.String cn,
java.lang.String mail,
java.lang.String certUri)
Set auxiliary attributes. |
java.lang.String |
toString()
Convert to a human-readable string representation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
public static DBUser getInstance(java.lang.String name, DBCA ca) throws GeneralDatabaseException, NotInDatabase, ArgumentException
GeneralDatabaseException
NotInDatabase
ArgumentException
public static DBUser getInstance(User user) throws GeneralDatabaseException, NotInDatabase, ArgumentException
GeneralDatabaseException
NotInDatabase
ArgumentException
public static DBUser getInstanceFromSecurityContext() throws GeneralDatabaseException, NotInDatabase, VOMSSecurityException
VOMSSecurityException
- if the client's credentials could not be determined or if the client is not a user in the database.
GeneralDatabaseException
NotInDatabase
public java.lang.String getDN()
public java.lang.String toString()
public java.lang.String getCN()
public java.lang.String getMail()
public java.lang.String getCertUri()
public long getCreatedSerial()
public DBCA getCA() throws GeneralDatabaseException, NotInDatabase
GeneralDatabaseException
NotInDatabase
public DBAdmin getCreatedBy() throws GeneralDatabaseException, NotInDatabase
NotInDatabase
- if the creator has been deleted from the database.
GeneralDatabaseException
public User getAsUser() throws GeneralDatabaseException, NotInDatabase
GeneralDatabaseException
NotInDatabase
public void setAttributes(java.lang.String cn, java.lang.String mail, java.lang.String certUri) throws GeneralDatabaseException
GeneralDatabaseException
public static DBUser createUser(java.lang.String dn, java.lang.String cn, DBCA ca, java.lang.String certUri, java.lang.String mail) throws GeneralDatabaseException, ArgumentException
GeneralDatabaseException
ArgumentException
public void deleteUser() throws GeneralDatabaseException, NotInDatabase
GeneralDatabaseException
NotInDatabase
public static java.util.List getAllUsernames() throws GeneralDatabaseException
GeneralDatabaseException
public int countGroups() throws GeneralDatabaseException
GeneralDatabaseException
public java.lang.String[] getGroupnames() throws GeneralDatabaseException
GeneralDatabaseException
public int countRoles() throws GeneralDatabaseException
GeneralDatabaseException
public java.lang.String[] getRolenames() throws GeneralDatabaseException
GeneralDatabaseException
public int countCapabilities() throws GeneralDatabaseException
GeneralDatabaseException
public java.lang.String[] getCapabilityNames() throws GeneralDatabaseException
GeneralDatabaseException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |