|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.edg.security.voms.database.DBCapability
A class representing capabilities in a VO. Essentially, a wrapper class for the capabilities table.
Field Summary | |
private long |
acl
The id of this capability's ACL. |
private static ContainerNamingScheme |
cns
The container naming scheme for this instance of VOMS. |
private long |
createdBy
The id of the client who created this capability. |
private long |
createdSerial
The number of the transaction that committed this capability. |
private long |
id
The id of this capability. |
private static int |
ID
|
private static org.apache.log4j.Logger |
log
Logger. |
private java.lang.String |
name
The name of this capability, in display form. |
private static int |
NAME
|
(package private) static Sequence |
seq
Sequence. |
Constructor Summary | |
private |
DBCapability(long id)
Initialize a new DBCapability from the given id. |
private |
DBCapability(java.lang.String name)
Initialize a new DBCapability from the given name. |
Method Summary | |
void |
addMember(DBUser user)
|
void |
checkPermission(Operation o)
Convenience method: check that the client has the necessary privileges to perform the given operation on this capability. |
static int |
countCapabilities()
Return the number of capabilities in this VO. |
int |
countMembers()
Returns the number of users that have this capability. |
static DBCapability |
createCapability(java.lang.String name)
Creates a new capability. |
void |
deleteCapability()
Delete this capability. |
DBACL |
getACL()
Return this capability's ACL. |
(package private) long |
getACLId()
Return the ACL id of this capability. |
static java.lang.String[] |
getCapabilityNames()
Returns the names of all capabilities in this VO. |
DBAdmin |
getCreatedBy()
Return the user who created this capability. |
long |
getCreatedByid()
Return the id of the user who created this capability. |
long |
getCreatedSerial()
Return the serial number of the transaction that committed this capability. |
java.lang.String |
getDN()
Return the name of this capability. |
(package private) long |
getId()
Return the id of this capability. |
(package private) static DBCapability |
getInstance(long id)
Returns a DBCapability object representing the capability with the given id. |
static DBCapability |
getInstance(java.lang.String name)
Returns a DBCapability object representing the name capability. |
DBUser[] |
getMembers()
|
User[] |
getMembersAsUser()
|
private void |
initialize(int from)
Retrieve the given capability from the database. |
boolean |
isMember(DBUser user)
|
void |
removeAllMembers()
|
void |
removeMember(DBUser user)
|
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 |
private static final org.apache.log4j.Logger log
private java.lang.String name
private long id
private long acl
private long createdBy
private long createdSerial
static final Sequence seq
private static ContainerNamingScheme cns
private static final int NAME
private static final int ID
Constructor Detail |
private DBCapability(java.lang.String name) throws GeneralDatabaseException, NotInDatabase, ArgumentException
private DBCapability(long id) throws GeneralDatabaseException, NotInDatabase
Method Detail |
private void initialize(int from) throws GeneralDatabaseException, NotInDatabase, ArgumentException
GeneralDatabaseException
NotInDatabase
ArgumentException
public static DBCapability getInstance(java.lang.String name) throws GeneralDatabaseException, NotInDatabase, ArgumentException
name
- The name of the capability.
NotInDatabase
- If there is no such group in the database.
GeneralDatabaseException
ArgumentException
static DBCapability getInstance(long id) throws GeneralDatabaseException, NotInDatabase
id
- The id of the capable.
NotInDatabase
- If there is no such group in the database.
GeneralDatabaseException
long getId()
public java.lang.String getDN()
getDN
in interface DBContainer
public java.lang.String toString()
toString
in interface DBContainer
toString
in class java.lang.Object
long getACLId()
getACL
instead of this method.
public long getCreatedByid()
getCreatedBy
instead of this
method.
public long getCreatedSerial()
public DBACL getACL() throws DatabaseError, InconsistentDatabase
getACL
in interface DBContainer
DatabaseError
InconsistentDatabase
public DBAdmin getCreatedBy() throws GeneralDatabaseException, NotInDatabase, ArgumentException
GeneralDatabaseException
NotInDatabase
ArgumentException
public void checkPermission(Operation o) throws GeneralDatabaseException, VOMSSecurityException
checkPermission
in interface DBContainer
GeneralDatabaseException
VOMSSecurityException
public int countMembers() throws GeneralDatabaseException
GeneralDatabaseException
public boolean isMember(DBUser user) throws GeneralDatabaseException
GeneralDatabaseException
public DBUser[] getMembers() throws GeneralDatabaseException
GeneralDatabaseException
public User[] getMembersAsUser() throws GeneralDatabaseException
GeneralDatabaseException
public void addMember(DBUser user) throws GeneralDatabaseException
GeneralDatabaseException
public void removeMember(DBUser user) throws GeneralDatabaseException
GeneralDatabaseException
public void removeAllMembers() throws GeneralDatabaseException
GeneralDatabaseException
public static DBCapability createCapability(java.lang.String name) throws GeneralDatabaseException, ArgumentException
name
- The name of the new capability.
DBRole
object corresponding to the newly created capability.
ArgumentException
- if the capability is already in the database.
GeneralDatabaseException
public void deleteCapability() throws GeneralDatabaseException, ArgumentException
GeneralDatabaseException
ArgumentException
public static int countCapabilities() throws GeneralDatabaseException
GeneralDatabaseException
public static java.lang.String[] getCapabilityNames() throws GeneralDatabaseException
GeneralDatabaseException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |