Class RichAgent
java.lang.Object
de.aristaflow.adept2.base.sessionmanagement.RichAgent
- All Implemented Interfaces:
Serializable
A
RichAgent enhances a QualifiedAgent by providing
far more information and is therefore a "user-friendly" version of
a QualifiedAgent. 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:
-
Constructor Summary
ConstructorsConstructorDescriptionRichAgent(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
Modifier and TypeMethodDescriptionbooleanGets the additional attributes that are stored in the organisational model for this agent.Gets the locale which is configured for this agent.Gets the mail-address of this agent or null in case the mail-address is not set in the corresponding organisational model.Gets the agent identifying attributes.Gets the name of the agent in a user-readable form.inthashCode()toString()
-
Constructor Details
-
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 Details
-
getQualifiedAgent
Gets the agent identifying attributes.- Returns:
- The attributes identifying the agent.
-
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
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
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
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.
-
toString
-
equals
-
hashCode
public int hashCode()
-