|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.autonomy.aci.businessobjects.AciBusinessObject
com.autonomy.aci.businessobjects.User
Represents a user entry on IDOL Server.
A User
should be read from IDOL using the UserFunctionality
interface using the username:
IDOLService idolService = new IDOLService(); ... UserFunctionality userFun = idolService.useUserFunctionality(); User user = userFun.getUser(sUserName)
Modifying the user's fields, roles, privileges and security details using the public access
methods only changes the values for these user parameters on the local object. To update the
user details on the IDOL service you then need to send the modified user object using
the UserFunctionality
interface:
userFun.updateUser(user)
IDOLService
,
UserFunctionality
,
Serialized FormField Summary | |
static int |
DEFAULT_MAX_AGENTS
The default maximum number of agents that a user can have. |
Constructor Summary | |
User()
|
|
User(java.lang.String sUsername)
Construct a User object for a user with the given username. |
Method Summary | |
void |
addPrivilege(Privilege privilege)
Add a privilege to those already enjoyed by this user. |
void |
addRole(Role role)
Add a role to the set of roles this user belongs to. |
void |
addSecurityType(SecurityType securityType)
Add a repository or authentication security type to those already set on this user. |
void |
clearPrivileges()
Remove all privileges from this user. |
void |
clearRoles()
Remove this user from all roles. |
void |
clearSecurityTypes()
Deletes all security information for this user. |
void |
clearUserFields()
Deletes all existing user fields and their values. |
java.lang.String |
getEmail()
Read the email address of this user. |
int |
getMaxAgents()
Read the maximum number of agents that this user can own. |
int |
getNumAgents()
Read the number of agents that this user currently owns. |
java.lang.String |
getPassword()
Read the password of this user. |
java.util.ArrayList |
getPrivileges()
Read the privileges that this user enjoys. |
java.util.ArrayList |
getPrivilegeValues(java.lang.String sPrivilegeName)
Read the values of a given privilege for this user. |
java.util.ArrayList |
getRoles()
Read the roles that this user belongs to. |
java.lang.String |
getSecurityInfo()
Read the security information string of this user. |
java.util.ArrayList |
getSecurityTypes()
Read the security types (repository and authentication) set for this user. |
java.util.Set |
getUserFieldNames()
Read all the fields and their values set on this user. |
java.lang.String |
getUserFieldValue(java.lang.String sFieldname)
Read the value of a user field. |
java.lang.String |
getUserFieldValue(java.lang.String sFieldname,
java.lang.String sDefaultValue)
Read the value of a user field. |
java.lang.String |
getUserID()
Read the unique ID of the user's IDOL entry. |
java.lang.String |
getUsername()
Read the username of the user represented by this User object. |
boolean |
isUserInRole(Role role)
Checks the role permissions to see if the user belongs to the given role. |
void |
removePrivilege(Privilege privilege)
Remove a privilege from those currently enjoyed by this user. |
void |
removeRole(Role role)
Remove a role from the set of roles this user belongs to. |
void |
removeSecurityType(SecurityType securityType)
Remove a repository or authentication security type from those currently set on this user. |
void |
removeUserField(java.lang.String sFieldname)
Deletes the user field entry for the specified field, if it exists. |
void |
setEmail(java.lang.String sEmailAddress)
Set the email address for this user. |
void |
setMaxAgents(int nMaxAgents)
Set the value for the maximum number of agents this user can have. |
void |
setNumAgents(int nNumAgents)
Set the value for the number of agents this user currently has. |
void |
setPassword(java.lang.String sPassword)
Set the password for this user. |
void |
setPrivileges(java.util.ArrayList alPrivileges)
Set the names and values of the privileges that this user enjoys. |
void |
setRoles(java.util.ArrayList alRoles)
Set the list of roles that this user belongs to. |
void |
setSecurityInfo(java.lang.String sSecurityInfo)
Set the security information for this user. |
void |
setSecurityTypes(java.util.ArrayList alSecurityTypes)
Set all the security types for this user. |
void |
setUserField(java.lang.String sFieldname,
java.lang.String sFieldValue)
Set the value of a user field. |
void |
setUserFields(java.util.HashMap fieldMap)
Replaces any existing user fields with those provided. |
void |
setUserID(java.lang.String sUserID)
Set the ID of the user. |
void |
setUsername(java.lang.String sUsername)
Set the name of this user. |
java.lang.String |
toString()
Assembles all the available user information into a string to easy viewing. |
Methods inherited from class com.autonomy.aci.businessobjects.AciBusinessObject |
getUID, setUID |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int DEFAULT_MAX_AGENTS
Constructor Detail |
public User()
public User(java.lang.String sUsername)
User
object for a user with the given username.
sUsername
- the name of the user.Method Detail |
public void setUserID(java.lang.String sUserID)
UserNotFoundException
s being throw
when using methods from the ACI Services API.
sUserID
- the UID for the user.public void setUsername(java.lang.String sUsername)
sUsername
- the name of this user.public void setPassword(java.lang.String sPassword)
sPassword
- the password for this user.public void setEmail(java.lang.String sEmailAddress)
sEmailAddress
- the email address for this user.public void setSecurityInfo(java.lang.String sSecurityInfo)
Set the security information for this user. This is an encrypted string constructed by
IDOL using the user's repository information and its value on IDOL is not modified when
updating the user. To modify the security information for a user, you should change the
user's repository information (using setSecurityTypes
) and update the user
entry on IDOL using UserFunctionality.updateUser
- this returns an updated
user object with the new security information string set.
(This method is only intended to be used by the ACI Service API classes themselves.)
public void setUserFields(java.util.HashMap fieldMap)
Map
must be String
s.
fieldMap
- a Map
assosciating String
pairs representing the field names and values.public void setUserField(java.lang.String sFieldname, java.lang.String sFieldValue)
sFieldname
- the name of the user field to set.sFieldValue
- the value to give the field.public void removeUserField(java.lang.String sFieldname)
sFieldname
- the name of the field to delete.public void clearUserFields()
public void setSecurityTypes(java.util.ArrayList alSecurityTypes)
alSecurityTypes
- an ArrayList
of SecurityTypes
s giving
details of all the security types for this user.public void addSecurityType(SecurityType securityType)
securityType
- details of the security type and the values to use for this user.public void removeSecurityType(SecurityType securityType)
securityType
- the security type to remove (only needs to have the security type
name set).public void clearSecurityTypes()
public void setRoles(java.util.ArrayList alRoles)
alRoles
- an ArrayList
of Role
s giving all the roles this
user belongs to.public void addRole(Role role)
role
- the role to add.public void removeRole(Role role)
role
- the role to remove.public void clearRoles()
public void setPrivileges(java.util.ArrayList alPrivileges)
alPrivileges
- an ArrayList
of Privilege
objects giving
all the privileges for this user.public void addPrivilege(Privilege privilege)
privilege
- the privilege to add.public void removePrivilege(Privilege privilege)
privilege
- the privilege to remove.public void clearPrivileges()
public void setMaxAgents(int nMaxAgents)
nMaxAgents
- the maximum number of agents.public void setNumAgents(int nNumAgents)
nNumAgents
- the number of agents this user has.public java.lang.String getUsername()
User
object.
public java.lang.String getUserID()
public java.lang.String getPassword()
public java.lang.String getEmail()
public java.lang.String getSecurityInfo()
public java.util.ArrayList getSecurityTypes()
ArrayList
of SecurityType
s objects giving
the security details for this user.public java.util.Set getUserFieldNames()
public java.lang.String getUserFieldValue(java.lang.String sFieldname, java.lang.String sDefaultValue)
sFieldname
- the name of the user field.sDefaultValue
- the value to return if the field does not exist or is empty.
public java.lang.String getUserFieldValue(java.lang.String sFieldname)
sFieldname
- the name of the user field.
null
if the field does not exist or does
not have a value.public java.util.ArrayList getRoles()
ArrayList
of Role
s objects giving the roles this
user belongs to.public boolean isUserInRole(Role role)
role
- the role to check for.
true
if the user belongs to the given role, false
otherwise.public java.util.ArrayList getPrivileges()
ArrayList
of Privilege
s objects giving the privileges this
user enjoys.public java.util.ArrayList getPrivilegeValues(java.lang.String sPrivilegeName)
sPrivilegeName
- the name of the privilege whose values are required.
ArrayList
of String
s giving the values that the user
has set for the privilege.public int getMaxAgents()
public int getNumAgents()
public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |