com.genesyslab.ail
Interface Person

All Superinterfaces:
ConfigObject, IdObject
All Known Subinterfaces:
Agent

public interface Person
extends IdObject, ConfigObject

Representation of a person in the Agent Interaction Layer.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.genesyslab.ail.IdObject
IdObject.ObjectType
 
Method Summary
 boolean changePassword(java.lang.String old_password, java.lang.String new_password)
          Changes the password of this person.
 boolean checkPassword(java.lang.String password)
          Checks the password of this person.
 java.util.Map getAnnex()
          Returns additional information about this person.
 java.lang.String getEmployeeId()
          Returns the employee ID of this person.
 java.lang.String getFirstName()
          Returns the first name of this person.
 java.lang.String getLastName()
          Returns the last name of this person.
 int getLastPasswordErrorCode()
          Returns the error code associated with the last password action.
 java.lang.String getLastPasswordReason()
          Returns additional information about the last password action.
 java.lang.Integer getTenantId()
          Returns the identifier of the Tenant to which this person beongs.
 java.lang.String getUserName()
          Returns the user name of this person.
 boolean isAgent()
          Returns true if this Person is actually an agent.
 boolean isEnabled()
          Returns the Configuration Layer status of the Person object.
 boolean isLastPasswordErrorCodeExternal()
          Returns true if an external server made the authentication.
 void setAnnex(java.util.Map annex)
          Sets the person's annex.
 
Methods inherited from interface com.genesyslab.ail.IdObject
getId, getObjectType
 
Methods inherited from interface com.genesyslab.ail.ConfigObject
exists
 

Method Detail

getFirstName

java.lang.String getFirstName()
Returns the first name of this person.


getLastName

java.lang.String getLastName()
Returns the last name of this person.


getEmployeeId

java.lang.String getEmployeeId()
Returns the employee ID of this person.

See Also:
getUserName()

getUserName

java.lang.String getUserName()
Returns the user name of this person. The user name is another name for the ID. Returns the same value as getId().


isAgent

boolean isAgent()
Returns true if this Person is actually an agent. In this case, the object can be casted onto Agent in order to access agent-related methods.


getAnnex

java.util.Map getAnnex()
Returns additional information about this person. This corresponds to the 'Annex' tab in the Configuration Layer.

Since:
7.0

setAnnex

void setAnnex(java.util.Map annex)
              throws RequestFailedException
Sets the person's annex.

A call to this method replaces all prior annexes with the new specified annexes. If you need to modify only a few values, first get the annex by calling the getAnnex() method. Then make your changes to returned Map and call this setAnnex() method. This modification is then committed to the Configuration Layer.

Parameters:
annex - Map of key-value pairs. Keys are String objects. For details on valid values, refer to AbstractInteraction.setAttachedData(java.lang.String, java.lang.Object).
Throws:
InvalidParameterException - exception thrown if a key is not a String object.
ConfigServiceException - if there is a problem with the Configuration Service.
RequestFailedException
Since:
7.1

checkPassword

boolean checkPassword(java.lang.String password)
Checks the password of this person. Call getLastPasswordReason() to get additional information on the result of this method.

Parameters:
password - the password to test.
Returns:
true if this password is correct.

changePassword

boolean changePassword(java.lang.String old_password,
                       java.lang.String new_password)
Changes the password of this person. Call getLastPasswordReason() to get additional information on the result of this method.

Parameters:
old_password - the current password.
new_password - the new password to set.
Returns:
true if the password was successfully changed.

getLastPasswordReason

java.lang.String getLastPasswordReason()
Returns additional information about the last password action. Call this method after checkPassword(java.lang.String) or changePassword(java.lang.String, java.lang.String).

Since:
7.6.2

getLastPasswordErrorCode

int getLastPasswordErrorCode()
Returns the error code associated with the last password action. Call this method if checkPassword(java.lang.String) or changePassword(java.lang.String, java.lang.String) returned false.

Note: This method returns -1 if the last password action was successful.

Since:
7.6.346

isLastPasswordErrorCodeExternal

boolean isLastPasswordErrorCodeExternal()
Returns true if an external server made the authentication. Call this method if checkPassword(java.lang.String) or changePassword(java.lang.String, java.lang.String) returned false.

Note: The method returns false if the last password action was successful.

Since:
7.6.346

isEnabled

boolean isEnabled()
Returns the Configuration Layer status of the Person object.

Returns:
true if the Person object is enabled in the Configuration Layer.

getTenantId

java.lang.Integer getTenantId()
Returns the identifier of the Tenant to which this person beongs.