public final class MapiContact extends Object implements IMapiMessageItem
Represents outlook contact information
Constructor and Description |
---|
MapiContact()
Initializes a new instance of the
MapiContact class
|
MapiContact(String displayName,
String electonicAddress)
Initializes a new instance of the
MapiContact class. |
MapiContact(String displayName,
String electonicAddress,
String companyName)
Initializes a new instance of the
MapiContact class. |
MapiContact(String displayName,
String electonicAddress,
String companyName,
String primaryTelephoneNumber)
Initializes a new instance of the
MapiContact class. |
Modifier and Type | Method and Description |
---|---|
static MapiContact |
fromVCard(InputStream stream) |
static MapiContact |
fromVCard(InputStream stream,
Charset encoding) |
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
Value:
|
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
Value: String that represents 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
Value:
|
MapiContactTelephonePropertySet |
getTelephones()
Specify telephone numbers
for the contact
|
MapiMessage |
getUnderlyingMessage()
Get the MapiMessage that represent contact
|
void |
save(OutputStream stream) |
void |
save(OutputStream stream,
ContactSaveOptions saveOptions) |
void |
save(OutputStream stream,
int saveFormat) |
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) |
public MapiContact()
Initializes a new instance of the MapiContact
class
public MapiContact(String displayName, String electonicAddress)
Initializes a new instance of the MapiContact
class.
displayName
- The display name.electonicAddress
- The electonic address.public MapiContact(String displayName, String electonicAddress, String companyName)
Initializes a new instance of the MapiContact
class.
displayName
- The display name.electonicAddress
- The electonic address.companyName
- Name of the company.public MapiContact(String displayName, String electonicAddress, String companyName, String primaryTelephoneNumber)
Initializes a new instance of the MapiContact
class.
displayName
- The display name.electonicAddress
- The electonic address.companyName
- Name of the company.primaryTelephoneNumber
- The telephone number.public MapiContactNamePropertySet getNameInfo()
The properties are used to specify the name of the person represented by the contact
public void setNameInfo(MapiContactNamePropertySet value)
public MapiContactPersonalInfoPropertySet getPersonalInfo()
Specify other additional contact information
public void setPersonalInfo(MapiContactPersonalInfoPropertySet value)
public MapiContactProfessionalPropertySet getProfessionalInfo()
Properties are used to store professional details for the person represented by the contact
public void setProfessionalInfo(MapiContactProfessionalPropertySet value)
public MapiContactTelephonePropertySet getTelephones()
Specify telephone numbers for the contact
public void setTelephones(MapiContactTelephonePropertySet value)
public MapiContactElectronicAddressPropertySet getElectronicAddresses()
Specify properties for up to three different e-mail addresses and three different fax addresses
public void setElectronicAddresses(MapiContactElectronicAddressPropertySet value)
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
public void setPhysicalAddresses(MapiContactPhysicalAddressPropertySet value)
public MapiContactEventPropertySet getEvents()
Specify events associated with a contact
public void setEvents(MapiContactEventPropertySet value)
public static MapiContact fromVCard(String filePath)
Reads MapiContact
from the specified vCard file
The supported vCard versions are 2.1 and 3.0
filePath
- A file name to read fromMapiContact
com.aspose.email.ms.System.IllegalArgumentException
- filePath
is null
or empty
public static MapiContact fromVCard(InputStream stream)
public static MapiContact fromVCard(InputStream stream, Charset encoding)
public MapiMessage getUnderlyingMessage()
Get the MapiMessage that represent contact
public void save(String filePath)
Saves this MapiContact
to the vCard file with a default options.
The supported vCard version is 2.1
filePath
- A vCard file namecom.aspose.email.ms.System.IllegalArgumentException
- filePath
is null
or empty
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.
filePath
- A vCard file namesaveFormat
- A save formatcom.aspose.email.ms.System.IllegalArgumentException
- filePath
is null
or empty
UnsupportedOperationException
- the specified format is not supportedpublic void save(String filePath, ContactSaveOptions saveOptions)
Saves this MapiContact
into file using specified save options.
The supported save options is VCardSaveOptions
filePath
- A vCard file namesaveOptions
- A save optionscom.aspose.email.ms.System.IllegalArgumentException
- filePath
is null
or empty
com.aspose.email.ms.System.IllegalArgumentException
- saveOptions
is null
UnsupportedOperationException
- some save option is not supportedpublic void save(OutputStream stream)
public void save(OutputStream stream, int saveFormat)
public void save(OutputStream stream, ContactSaveOptions saveOptions)
public String getMessageClass()
Gets message class
Value: String that represents message classgetMessageClass
in interface IMapiMessageItem
public String getBody()
Gets message body
Value:getBody
in interface IMapiMessageItem
public String getSubject()
Gets message subject
Value:getSubject
in interface IMapiMessageItem
Copyright (c) 2008-2013 Aspose Pty Ltd. All Rights Reserved.