ContactCenters
V. 0.9.9.

umontreal.iro.lecuyer.xmlbind
Class NamedInfo

java.lang.Object
  extended by umontreal.iro.lecuyer.xmlbind.NamedInfo
Direct Known Subclasses:
AgentGroupManager, AgentInfo, CallSourceManager, SegmentInfo

public class NamedInfo
extends Object

Represents the information about an entity with a name and possibly properties. This object is constructed from a Named instance which is obtained by unmarshalling some XML elements using JAXB. It allows the user to access the properties using a Java map rather than a list with an object for each property. This class is often extended to represent specific entities, for example the call types of a call center.


Constructor Summary
NamedInfo(Named named)
          Constructs a new named entity from the parameter object named.
NamedInfo(String name)
          Constructs a named entity with name name, and no property.
NamedInfo(String name, Map<String,? extends Object> properties)
          Constructs a new named entity with name name, and properties stored in the map properties.
 
Method Summary
 String getName()
          Returns the name associated with this named entity.
 Map<String,Object> getProperties()
          Returns the properties associated with the entity represented by this object.
 Map<String,String> getStringProperties()
          Returns a map constructed by converting each value of properties in map returned by getProperties() to a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NamedInfo

public NamedInfo(Named named)
Constructs a new named entity from the parameter object named.

Parameters:
named - the parameter object representing the named entity.

NamedInfo

public NamedInfo(String name)
Constructs a named entity with name name, and no property.

Parameters:
name - the name of the new entity.

NamedInfo

public NamedInfo(String name,
                 Map<String,? extends Object> properties)
Constructs a new named entity with name name, and properties stored in the map properties. Each key of the given map represents the name of a property while the corresponding value in the map is the value of the property.

Parameters:
name - the name of the entity.
properties - the properties of the entity.
Method Detail

getName

public String getName()
Returns the name associated with this named entity. This returns null if no name is associated.

Returns:
the associated name.

getProperties

public Map<String,Object> getProperties()
Returns the properties associated with the entity represented by this object. Each key of the returned map represents the name of a property while the corresponding value in the map is the value of the property.

Returns:
the associated properties.

getStringProperties

public Map<String,String> getStringProperties()
Returns a map constructed by converting each value of properties in map returned by getProperties() to a string. If a property has the null value, it is converted to the ``null'' string.

Returns:
the properties, with their values converted to strings.

ContactCenters
V. 0.9.9.

To submit a bug or ask questions, send an e-mail to Richard Simard.