|
|||||||||
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.SecurityUser
This class represents a user to the security system.
Fields inherited from class com.ibm.dse.applsrv.aa.SecurityObject |
fs |
Constructor Summary | |
protected |
SecurityUser(java.lang.String user,
java.lang.String password)
Configure a new user with the specified name and password. |
Method Summary | |
protected void |
_save()
A hack to force inheritence of a static method. |
void |
addLimit(SecurityLimit aLimit)
Adds limit to the current user. |
void |
addRight(java.lang.String right)
Add a right to the current user. |
void |
addRights(java.lang.String[] namesOfRights)
Add rights to the current user. |
void |
addRole(java.lang.String role)
Add a role to the current user. |
static void |
controller(SecurityController ctrl)
Set the security controller. |
boolean |
delete()
Delete this user. |
protected static boolean |
delete(java.lang.String user)
Delete the named user. |
boolean |
deleteRight(java.lang.String right)
Delete a right from the current user. |
void |
deleteRights(java.lang.String[] namesOfRights)
Delete the rights from the current user. |
boolean |
deleteRole(java.lang.String role)
Delete a role from the current user. |
protected static boolean |
disablePersist()
Disable persistence for users. |
protected static EncryptionInterface |
encrypter()
Return the encryption engine of this database. |
protected static void |
encrypter(EncryptionInterface anEncrypter)
Set the encryption engine for use by this database. |
protected static java.util.Enumeration |
enumerationOverUsers()
Return an enumeration over the users. |
protected static void |
forceSave()
Force a save of the current state of the configured users to the database. |
protected static SecurityUser |
get(java.lang.String nameOfUser,
java.lang.String password)
Return the user with the specified name. |
Array |
getAccessibleServices()
Return a list of all services accessible by this user. |
Array |
getAccessibleServicesOrNull()
Return a list of all services accessible by this user. |
long |
getActivation()
Return this user's activation time as milliseconds since January 1, 1970, 00:00:00 GMT. |
Array |
getAllContexts()
Return the list of contexts for this user. |
Dictionary |
getAllInheritedData()
Return a dictionary of all data set for this user and data inherited from group memberships. |
Array |
getAllRights()
Return the list of all rights assigned to this user either directly or indirectly via roles/groups or subroles/subgroups thereof. |
Dictionary |
getAttributes()
Return a dictionary containing all of the attributes of this user. |
protected static SecurityPersistence |
getDB()
Return the persistence controller for this class. |
long |
getDuration()
Return this user's duration of activation in milliseconds. |
java.lang.String |
getInheritedData(java.lang.String key)
Return the value of specified key for this user. |
Array |
getLimits()
Returns a copy of the list of limits associated with this user. |
boolean |
getLock()
Return this user's lockout status. |
java.lang.String |
getPassword()
Return the password associated with this user. |
protected static java.lang.String |
getPathName()
Return the pathname of this database of users. |
protected static boolean |
getPersist()
Return the persistence state for users. |
Array |
getRights()
Return a copy of the list of rights associated with this user. |
java.lang.String[] |
getRightsAsArray()
Return a copy of the list of rights associated with this user. |
java.lang.String[] |
getRightsAsArrayOrNull()
Return a copy of the list of rights associated with this user. |
Array |
getRoles()
Return a copy of the list of roles associated with this user. |
java.lang.String[] |
getRolesAsArray()
Return a copy of the list of roles associated with this user. |
java.lang.String[] |
getRolesAsArrayOrNull()
Return a copy of the list of roles associated with this user. |
boolean |
getTimeLock()
Return this user's interval lockout status. |
Dictionary |
getTimesForRights()
Return a copy of the times associated with the rights. |
Dictionary |
getTimesForRightsOrNull()
Return a copy of the times associated with the rights. |
Dictionary |
getTimesForRoles()
Return a copy of the times associated with the roles. |
Dictionary |
getTimesForRolesOrNull()
Return a copy of the times associated with the roles. |
protected static java.lang.String[] |
getUserIds()
Return the list of names of the users. |
boolean |
hasRight(java.lang.String right)
Check if this user has the specified right either in its list of rights or in one of its roles or subroles thereof. |
boolean |
hasRole(java.lang.String role)
Query if this user has a role with the specified name. |
boolean |
hasRole2(java.lang.String role)
Query if this user has a role with the specified name or a reference to it in the timeout table. |
boolean |
hasRoles()
Query if this user has roles. |
boolean |
isDirectlyReferencingRight(java.lang.String right)
Return true if the specified right is being directly referenced by this user. |
boolean |
isLoggedOn()
Return the logon status of this user. |
boolean |
isReferencingRight(java.lang.String right)
Return true if the specified right is being referenced (directly or indirectly). |
boolean |
isReferencingRole(java.lang.String role)
Return true if the specified role is being referenced (directly or indirectly). |
boolean |
isRightActive(java.lang.String right)
Return true if the specified right is active else return false. |
boolean |
limitAccess()
Limit access of this user for the specified interval. |
protected static void |
load()
Load the current state of the configured users from the database. |
protected static Dictionary |
loadr()
Load and return the current state of the configured users from the database. |
boolean |
lock()
Lockout this user. |
protected static int |
numberOfUsers()
Return the number of users that are currently defined. |
protected static boolean |
passwordAccess()
Return the password access control flag. |
protected static void |
passwordAccess(boolean access)
Enable or disable password access for users. |
protected static void |
reset()
Reset the configured users. |
protected static void |
resetAdm()
Recreate user "admin" with all of its default attributes. |
void |
resetAttributes()
Reset all attributes of this user with the exception of the user's name. |
protected static void |
resetPrimitive()
Reset the configured users. |
protected static void |
save()
Save the current state of the configured users to the database. |
void |
setActivation(long time)
Set this user's activation time as milliseconds since January 1, 1970, 00:00:00 GMT. |
void |
setAttributes(Dictionary attributes,
boolean set)
Set the attributes of this user. |
protected static void |
setDB(SecurityPersistence securityPersistence)
Set the persistence controller for this class. |
void |
setDuration(long time)
Set this user's duration of activation in milliseconds. |
protected static void |
setFileName(java.lang.String fileName)
Set the filename of this database. |
void |
setPassword(java.lang.String password)
Set the password for this user. |
protected static void |
setPersist(boolean persistence)
Enable or disable persistence for users. |
void |
setRightInterval(java.lang.String right,
long start,
long duration)
Set the start and duration of the specified right. |
void |
setRights(Array rights)
Set the rights for this user. |
void |
setRights(java.lang.String[] rights)
Set the rights for this user. |
void |
setRightsInterval(Array nameOfRights,
long start,
long duration)
Set the start and duration of the specified rights. |
void |
setRoleInterval(java.lang.String role,
long start,
long duration)
Set the start and duration of the specified role. |
void |
setRoles(Array roles)
Set the roles for this user. |
void |
setRoles(java.lang.String[] roles)
Set the roles for this user. |
void |
setRolesInterval(Array nameOfRoles,
long start,
long duration)
Set the start and duration of the specified roles. |
protected static void |
shutdown()
Shutdown the security component. |
java.lang.String |
toString()
Returns a string representation of this object. |
boolean |
unlimitedAccess()
Grant unlimited access of this user (if not otherwise restricted). |
boolean |
unlock()
Unlock this user. |
protected static Dictionary |
users()
Return a copy of the dictionary of configured users. |
void |
verify()
Verify this user. |
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 SecurityUser(java.lang.String user, java.lang.String password) throws DSESecurityException
user
- String - the login id of this user.password
- String - the password.Method Detail |
protected void _save() throws DSESecurityException
public void addLimit(SecurityLimit aLimit) throws DSESecurityException
aLimit
- SecurityLimit - the limit to add to the user.public void addRight(java.lang.String right) throws DSESecurityException
right
- String - the name of the right.public void addRights(java.lang.String[] namesOfRights) throws DSESecurityException
namesOfRights
- String[] - the names of the rights.public void addRole(java.lang.String role) throws DSESecurityException
role
- String - the name of the role.public static void controller(SecurityController ctrl)
ctrl
- SecurityController - the security controller.public boolean delete() throws DSESecurityException
protected static boolean delete(java.lang.String user) throws DSESecurityException
user
- String - the name of the user to delete.public boolean deleteRight(java.lang.String right) throws DSESecurityException
right
- String - the name of the right.public void deleteRights(java.lang.String[] namesOfRights) throws DSESecurityException
namesOfRights
- String[] - the names of the rights.public boolean deleteRole(java.lang.String role) throws DSESecurityException
role
- String - the name of the role.protected static boolean disablePersist()
protected static EncryptionInterface encrypter()
protected static void encrypter(EncryptionInterface anEncrypter)
anEncrypter
- EncryptionInterface - the encryption engine.protected static java.util.Enumeration enumerationOverUsers()
protected static void forceSave() throws DSESecurityException
protected static SecurityUser get(java.lang.String nameOfUser, java.lang.String password) throws DSESecurityException
nameOfUser
- String - the name of the user.password
- String - if not null then this will be the password of the newly created user.public Array getAccessibleServices()
public Array getAccessibleServicesOrNull()
public long getActivation()
public Array getAllContexts()
public Dictionary getAllInheritedData()
public Array getAllRights() throws DSESecurityException
public Dictionary getAttributes() throws DSESecurityException
protected static SecurityPersistence getDB()
public long getDuration()
public java.lang.String getInheritedData(java.lang.String key)
key
- String - the name of the data item.public Array getLimits()
public boolean getLock()
public java.lang.String getPassword()
protected static java.lang.String getPathName()
protected static boolean getPersist()
public Array getRights()
public java.lang.String[] getRightsAsArray()
public java.lang.String[] getRightsAsArrayOrNull()
public Array getRoles()
public java.lang.String[] getRolesAsArray()
public java.lang.String[] getRolesAsArrayOrNull()
public boolean getTimeLock()
public Dictionary getTimesForRights()
public Dictionary getTimesForRightsOrNull()
public Dictionary getTimesForRoles()
public Dictionary getTimesForRolesOrNull()
protected static java.lang.String[] getUserIds()
public boolean hasRight(java.lang.String right)
right
- String - the right to check for [dont validate the right itself].public boolean hasRole(java.lang.String role)
public boolean hasRole2(java.lang.String role)
public boolean hasRoles()
public boolean isDirectlyReferencingRight(java.lang.String right)
right
- String - the name of the right.public boolean isLoggedOn()
public boolean isReferencingRight(java.lang.String right)
right
- String - the name of the right.public boolean isReferencingRole(java.lang.String role)
role
- String - the name of the role.public boolean isRightActive(java.lang.String right)
right
- String - the name of the right.public boolean limitAccess() throws DSESecurityException
protected static void load() throws DSESecurityException
protected static Dictionary loadr() throws DSESecurityException
public boolean lock() throws DSESecurityException
protected static int numberOfUsers()
protected static boolean passwordAccess()
protected static void passwordAccess(boolean access)
access
- boolean - true to enable access, false to disable it.protected static void reset() throws DSESecurityException
protected static void resetAdm() throws DSESecurityException
public void resetAttributes() throws DSESecurityException
protected static void resetPrimitive()
protected static void save() throws DSESecurityException
public void setActivation(long time) throws DSESecurityException
time
- long - this user's activation time as milliseconds since January 1, 1970, 00:00:00 GMT.public void setAttributes(Dictionary attributes, boolean set) throws DSESecurityException
attributes
- Dictionary - the new attributes.set
- boolean - if true then set all the attributes else change the specified attributes only.protected static void setDB(SecurityPersistence securityPersistence)
securityPersistence
- SecurityPersistence - the persistence controller.public void setDuration(long time) throws DSESecurityException
time
- long - this user's duration of activation in milliseconds.protected static void setFileName(java.lang.String fileName)
fileName
- String - the name of this database.public void setPassword(java.lang.String password) throws DSESecurityException
password
- String - the password.protected static void setPersist(boolean persistence)
persistence
- boolean - true to enable persistence, false to disable it.public void setRightInterval(java.lang.String right, long start, long duration) throws DSESecurityException
right
- String - the name of the right.start
- long - the starting millisecond.duration
- long - the duration in milliseconds.public void setRights(java.lang.String[] rights) throws DSESecurityException
rights
- String[] - the rights.public void setRights(Array rights) throws DSESecurityException
rights
- Array - the rights.public void setRightsInterval(Array nameOfRights, long start, long duration) throws DSESecurityException
nameOfRights
- Array - the list of the rights.start
- long - the starting millisecond.duration
- long - the duration in milliseconds.public void setRoleInterval(java.lang.String role, long start, long duration) throws DSESecurityException
role
- String - the name of the role.start
- long - the starting millisecond.duration
- long - the duration in milliseconds.public void setRoles(java.lang.String[] roles) throws DSESecurityException
roles
- String[] - the roles.public void setRoles(Array roles) throws DSESecurityException
roles
- Array - the roles.public void setRolesInterval(Array nameOfRoles, long start, long duration) throws DSESecurityException
nameOfRoles
- Array - the list of the roles.start
- long - the starting millisecond.duration
- long - the duration in milliseconds.protected static void shutdown() throws DSESecurityException
public java.lang.String toString()
public boolean unlimitedAccess() throws DSESecurityException
public boolean unlock() throws DSESecurityException
protected static Dictionary users()
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 |