Class RichAgent
- java.lang.Object
-
- de.aristaflow.adept2.base.sessionmanagement.RichAgent
-
- All Implemented Interfaces:
Serializable
public class RichAgent extends Object implements Serializable
ARichAgentenhances aQualifiedAgentby providing far more information and is therefore a "user-friendly" version of aQualifiedAgent. The latter is used internally to allow for efficient progressing without the unneeded data provided by this class.This data includes a user-readable name for display purpose (instead of IDs or short logon names), a mail address as well as the preferred locale which is used to provide the user-interface with the right language and other locale-specific characteristics.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RichAgent(long agentID, String agentUserName, long orgPositionID, String orgPositionName, String userSessionID, String userReadableName, String mailAddress, Locale locale, Map<String,String> additionalAttributes)Constructs a newRichAgentfor the designated attributes of a qualified agent with the designated additional information on name, mail address and locale as well as the provided map of additional information.RichAgent(QualifiedAgent agent, String userReadableName, String mailAddress, Locale locale, Map<String,String> additionalAttributes)Constructs a newRichAgentfor the designated (qualified) agent with the designated additional information on name, mail address and locale as well as the provided map of additional information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Map<String,String>getAdditionalAttributes()Gets the additional attributes that are stored in the organisational model for this agent.LocalegetLocale()Gets the locale which is configured for this agent.StringgetMailAddress()Gets the mail-address of this agent or null in case the mail-address is not set in the corresponding organisational model.QualifiedAgentgetQualifiedAgent()Gets the agent identifying attributes.StringgetUserReadableName()Gets the name of the agent in a user-readable form.inthashCode()StringtoString()
-
-
-
Constructor Detail
-
RichAgent
public RichAgent(QualifiedAgent agent, String userReadableName, String mailAddress, Locale locale, Map<String,String> additionalAttributes)
Constructs a newRichAgentfor the designated (qualified) agent with the designated additional information on name, mail address and locale as well as the provided map of additional information.- Parameters:
agent- The system identification of this agent.userReadableName- The name of the agent in a user readable form, usually the first and the last name. This may benullbut should not benull.mailAddress- The mail-address of the agent. This may benullbut should not benull.locale- The locale for this agent. If this isnull, the default locale of the JVM will be used.additionalAttributes- Additional attributes as provided by the organisational model. This may benull.
-
RichAgent
public RichAgent(long agentID, String agentUserName, long orgPositionID, String orgPositionName, String userSessionID, String userReadableName, String mailAddress, Locale locale, Map<String,String> additionalAttributes)Constructs a newRichAgentfor the designated attributes of a qualified agent with the designated additional information on name, mail address and locale as well as the provided map of additional information.- Parameters:
agentID- The ID of the (qualified) agent.agentUserName- The name of the (qualified) agent.orgPositionID- The ID of the organisational position of the (qualified) agent.userSessionID- The session ID identifying the agent as provided by various (client) frameworks like HTTP-Session-IDs. This may benull.orgPositionName- The name of the organisational position of the (qualified) agent.userReadableName- The name of the agent in a user readable form, usually the first and the last name. This may benullbut should not benull.mailAddress- The mail-address of the agent. This may benullbut should not be null.locale- The locale for this agent. If this isnull, the default locale of the JVM will be used.additionalAttributes- Additional attributes as provided by the organisational model. This may benull.
-
-
Method Detail
-
getQualifiedAgent
public QualifiedAgent getQualifiedAgent()
Gets the agent identifying attributes.- Returns:
- The attributes identifying the agent.
-
getUserReadableName
public String getUserReadableName()
Gets the name of the agent in a user-readable form. In case this name is not set, the empty string will be returned.- Returns:
- The name of the agent in a user-readable form.
-
getMailAddress
public String getMailAddress()
Gets the mail-address of this agent or null in case the mail-address is not set in the corresponding organisational model. In case the address is not set, the empty string will be returned.- Returns:
- The mail-address of this agent or null in case the mail-address is unknown.
-
getLocale
public Locale getLocale()
Gets the locale which is configured for this agent. This is not necessarily the one used at a client. This may differ, for instance, when the client does not support this locale.- Returns:
- The configured locale for this agent.
-
getAdditionalAttributes
public Map<String,String> getAdditionalAttributes()
Gets the additional attributes that are stored in the organisational model for this agent. The map is unmodifiable and may be empty.- Returns:
- The additional attributes that are stored in the organisational model for this agent.
-
-