|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.glite.security.voms.database.DBGroup
A class representing the groups in a VO. Essentially, a wrapper class for the groups table.
Field Summary | |
static long |
VO_GROUP_ID
The id of the VO group. |
Method Summary | |
void |
addMember(DBUser user)
Add a user to the members of this group. |
void |
checkPermission(Operation o)
Convenience method: check that the client has the necessary privileges to perform the given operation on this group. |
int |
countAllGroups()
Return the number of groups in this VO. |
int |
countChildGroups()
Return the number of direct subgroups of this group. |
int |
countMembers()
Returns the number of users who are members of this group. |
DBGroup |
createChildGroup(java.lang.String name)
Creates a new group with this group as parent. |
static DBGroup |
createVOGroup()
Creates the VO group. |
void |
deleteGroup()
Delete this group. |
DBACL |
getACL()
Return this group's ACL. |
java.lang.String[] |
getChildGroupNames()
Get the names of direct subgroups of this group. |
DBGroup[] |
getChildGroups()
Get the direct subgroups of this group. |
DBAdmin |
getCreatedBy()
Return the administrator who created this group. |
long |
getCreatedSerial()
Return the serial number of the transaction that committed this group. |
DBACL |
getDefaultACL()
Return this group's default ACL. |
java.lang.String |
getDN()
Return the name of this group. |
static DBGroup |
getInstance(java.lang.String name)
Returns a DBGroup object representing the named group. |
java.lang.String[] |
getMemberNames()
Return the names of the members of this group. |
DBUser[] |
getMembers()
Return the members of this group as DBUser objects. |
User[] |
getMembersAsUser()
Return the names of all members of this group as User objects. |
boolean |
getMust()
Return true iff the group is non-deniable. |
DBGroup |
getParent()
Return this group's parent group. |
static DBGroup |
getVOGroup()
Returns a DBGroup object representing the VO group. |
boolean |
isChildGroup(DBGroup child)
Return true if the given group is a direct subgroup of this group. |
boolean |
isMember(DBUser user)
Returns true if the given user is a member of this group. |
boolean |
isVOGroup()
Return true if this group is the VO group. |
void |
removeAllMembers()
Remove all members of this group. |
void |
removeMember(DBUser user)
Remove a user from this group and all its subgroups. |
void |
setAttributes(boolean must)
Set auxiliary attributes. |
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 |
Field Detail |
public static final long VO_GROUP_ID
Method Detail |
public static DBGroup getInstance(java.lang.String name) throws GeneralDatabaseException, NotInDatabase, ArgumentException
name
- The fully qualified name of the group. (Null is an alias for the VO group.)
NotInDatabase
- If there is no such group in the database.
GeneralDatabaseException
ArgumentException
public static DBGroup getVOGroup() throws GeneralDatabaseException
GeneralDatabaseException
public java.lang.String getDN()
getDN
in interface DBContainer
public boolean getMust()
public java.lang.String toString()
toString
in interface DBContainer
public long getCreatedSerial()
public DBGroup getParent() throws GeneralDatabaseException
GeneralDatabaseException
public DBACL getACL() throws GeneralDatabaseException
getACL
in interface DBContainer
GeneralDatabaseException
public DBACL getDefaultACL() throws GeneralDatabaseException
GeneralDatabaseException
public DBAdmin getCreatedBy() throws GeneralDatabaseException, NotInDatabase
NotInDatabase
- if the administrator has been deleted from the database.
GeneralDatabaseException
public boolean isVOGroup()
public void checkPermission(Operation o) throws GeneralDatabaseException, VOMSSecurityException
checkPermission
in interface DBContainer
GeneralDatabaseException
VOMSSecurityException
public int countAllGroups() throws GeneralDatabaseException
GeneralDatabaseException
public int countChildGroups() throws GeneralDatabaseException
GeneralDatabaseException
public boolean isChildGroup(DBGroup child) throws GeneralDatabaseException
child
- The group to check.
GeneralDatabaseException
public DBGroup[] getChildGroups() throws GeneralDatabaseException
GeneralDatabaseException
public java.lang.String[] getChildGroupNames() throws GeneralDatabaseException
GeneralDatabaseException
public static DBGroup createVOGroup() throws GeneralDatabaseException, ArgumentException
GeneralDatabaseException
ArgumentException
public DBGroup createChildGroup(java.lang.String name) throws GeneralDatabaseException, ArgumentException
The new groups gets a copy of the parent group's ACL and default ACL,
extended with an The group becomes a non-deniable group by default.
name
- The fqgn of the new group.
ArgumentException
- if a group with the given name already exists.
GeneralDatabaseException
public void deleteGroup() throws GeneralDatabaseException, ArgumentException
ArgumentException
- if the group has members or subcontainers or if the group is the VO group.
GeneralDatabaseException
public int countMembers() throws GeneralDatabaseException
GeneralDatabaseException
public boolean isMember(DBUser user) throws GeneralDatabaseException
user
- The user to check for.
GeneralDatabaseException
public DBUser[] getMembers() throws GeneralDatabaseException
DBUser
objects.
getMembers
in interface DBContainer
GeneralDatabaseException
public User[] getMembersAsUser() throws GeneralDatabaseException
User
objects.
getMembersAsUser
in interface DBContainer
GeneralDatabaseException
public java.lang.String[] getMemberNames() throws GeneralDatabaseException
getMemberNames
in interface DBContainer
GeneralDatabaseException
public void addMember(DBUser user) throws GeneralDatabaseException, ArgumentException
addMember
in interface DBContainer
user
- The user to add.
ArgumentException
- if the user is already a member of this group.
GeneralDatabaseException
public void removeMember(DBUser user) throws GeneralDatabaseException, ArgumentException
removeMember
in interface DBContainer
user
- The user to remove.
ArgumentException
- if the user is not a member of the group.
GeneralDatabaseException
public void removeAllMembers() throws GeneralDatabaseException
GeneralDatabaseException
public void setAttributes(boolean must) throws InconsistentDatabase, DatabaseError
InconsistentDatabase
DatabaseError
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |