public class RichAgent
extends java.lang.Object
implements java.io.Serializable
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.
| Constructor and Description |
|---|
RichAgent(long agentID,
java.lang.String agentUserName,
long orgPositionID,
java.lang.String orgPositionName,
java.lang.String userSessionID,
java.lang.String userReadableName,
java.lang.String mailAddress,
java.lang.String locale,
java.util.Map<java.lang.String,java.lang.String> additionalAttributes)
Constructs a new
RichAgent for 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,
java.lang.String userReadableName,
java.lang.String mailAddress,
java.lang.String locale,
java.util.Map<java.lang.String,java.lang.String> additionalAttributes)
Constructs a new
RichAgent for the designated (qualified)
agent with the designated additional information on name, mail address and
locale as well as the provided map of additional information. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
java.util.Map<java.lang.String,java.lang.String> |
getAdditionalAttributes()
Gets the additional attributes that are stored in the organisational model
for this agent.
|
java.util.Locale |
getLocale()
Gets the locale which is configured for this agent.
|
java.lang.String |
getMailAddress()
Gets the mail-address of this agent or null in case the mail-address is not
set in the corresponding organisational model.
|
QualifiedAgent |
getQualifiedAgent()
Gets the agent identifying attributes.
|
java.lang.String |
getUserReadableName()
Gets the name of the agent in a user-readable form.
|
int |
hashCode() |
java.lang.String |
toString() |
public RichAgent(QualifiedAgent agent, java.lang.String userReadableName, java.lang.String mailAddress, java.lang.String locale, java.util.Map<java.lang.String,java.lang.String> additionalAttributes)
RichAgent for the designated (qualified)
agent with the designated additional information on name, mail address and
locale as well as the provided map of additional information.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 be null but should
not be null.mailAddress - The mail-address of the agent. This may be null but
should not be null.locale - The locale for this agent. This can be null, the empty string
("") or it has to be in the form
la_cn_variant (la: ISO 639-1 language
code, cn: ISO-3166 country code, variant
: variant of the locale). la or la_cn
are also valid locales. If the locale does not match this scheme,
the default locale will be used.additionalAttributes - Additional attributes as provided by the
organisational model. This may be null.public RichAgent(long agentID,
java.lang.String agentUserName,
long orgPositionID,
java.lang.String orgPositionName,
java.lang.String userSessionID,
java.lang.String userReadableName,
java.lang.String mailAddress,
java.lang.String locale,
java.util.Map<java.lang.String,java.lang.String> additionalAttributes)
RichAgent for 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.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 be
null.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 be null but should
not be null.mailAddress - The mail-address of the agent. This may be null but
should not be null.locale - The locale for this agent. This can be null, the empty string
("") or it has to be in the form
la_cn_variant (la: ISO 639-1 language
code, cn: ISO-3166 country code, variant
: variant of the locale). la or la_cn
are also valid locales. If the locale does not match this scheme,
the default locale will be used.additionalAttributes - Additional attributes as provided by the
organisational model. This may be null.public QualifiedAgent getQualifiedAgent()
public java.lang.String getUserReadableName()
public java.lang.String getMailAddress()
public java.util.Locale getLocale()
public java.util.Map<java.lang.String,java.lang.String> getAdditionalAttributes()
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object