com.aspose.network
Class MapiContact

java.lang.Object
  extended by com.aspose.network.MapiContact
All Implemented Interfaces:
IMapiMessageItem

public final class MapiContact
extends Object
implements IMapiMessageItem

Represents outlook contact information


Method Summary
static MapiContact fromVCard(InputStream stream)
           Reads MapiContact from the specified stream containing vCard.
static MapiContact fromVCard(String filePath)
           Reads MapiContact from the specified vCard file The supported vCard versions are 2.1 and 3.0
 String getBody()
           Gets message body
 MapiContactElectronicAddressPropertySet getElectronicAddresses()
           Specify properties for up to three different e-mail addresses and three different fax addresses
 MapiContactEventPropertySet getEvents()
           Specify events associated with a contact
 String getMessageClass()
           Gets message class
 MapiContactNamePropertySet getNameInfo()
           The properties are used to specify the name of the person represented by the contact
 MapiContactPersonalInfoPropertySet getPersonalInfo()
           Specify other additional contact information
 MapiContactPhysicalAddressPropertySet getPhysicalAddresses()
           Specify three physical addresses: Home Address, Work Address, and Other Address.
 MapiContactProfessionalPropertySet getProfessionalInfo()
           Properties are used to store professional details for the person represented by the contact
 String getSubject()
           Gets message subject
 MapiContactTelephonePropertySet getTelephones()
           Specify telephone numbers for the contact
 MapiMessage getUnderlyingMessage()
           Get the MapiMessage that represent contact
static MapiContact load(InputStream stream)
          Deprecated. 
static MapiContact load(MapiMessage message)
          Deprecated. 
static MapiContact load(String fileName)
          Deprecated. 
 void save(OutputStream stream)
           Saves this MapiContact into the given stream with vCard format.
 void save(OutputStream stream, ContactSaveOptions saveOptions)
           Saves this MapiContact to the given stream using specified save options.
 void save(OutputStream stream, int saveFormat)
           Saves this MapiContact to the given stream with a format using the default options.
 void save(String filePath)
           Saves this MapiContact to the vCard file with a default options.
 void save(String filePath, ContactSaveOptions saveOptions)
           Saves this MapiContact into file using specified save options.
 void save(String filePath, int saveFormat)
           Saves this MapiContact to the specified file with a format using the default options.
 void setElectronicAddresses(MapiContactElectronicAddressPropertySet value)
           
 void setEvents(MapiContactEventPropertySet value)
           
 void setNameInfo(MapiContactNamePropertySet value)
           
 void setPersonalInfo(MapiContactPersonalInfoPropertySet value)
           
 void setPhysicalAddresses(MapiContactPhysicalAddressPropertySet value)
           
 void setProfessionalInfo(MapiContactProfessionalPropertySet value)
           
 void setTelephones(MapiContactTelephonePropertySet value)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getNameInfo

public MapiContactNamePropertySet getNameInfo()

The properties are used to specify the name of the person represented by the contact


setNameInfo

public void setNameInfo(MapiContactNamePropertySet value)

getPersonalInfo

public MapiContactPersonalInfoPropertySet getPersonalInfo()

Specify other additional contact information


setPersonalInfo

public void setPersonalInfo(MapiContactPersonalInfoPropertySet value)

getProfessionalInfo

public MapiContactProfessionalPropertySet getProfessionalInfo()

Properties are used to store professional details for the person represented by the contact


setProfessionalInfo

public void setProfessionalInfo(MapiContactProfessionalPropertySet value)

getTelephones

public MapiContactTelephonePropertySet getTelephones()

Specify telephone numbers for the contact


setTelephones

public void setTelephones(MapiContactTelephonePropertySet value)

getElectronicAddresses

public MapiContactElectronicAddressPropertySet getElectronicAddresses()

Specify properties for up to three different e-mail addresses and three different fax addresses


setElectronicAddresses

public void setElectronicAddresses(MapiContactElectronicAddressPropertySet value)

getPhysicalAddresses

public MapiContactPhysicalAddressPropertySet getPhysicalAddresses()

Specify three physical addresses: Home Address, Work Address, and Other Address. One of the addresses can be marked as the Mailing Address


setPhysicalAddresses

public void setPhysicalAddresses(MapiContactPhysicalAddressPropertySet value)

getEvents

public MapiContactEventPropertySet getEvents()

Specify events associated with a contact


setEvents

public void setEvents(MapiContactEventPropertySet value)

load

@Deprecated
public static MapiContact load(MapiMessage message)
Deprecated. 

Load contact information from MapiMessage

Parameters:
message - MapiMessage
Returns:
outlook contact information
Throws:
Message - сlass does not meet IPM.Contact

load

@Deprecated
public static MapiContact load(String fileName)
Deprecated. 

Load contact information from .msg file

Parameters:
fileName - file name
Returns:
outlook contact information

load

@Deprecated
public static MapiContact load(InputStream stream)
Deprecated. 

Load contact information from stream

Parameters:
stream - stream
Returns:
outlook contact information

fromVCard

public static MapiContact fromVCard(String filePath)

Reads MapiContact from the specified vCard file The supported vCard versions are 2.1 and 3.0

Parameters:
filePath - A file name to read from
Returns:
A read MapiContact
Throws:
ArgumentException - filePath is null or empty

fromVCard

public static MapiContact fromVCard(InputStream stream)

Reads MapiContact from the specified stream containing vCard. The supported vCard versions are 2.1 and 3.0

Parameters:
stream - A stream to read from
Returns:
A read MapiContact
Throws:
ArgumentNullException - stream is null
NotSupportedException - stream does not support reading

getUnderlyingMessage

public MapiMessage getUnderlyingMessage()

Get the MapiMessage that represent contact


save

public void save(String filePath)

Saves this MapiContact to the vCard file with a default options. The supported vCard version is 2.1

Parameters:
filePath - A vCard file name
Throws:
ArgumentException - filePath is null or empty

save

public void save(String filePath,
                 int saveFormat)

Saves this MapiContact to the specified file with a format using the default options. The supported save format is vCard.

Parameters:
filePath - A vCard file name
saveFormat - A save format
Throws:
ArgumentException - filePath is null or empty
NotSupportedException - the specified format is not supported

save

public void save(String filePath,
                 ContactSaveOptions saveOptions)

Saves this MapiContact into file using specified save options. The supported save options is VCardSaveOptions

Parameters:
filePath - A vCard file name
saveOptions - A save options
Throws:
ArgumentException - filePath is null or empty
ArgumentNullException - saveOptions is null
NotSupportedException - some save option is not supported

save

public void save(OutputStream stream)

Saves this MapiContact into the given stream with vCard format. The supported vCard version is 2.1

Parameters:
stream - A stream to save to
Throws:
ArgumentNullException - stream is null
NotSupportedException - stream does not support writing

save

public void save(OutputStream stream,
                 int saveFormat)

Saves this MapiContact to the given stream with a format using the default options. The supported save format is vCard

Parameters:
stream - A stream to save to
saveFormat - A save format
Throws:
ArgumentNullException - stream is null
NotSupportedException - stream does not support writing
NotSupportedException - The specified format is not supported

save

public void save(OutputStream stream,
                 ContactSaveOptions saveOptions)

Saves this MapiContact to the given stream using specified save options. The supported save options is VCardSaveOptions

Parameters:
stream - A stream to save to
saveOptions - A save options
Throws:
ArgumentNullException - stream or saveOptions is null
NotSupportedException - stream does not support writing
ArgumentException - incorrect saveOptions
NotSupportedException - some save option is not supported

getMessageClass

public String getMessageClass()

Gets message class

Value: String that represents message class

Specified by:
getMessageClass in interface IMapiMessageItem

getBody

public String getBody()

Gets message body

Value:

Specified by:
getBody in interface IMapiMessageItem

getSubject

public String getSubject()

Gets message subject

Value:

Specified by:
getSubject in interface IMapiMessageItem


Copyright (c) 2002-2011 Aspose Pty Ltd. All Rights Reserved.