|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.dse.applsrv.aa.SecurityObject | +--com.ibm.dse.applsrv.aa.SecurityRole
This class represents a security role.
Fields inherited from class com.ibm.dse.applsrv.aa.SecurityObject |
fs |
Constructor Summary | |
protected |
SecurityRole(java.lang.String nameOfRole)
Create a new instance of a Role with the specified name. |
protected |
SecurityRole(java.lang.String nameOfRole,
RoleHandlerInterface handler)
Create a new instance of a Role with the specified name. |
protected |
SecurityRole(java.lang.String nameOfRole,
java.lang.String handler)
Create a new instance of a Role with the specified name. |
Method Summary | |
protected void |
_save()
A hack to force inheritence of a static method. |
void |
addRight(java.lang.String right)
Add the named right to this role. |
void |
addRights(java.lang.String[] namesOfRights)
Add rights to this role. |
void |
addSubRole(java.lang.String subroleName)
Add a subrole to the current role. |
void |
addSubRoleNCNS(java.lang.String subroleName)
Add a subrole to the current role. |
static void |
controller(SecurityController ctrl)
Set the security controller. |
boolean |
delete()
Delete this role. |
protected static boolean |
delete(java.lang.String nameOfRole)
Delete the named role. |
void |
deleteRight(java.lang.String right)
Delete the named right from this role. |
void |
deleteRights(java.lang.String[] namesOfRights)
Delete the rights from this role. |
protected static boolean |
deleteRoles(java.lang.String[] rolesToDelete,
java.lang.String[] options)
Delete the named roles subject to the specified options. |
void |
deleteSubRole(java.lang.String childRoleName)
Delete a child role from the current role. |
protected static boolean |
disablePersist()
Disable persistence for roles. |
protected static java.util.Enumeration |
enumerationOverRoles()
Return an enumeration over the roles. |
protected static void |
forceSave()
Force a save of the current state of the roles to the database. |
protected static SecurityRole |
get(java.lang.String nameOfRole,
boolean create)
Return the role with the specified name. |
Array |
getAllRights()
Return the list of all rights contained within this role or any subrole thereof. |
Dictionary |
getAttributes()
Return a dictionary containing all of the attributes of this role. |
protected static SecurityPersistence |
getDB()
Return the persistence controller for this class. |
protected static java.lang.String |
getPathName()
Return the pathname of this database of roles. |
protected static boolean |
getPersist()
Return the persistence state for roles. |
Array |
getRights()
Return a copy of the list of rights associated with this role. |
java.lang.String[] |
getRightsAsArray()
Return a copy of the list of rights associated with this role. |
java.lang.String[] |
getRightsAsArrayOrNull()
Return a copy of the list of rights associated with this role. |
RoleHandlerInterface |
getRoleHandler()
Return the handler for this role or null if none is defined. |
java.lang.String |
getRoleHandlerAsString()
Return the name of the handler class associated with the named role. |
protected static java.lang.String[] |
getRoleIds()
Return the list of names of the roles. |
Array |
getSubRoles()
Return a copy of the list of child roles associated with this role. |
java.lang.String[] |
getSubRolesAsArray()
Return a copy of the list of child roles associated with this role. |
java.lang.String[] |
getSubRolesAsArrayOrNull()
Return a copy of the list of child roles associated with this role. |
boolean |
hasDescendant(java.lang.String nameOfRole)
Return true if the named role is this role or one of its descendants. |
boolean |
hasDirectRight(java.lang.String right)
Return true if this role has the specified right. |
boolean |
hasRight(java.lang.String right)
Return true if this role directly or indirectly (via subroles) has the specified right. |
boolean |
isReferencingRight(java.lang.String right)
Return true if the specified right is being referenced. |
protected static void |
load()
Load the current state of the roles from the database. |
protected static Dictionary |
loadr()
Load and return the current state of the roles from the database. |
void |
logoff(SecurityContext context)
Perform logoff handling on this role. |
void |
logon(SecurityContext context,
java.lang.String user,
java.lang.String password,
java.lang.Object object)
Perform logon handling on this role. |
protected static int |
numberOfRoles()
Return the number of roles that are currently defined. |
protected static void |
reset()
Reset the roles. |
void |
resetAttributes()
Reset all attributes of this role with the exception of the role's name. |
protected static Dictionary |
roles()
Return a copy of the dictionary of roles. |
protected static void |
save()
Save the current state of the roles to the database. |
protected static void |
setDB(SecurityPersistence securityPersistence)
Set the persistence controller for this class. |
protected static void |
setFileName(java.lang.String fileName)
Set the filename of this database. |
protected static void |
setPersist(boolean persistence)
Enable or disable persistence for roles. |
void |
setRoleHandler(RoleHandlerInterface handler)
Set the role handler. |
void |
setRoleHandler(java.lang.String handler)
Set the role handler. |
protected static void |
shutdown()
Shutdown the security component. |
void |
signoff(SecurityContext context)
Perform signoff handling on this role. |
void |
signon(SecurityContext context,
java.lang.String user,
java.lang.String password)
Perform signon handling on this role. |
java.lang.String |
toString()
Returns a string representation of this object. |
void |
verify()
Verify this role. |
protected static void |
verifyAll()
Verify the consistancy of this database. |
Methods inherited from class com.ibm.dse.applsrv.aa.SecurityObject |
getData,
getData,
getDataOrNull,
getName,
home,
prefix,
putData,
putData,
setName |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
protected SecurityRole(java.lang.String nameOfRole) throws DSESecurityException
nameOfRole
- String - the name of this role.protected SecurityRole(java.lang.String nameOfRole, RoleHandlerInterface handler) throws DSESecurityException
nameOfRole
- String - the name of this role.handler
- RoleHandlerInterface - the role handler.protected SecurityRole(java.lang.String nameOfRole, java.lang.String handler) throws DSESecurityException
nameOfRole
- String - the name of this role.handler
- String - the name of the class of the role handler.Method Detail |
protected void _save() throws DSESecurityException
public void addRight(java.lang.String right) throws DSESecurityException
right
- String - the name of the right to add.public void addRights(java.lang.String[] namesOfRights) throws DSESecurityException
namesOfRights
- String[] - the names of the rights.public void addSubRole(java.lang.String subroleName) throws DSESecurityException
subroleName
- String - the role to add.public void addSubRoleNCNS(java.lang.String subroleName)
subroleName
- String - the role to add.public static void controller(SecurityController ctrl)
ctrl
- SecurityController - the security controller.public boolean delete() throws DSESecurityException
protected static boolean delete(java.lang.String nameOfRole) throws DSESecurityException
nameOfRole
- String - the name of the role to delete.public void deleteRight(java.lang.String right) throws DSESecurityException
right
- String - the name of the right to delete.public void deleteRights(java.lang.String[] namesOfRights) throws DSESecurityException
namesOfRights
- String[] - the names of the rights.protected static boolean deleteRoles(java.lang.String[] rolesToDelete, java.lang.String[] options) throws DSESecurityException
rolesToDelete
- String[] - the names of the roles to delete.options
- String[] - the options for this command.public void deleteSubRole(java.lang.String childRoleName) throws DSESecurityException
childRoleName
- String - the name of the role to delete.protected static boolean disablePersist()
protected static java.util.Enumeration enumerationOverRoles()
protected static void forceSave() throws DSESecurityException
protected static SecurityRole get(java.lang.String nameOfRole, boolean create) throws DSESecurityException
nameOfRole
- String - the name of the role.create
- boolean - if the role does not exist then if true then create it else just return null.public Array getAllRights()
public Dictionary getAttributes() throws DSESecurityException
protected static SecurityPersistence getDB()
protected static java.lang.String getPathName()
protected static boolean getPersist()
public Array getRights()
public java.lang.String[] getRightsAsArray()
public java.lang.String[] getRightsAsArrayOrNull()
public RoleHandlerInterface getRoleHandler()
public java.lang.String getRoleHandlerAsString()
protected static java.lang.String[] getRoleIds()
public Array getSubRoles()
public java.lang.String[] getSubRolesAsArray()
public java.lang.String[] getSubRolesAsArrayOrNull()
public boolean hasDescendant(java.lang.String nameOfRole)
nameOfRole
- String - the name of the role.public boolean hasDirectRight(java.lang.String right)
right
- String - the name of the right.public boolean hasRight(java.lang.String right)
right
- String - the name of the right.public boolean isReferencingRight(java.lang.String right)
right
- String - the name of the right.protected static void load() throws DSESecurityException
protected static Dictionary loadr() throws DSESecurityException
public void logoff(SecurityContext context) throws DSESecurityException
context
- SecurityContext - the context.public void logon(SecurityContext context, java.lang.String user, java.lang.String password, java.lang.Object object) throws DSESecurityException
context
- SecurityContext - the context.user
- String - the user id.password
- String - the password.object
- Object - an arbitrary object interpreted by the role handler.protected static int numberOfRoles()
protected static void reset() throws DSESecurityException
public void resetAttributes() throws DSESecurityException
protected static Dictionary roles()
protected static void save() throws DSESecurityException
protected static void setDB(SecurityPersistence securityPersistence)
securityPersistence
- SecurityPersistence - the persistence controller.protected static void setFileName(java.lang.String fileName)
fileName
- String - the name of this database.protected static void setPersist(boolean persistence)
persistence
- boolean - true to enable persistence, false to disable it.public void setRoleHandler(RoleHandlerInterface handler) throws DSESecurityException
handler
- RoleHandlerInterface - the role handler.public void setRoleHandler(java.lang.String handler) throws DSESecurityException
handler
- String - the name of the role handler class.protected static void shutdown() throws DSESecurityException
public void signoff(SecurityContext context) throws DSESecurityException
context
- SecurityContext - the context.public void signon(SecurityContext context, java.lang.String user, java.lang.String password) throws DSESecurityException
context
- SecurityContext - the context.user
- String - the user id.password
- String - the password.public java.lang.String toString()
public void verify() throws DSESecurityException
protected static void verifyAll() throws DSESecurityException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |