org.glite.security.voms.database
Interface DBContainer

All Known Implementing Classes:
DBCapability, DBGroup, DBQualifiedRole, DBRole

public interface DBContainer

A simple interface capturing some of the common methods of container classes (DBGroup, DBRole and DBCapability) for easier ACL manipulation.

Author:
Karoly Lorentey

Method Summary
 void addMember(DBUser user)
          Include a user in this container.
 void checkPermission(Operation o)
          Convenience method: check that the client has the necessary privileges to perform the given operation on this container.
 DBACL getACL()
          Return this container's ACL.
 java.lang.String getDN()
          Return the name of this container.
 java.lang.String[] getMemberNames()
          Return the names of all users that are in this container.
 DBUser[] getMembers()
          Return all users that are in this container.
 User[] getMembersAsUser()
          Return all users that are in this container.
 void removeMember(DBUser user)
          Remove a user from this container.
 java.lang.String toString()
          Convert to a human-readable string.
 

Method Detail

getDN

public java.lang.String getDN()
Return the name of this container.


toString

public java.lang.String toString()
Convert to a human-readable string.


getACL

public DBACL getACL()
             throws GeneralDatabaseException
Return this container's ACL.

Throws:
GeneralDatabaseException

getMembers

public DBUser[] getMembers()
                    throws GeneralDatabaseException
Return all users that are in this container.

Throws:
GeneralDatabaseException

getMembersAsUser

public User[] getMembersAsUser()
                        throws GeneralDatabaseException
Return all users that are in this container.

Throws:
GeneralDatabaseException

getMemberNames

public java.lang.String[] getMemberNames()
                                  throws GeneralDatabaseException
Return the names of all users that are in this container.

Throws:
GeneralDatabaseException

checkPermission

public void checkPermission(Operation o)
                     throws GeneralDatabaseException,
                            VOMSSecurityException
Convenience method: check that the client has the necessary privileges to perform the given operation on this container.

Throws:
GeneralDatabaseException
VOMSSecurityException

addMember

public void addMember(DBUser user)
               throws GeneralDatabaseException,
                      ArgumentException
Include a user in this container.

Throws:
GeneralDatabaseException
ArgumentException

removeMember

public void removeMember(DBUser user)
                  throws GeneralDatabaseException,
                         ArgumentException
Remove a user from this container.

Throws:
GeneralDatabaseException
ArgumentException