public final class QualifiedAgent
extends java.lang.Object
implements java.io.Serializable
QualifiedAgent represents an agent (tuple) that has been
authenticated and provides all information the system needs for unique
identification. Each agent tuple consists of the IDs of the agent and a
corresponding organisational position as well as the corresponding names. For
more information on an agent use RichAgent.| Modifier | Constructor and Description |
|---|---|
protected |
QualifiedAgent(long agentID,
java.lang.String agentUserName,
long orgPositionID,
java.lang.String orgPositionName)
Constructs a new
QualifiedAgent for the designated agent and
organisational position ID. |
protected |
QualifiedAgent(long agentID,
java.lang.String agentUserName,
long orgPositionID,
java.lang.String orgPositionName,
java.lang.String userSessionID)
Constructs a new
QualifiedAgent for the designated agent and
organisational position ID as well as the user session ID. |
| Modifier and Type | Method and Description |
|---|---|
static QualifiedAgent |
create(long agentID,
java.lang.String agentUserName,
long orgPositionID,
java.lang.String orgPositionName)
Constructs a new
QualifiedAgent for the designated agent and
organisational position ID. |
static QualifiedAgent |
create(long agentID,
java.lang.String agentUserName,
long orgPositionID,
java.lang.String orgPositionName,
java.lang.String userSessionID)
Constructs a new
QualifiedAgent for the designated agent and
organisational position ID as well as the user session ID. |
boolean |
equals(java.lang.Object obj)
Two
QualifiedAgents are equal if their agent IDs and org position
IDs match. |
protected void |
finalize()
Removes the entry from the intern cache if this object instance is the
JVM-wide used.
|
long |
getAgentID()
Returns the Agent's ID of this result entry.
|
java.lang.String |
getAgentUserName()
Returns the Agent's user name of this result entry.
|
long |
getOrgPositionID()
Returns the OrgPosition ID (of the Agent's OrgPosition) of this result
entry.
|
java.lang.String |
getOrgPositionName()
Returns the OrgPosition name (of the Agent's OrgPosition) of this result
entry.
|
java.lang.String |
getUserSessionID()
Gets the ID of the user session which is provided by various (client)
frameworks.
|
int |
hashCode() |
QualifiedAgent |
intern()
Interns this qualified agent, that is, looks up the designated agent in an
internal map and uses the very same object instance for the same agent,
similar to a singleton.
|
java.lang.String |
toString() |
protected QualifiedAgent(long agentID,
java.lang.String agentUserName,
long orgPositionID,
java.lang.String orgPositionName)
QualifiedAgent for the designated agent and
organisational position ID. Please pay attention to the order as both
parameters are ints. The user session ID will be set to null.agentID - The ID of this agent.agentUserName - The name of this agent.orgPositionID - The ID of the organisational position of the agent.orgPositionName - The name of the organisational position of the
agent.protected QualifiedAgent(long agentID,
java.lang.String agentUserName,
long orgPositionID,
java.lang.String orgPositionName,
java.lang.String userSessionID)
QualifiedAgent for the designated agent and
organisational position ID as well as the user session ID. Please pay
attention to the order as both parameters are ints.agentID - The ID of this agent.agentUserName - The name of this agent.orgPositionID - The ID of the organisational position of the agent.orgPositionName - The name of the organisational position of the
agent.userSessionID - The session ID as provided by various (client)
frameworks like HTTP-Session-IDs.public static QualifiedAgent create(long agentID, java.lang.String agentUserName, long orgPositionID, java.lang.String orgPositionName)
QualifiedAgent for the designated agent and
organisational position ID. Please pay attention to the order as both
parameters are ints. The user session ID will be set to null.agentID - The ID of this agent.agentUserName - The name of this agent.orgPositionID - The ID of the organisational position of the agent.orgPositionName - The name of the organisational position of the
agent.public static QualifiedAgent create(long agentID, java.lang.String agentUserName, long orgPositionID, java.lang.String orgPositionName, java.lang.String userSessionID)
QualifiedAgent for the designated agent and
organisational position ID as well as the user session ID. Please pay
attention to the order as both parameters are ints.agentID - The ID of this agent.agentUserName - The name of this agent.orgPositionID - The ID of the organisational position of the agent.orgPositionName - The name of the organisational position of the
agent.userSessionID - The session ID as provided by various (client)
frameworks like HTTP-Session-IDs.public long getAgentID()
public java.lang.String getAgentUserName()
public long getOrgPositionID()
public java.lang.String getOrgPositionName()
public java.lang.String getUserSessionID()
public QualifiedAgent intern()
String.intern(). protected void finalize()
finalize in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
QualifiedAgents are equal if their agent IDs and org position
IDs match. getUserSessionID() is not considered here!equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object