|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.glite.security.voms.database.DBRole
A class representing the roles in a VO. Essentially, a database wrapper class for the roles table.
Method Summary | |
void |
addMember(DBUser user)
Adds this role to user in the VO group. |
void |
addMember(DBUser user,
DBGroup group)
Adds this role to the given user in the given group. |
void |
checkPermission(Operation o)
Convenience method: check that the client has the necessary privileges to perform the given operation on this role. |
int |
countMembers()
Returns the number of users who have this role, in any group. |
int |
countMembers(DBGroup group)
Returns the number of users who have this role in the given group. |
static int |
countRoles()
|
static DBRole |
createRole(java.lang.String name)
Creates a new role. |
void |
deleteRole()
Delete this role. |
DBACL |
getACL()
Return this role's ACL. |
DBAdmin |
getCreatedBy()
Return the user who created this role. |
long |
getCreatedSerial()
Return the serial number of the transaction that committed this role. |
java.lang.String |
getDN()
Return the name of this role. |
static DBRole |
getInstance(java.lang.String name)
Returns a DBRole object representing the named role. |
java.lang.String[] |
getMemberNames()
Return the names of all users that have this role in any of the groups. |
java.lang.String[] |
getMemberNames(DBGroup group)
Return the names of all users that have this role in any of the groups. |
DBUser[] |
getMembers()
Return all users that have this role in any of the groups. |
DBUser[] |
getMembers(DBGroup group)
Return all users that have this role in the given group. |
User[] |
getMembersAsUser()
Return all users that have this role in any of the groups. |
User[] |
getMembersAsUser(DBGroup group)
Return all users that have this role in the given group. |
static java.lang.String[] |
getRoleNames()
Get the names of all roles that are associated with this group. |
boolean |
isMember(DBUser user)
Returns true if the given user has this role in any group. |
boolean |
isMember(DBUser user,
DBGroup group)
Returns true if the given user has this role in the given group. |
void |
removeAllMembers()
Rids this role from every user in all groups. |
void |
removeAllMembers(DBGroup group)
Rids this role from every user in the given group. |
void |
removeMember(DBUser user)
Rids the given user from this role in every group. |
void |
removeMember(DBUser user,
DBGroup group)
Removes this role from the given user associated with the given group. |
java.lang.String |
toString()
Convert to a human-readable string. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
public static DBRole getInstance(java.lang.String name) throws GeneralDatabaseException, NotInDatabase, ArgumentException
name
- The name of the role.
NotInDatabase
- If there is no such group in the database.
GeneralDatabaseException
ArgumentException
public java.lang.String getDN()
getDN
in interface DBContainer
public java.lang.String toString()
toString
in interface DBContainer
public long getCreatedSerial()
public DBACL getACL() throws GeneralDatabaseException
getACL
in interface DBContainer
GeneralDatabaseException
public DBAdmin getCreatedBy() throws GeneralDatabaseException, NotInDatabase
NotInDatabase
- if the administrator has been deleted from the database.
GeneralDatabaseException
public void checkPermission(Operation o) throws GeneralDatabaseException, VOMSSecurityException
checkPermission
in interface DBContainer
GeneralDatabaseException
VOMSSecurityException
public void deleteRole() throws GeneralDatabaseException, ArgumentException
GeneralDatabaseException
ArgumentException
public int countMembers() throws GeneralDatabaseException
GeneralDatabaseException
public int countMembers(DBGroup group) throws GeneralDatabaseException
GeneralDatabaseException
public boolean isMember(DBUser user) throws GeneralDatabaseException
GeneralDatabaseException
public boolean isMember(DBUser user, DBGroup group) throws GeneralDatabaseException
GeneralDatabaseException
public DBUser[] getMembers() throws GeneralDatabaseException
getMembers
in interface DBContainer
GeneralDatabaseException
public User[] getMembersAsUser() throws GeneralDatabaseException
getMembersAsUser
in interface DBContainer
GeneralDatabaseException
public java.lang.String[] getMemberNames() throws GeneralDatabaseException
getMemberNames
in interface DBContainer
GeneralDatabaseException
public DBUser[] getMembers(DBGroup group) throws GeneralDatabaseException
GeneralDatabaseException
public User[] getMembersAsUser(DBGroup group) throws GeneralDatabaseException
GeneralDatabaseException
public java.lang.String[] getMemberNames(DBGroup group) throws GeneralDatabaseException
GeneralDatabaseException
public void addMember(DBUser user) throws GeneralDatabaseException, ArgumentException
addMember
in interface DBContainer
GeneralDatabaseException
ArgumentException
public void addMember(DBUser user, DBGroup group) throws GeneralDatabaseException, ArgumentException
GeneralDatabaseException
ArgumentException
public void removeMember(DBUser user) throws GeneralDatabaseException, ArgumentException
removeMember
in interface DBContainer
GeneralDatabaseException
ArgumentException
public void removeMember(DBUser user, DBGroup group) throws GeneralDatabaseException, ArgumentException
GeneralDatabaseException
ArgumentException
public void removeAllMembers() throws GeneralDatabaseException
GeneralDatabaseException
public void removeAllMembers(DBGroup group) throws GeneralDatabaseException
GeneralDatabaseException
public static DBRole createRole(java.lang.String name) throws GeneralDatabaseException, ArgumentException
name
- The name of the new role.
DBRole
object corresponding to the newly created role.
ArgumentException
- if the role is already in the database.
GeneralDatabaseException
public static java.lang.String[] getRoleNames() throws GeneralDatabaseException
GeneralDatabaseException
public static int countRoles() throws GeneralDatabaseException
GeneralDatabaseException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |