com.auxilii.msgparser
Class RecipientEntry

Object
  extended by com.auxilii.msgparser.RecipientEntry

public class RecipientEntry
extends Object

This class represents a recipient's entry of the parsed .msg file. It provides informations like the email address and the display name.

Author:
thomas.misar, roman.kurmanowytsch

Field Summary
protected static Logger logger
           
protected  Map<Integer,Object> properties
          Contains all properties that are not covered by the special properties.
protected  String toEmail
          The address part of To: mail address.
protected  String toName
          The address part of To: name.
 
Constructor Summary
RecipientEntry()
           
 
Method Summary
 Set<String> getProperties()
          Deprecated. 
 Set<String> getPropertiesAsHex()
          This method provides a convenient way of retrieving property keys for all guys that like to stick to hex values.
 Object getProperty(String name)
          Deprecated. 
 Set<Integer> getPropertyCodes()
          This method returns a list of all available properties.
 Object getPropertyFromHex(String name)
          This method provides a convenient way of retrieving properties for all guys that like to stick to hex values.
 Object getPropertyValue(Integer code)
          This method retrieves the value for a specific property.
 String getToEmail()
           
 String getToName()
           
 void setProperty(MessageProperty msgProp)
          Sets the name/value pair in the properties map.
 void setToEmail(String toEmail)
           
 void setToName(String toName)
           
 String toString()
          Provides a short representation of this recipient object
(e.g.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

protected static final Logger logger

toEmail

protected String toEmail
The address part of To: mail address.


toName

protected String toName
The address part of To: name.


properties

protected Map<Integer,Object> properties
Contains all properties that are not covered by the special properties.

Constructor Detail

RecipientEntry

public RecipientEntry()
Method Detail

setProperty

public void setProperty(MessageProperty msgProp)
                 throws ClassCastException
Sets the name/value pair in the properties map. Some properties are put into special attributes (e.g., toEmail when the property name is '0076').

Parameters:
msgProp - The property to be set.
Throws:
ClassCastException - Thrown if the detected data type does not match the expected data type.

getToEmail

public String getToEmail()
Returns:
the to: email

setToEmail

public void setToEmail(String toEmail)
Parameters:
toEmail - the to email to be set

getToName

public String getToName()
Returns:
the to name

setToName

public void setToName(String toName)
Parameters:
toName - the to name to be set

toString

public String toString()
Provides a short representation of this recipient object
(e.g. 'Firstname Lastname <firstname.lastname@domain.tld>').

Overrides:
toString in class Object
See Also:
Object.toString()

getProperties

@Deprecated
public Set<String> getProperties()
Deprecated. 

This method should no longer be used due to the fact that message properties are now stored with their keys being represented as integers.

Returns:
All available keys properties have been found for.

getPropertiesAsHex

public Set<String> getPropertiesAsHex()
This method provides a convenient way of retrieving property keys for all guys that like to stick to hex values.
Note that this method includes parsing of string values to integers which will be less efficient than using getPropertyCodes().

Returns:
All available keys properties have been found for.

getProperty

@Deprecated
public Object getProperty(String name)
Deprecated. 

This method should no longer be used due to the fact that message properties are now stored with their keys being represented as integers.

Please refer to getPropertyCodes() for dealing with integer based keys.

Returns:
The value for the requested property.

getPropertyFromHex

public Object getPropertyFromHex(String name)
This method provides a convenient way of retrieving properties for all guys that like to stick to hex values.
Note that this method includes parsing of string values to integers which will be less efficient than using getPropertyValue(Integer).

Parameters:
name - The hex notation of the property to be retrieved.
Returns:
The value for the requested property.

getPropertyCodes

public Set<Integer> getPropertyCodes()
This method returns a list of all available properties.

Returns:
All available keys properties have been found for.

getPropertyValue

public Object getPropertyValue(Integer code)
This method retrieves the value for a specific property.
Please refer to getPropertyValue(Integer) for dealing with integer based keys.
NOTE: You can also use fields defined within MAPIProp to easily read certain properties.

Parameters:
code - The key for the property to be retrieved.
Returns:
The value of the specified property.


Copyright © 2007 Roman Kurmanowytsch