|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.glite.security.voms.database.DBAdmin
A class representing VO administrators. Essentially, a wrapper class for the admin table. Administrators are entities that can appear in ACLs. There are two kinds of admin entries: aggregate admins and individual admins. Aggregate admins are special aliases for groups/roles or other sets of individuals in this or another VO -- they help with privilege maintenance. CreatedBy fields are always filled in with (automatically created) individual admin values, not the aggregate admin that the client got authorized with. The CA of an aggregate admin is always the internal virtual CA, but an admin with the internal CA is not necessarily an aggregate admin.
It is not necessary for an admin to be a member of the VO served by this VOMS instance. The mere fact that someone appears in the admins table does not grant any privileges to that user, it only means that the user has previously changed the database or has had the rights to do so. (Admins are mostly for auditing and less for authorizing.)
Currently there are no provisions for deleting an admin from the database, but if the need arises, it would be straightforward to implement an expiration mechanism.
This class is somewhat special in that its methods may be used with both ClientTransactions and DirectUpdates.
Method Summary | |
java.lang.Object |
clone()
Return a copy of this instance. |
static DBAdmin |
create(java.lang.String dn,
DBCA ca)
|
static DBAdmin |
createSelf(Update u,
java.lang.String dn,
DBCA ca)
|
boolean |
equals(java.lang.Object o)
|
DBUser |
getAsDBUser()
|
User |
getAsUser()
Return this as a User. |
DBCA |
getCA()
Return the CA of this admin. |
java.lang.String |
getCADN()
Return the name of this admin's CA. |
int |
getCAId()
Return the id of the CA of this admin. |
DBAdmin |
getCreatedBy()
Return the admin who created this admin. |
long |
getCreatedById()
Return the id of the admin who last modified this admin. |
long |
getCreatedSerial()
Return the serial number of the transaction that last modified this admin. |
java.lang.String |
getDN()
Return the DN of this admin. |
long |
getId()
Return the id of this admin. |
static DBAdmin |
getInstance(long id)
Return the DBAdmin instance with the given id. |
static DBAdmin |
getInstance(java.lang.String name,
DBCA ca)
Return the DBAdmin instance identified by name and CA. |
static DBAdmin |
getInstance(Transaction t,
long id)
Return the DBAdmin instance with the given id. |
static DBAdmin |
getInstance(Transaction t,
java.lang.String name,
DBCA ca)
Return the DBAdmin instance identified by name and CA. |
static DBAdmin |
getInstanceFromAttribute(java.lang.String attribute)
|
static DBAdmin |
getInstanceFromCapability(java.lang.String groupname,
java.lang.String rolename,
java.lang.String capability)
|
static DBAdmin |
getInstanceFromGroup(java.lang.String groupname)
|
static DBAdmin |
getInstanceFromRole(java.lang.String qualifiedRole)
|
java.lang.Object[] |
getKeys()
Return the keys that are used to refer to this instance in RowCache. |
boolean |
needsRefresh()
Return true if it is time to refresh this row. |
void |
refresh()
Refresh this row, i.e. retrieve it again from the database. |
java.lang.String |
toString()
Convert to a human-readable string representation. |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
public static DBAdmin getInstance(Transaction t, java.lang.String name, DBCA ca) throws GeneralDatabaseException, NotInDatabase, ArgumentException
GeneralDatabaseException
NotInDatabase
ArgumentException
public static DBAdmin getInstance(Transaction t, long id) throws GeneralDatabaseException, NotInDatabase
GeneralDatabaseException
NotInDatabase
public static DBAdmin getInstance(java.lang.String name, DBCA ca) throws GeneralDatabaseException, NotInDatabase, ArgumentException
GeneralDatabaseException
NotInDatabase
ArgumentException
public static DBAdmin getInstance(long id) throws GeneralDatabaseException, NotInDatabase
GeneralDatabaseException
NotInDatabase
public static DBAdmin getInstanceFromAttribute(java.lang.String attribute) throws GeneralDatabaseException, NotInDatabase, ArgumentException
GeneralDatabaseException
NotInDatabase
ArgumentException
public static DBAdmin getInstanceFromGroup(java.lang.String groupname) throws GeneralDatabaseException, NotInDatabase, ArgumentException
GeneralDatabaseException
NotInDatabase
ArgumentException
public static DBAdmin getInstanceFromRole(java.lang.String qualifiedRole) throws GeneralDatabaseException, NotInDatabase, ArgumentException
GeneralDatabaseException
NotInDatabase
ArgumentException
public static DBAdmin getInstanceFromCapability(java.lang.String groupname, java.lang.String rolename, java.lang.String capability) throws DatabaseError, NotInDatabase, InconsistentDatabase, ArgumentException
DatabaseError
NotInDatabase
InconsistentDatabase
ArgumentException
public boolean needsRefresh()
Cacheable
needsRefresh
in interface Cacheable
public void refresh()
Cacheable
refresh
in interface Cacheable
public java.lang.Object[] getKeys()
Cacheable
getKeys
in interface Cacheable
public java.lang.Object clone()
Cacheable
clone
in interface Cacheable
public boolean equals(java.lang.Object o)
public long getId()
public int getCAId()
getCA
instead of this method.
getCA()
public java.lang.String getDN()
public java.lang.String toString()
public long getCreatedById()
getCreatedBy
instead of this method.
getCreatedBy()
public long getCreatedSerial()
public DBCA getCA() throws GeneralDatabaseException
GeneralDatabaseException
public DBAdmin getCreatedBy() throws GeneralDatabaseException, NotInDatabase
NotInDatabase
- if the creator has been deleted from the database.
GeneralDatabaseException
public java.lang.String getCADN() throws GeneralDatabaseException
GeneralDatabaseException
public static DBAdmin create(java.lang.String dn, DBCA ca) throws ArgumentException, GeneralDatabaseException
ArgumentException
GeneralDatabaseException
public static DBAdmin createSelf(Update u, java.lang.String dn, DBCA ca) throws ArgumentException, GeneralDatabaseException
ArgumentException
GeneralDatabaseException
public User getAsUser() throws GeneralDatabaseException, NotInDatabase
GeneralDatabaseException
NotInDatabase
public DBUser getAsDBUser() throws GeneralDatabaseException, NotInDatabase
GeneralDatabaseException
NotInDatabase
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |