public final class MapiContact extends MapiMessageItemBase
Represents outlook contact information
attachments, namedPropertyMappingStorage, recipients
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)
Reads
MapiContact from the specified stream containing vCard. |
static MapiContact |
fromVCard(InputStream stream,
Charset encoding)
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 |
static MapiContact |
fromVCard(String filePath,
Charset encoding)
Reads
MapiContact from the specified vCard file
The supported vCard versions are 2.1 and 3.0 |
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 |
getItemId()
Uses to specify the server id of the contact
EWS only
|
MapiContactNamePropertySet |
getNameInfo()
The properties are used to specify the name
of the person represented by the contact
|
MapiContactOtherPropertySet |
getOtherFields()
Specify other fields of conhtact.
|
MapiContactPersonalInfoPropertySet |
getPersonalInfo()
Specify other additional contact information
|
MapiContactPhoto |
getPhoto()
Contains contact photo
MapiContactPhoto . |
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
|
MapiContactTelephonePropertySet |
getTelephones()
Specify telephone numbers
for the contact
|
MapiMessage |
getUnderlyingMessage()
Get the MapiMessage that represent contact.
|
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 |
setBodyContent(String content,
int contentType)
Sets the content of the body.
|
void |
setElectronicAddresses(MapiContactElectronicAddressPropertySet value)
Specify properties for up to three different
e-mail addresses
and three different fax addresses
|
void |
setEvents(MapiContactEventPropertySet value)
Specify events associated with a contact
|
void |
setNameInfo(MapiContactNamePropertySet value)
The properties are used to specify the name
of the person represented by the contact
|
void |
setOtherFields(MapiContactOtherPropertySet value)
Specify other fields of conhtact.
|
void |
setPersonalInfo(MapiContactPersonalInfoPropertySet value)
Specify other additional contact information
|
void |
setPhoto(MapiContactPhoto value)
Contains contact photo
MapiContactPhoto . |
void |
setPhysicalAddresses(MapiContactPhysicalAddressPropertySet value)
Specify three physical addresses:
Home Address, Work Address, and Other Address.
|
void |
setProfessionalInfo(MapiContactProfessionalPropertySet value)
Properties are used to store professional
details for the person represented by the contact
|
void |
setTelephones(MapiContactTelephonePropertySet value)
Specify telephone numbers
for the contact
|
checkIsDisposed, dispose, getAttachments, getBilling, getBody, getBodyHtml, getBodyRtf, getBodyType, getCategories, getCompanies, getMessageClass, getMileage, getNamedProperties, getNamedPropertyMapping, getProperty, getPropertyStream, getRecipients, getSensitivity, getSubject, getSubjectPrefix, getSubStorages, initNamedPropertyMappingStorage, removeProperty, setBilling, setBody, setBodyRtf, setCategories, setCompanies, setMessageClass, setMessageFlags, setMileage, setNamedPropertyMapping, setProperty, setRecipients, setSensitivity, setsIMapiMessageItemMembers, setSubject
createMapiNode, getCodePage, getProperties, getPropertyBoolean, getPropertyBytes, getPropertyDateTime, getPropertyInt32, getPropertyLong, getPropertyShort, getPropertyString, getPropertyString, isStoreUnicodeOk, setProperty, tryGetPropertyData, tryGetPropertyDateTime, tryGetPropertyInt32, tryGetPropertyLong, tryGetPropertyString, tryGetPropertyString, tryGetPropertyString, tryGetPropertyString
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 final String getItemId()
Uses to specify the server id of the contact EWS only
getItemId
in class MapiMessageItemBase
public final MapiContactNamePropertySet getNameInfo()
The properties are used to specify the name of the person represented by the contact
public final void setNameInfo(MapiContactNamePropertySet value)
The properties are used to specify the name of the person represented by the contact
public final MapiContactPersonalInfoPropertySet getPersonalInfo()
Specify other additional contact information
public final void setPersonalInfo(MapiContactPersonalInfoPropertySet value)
Specify other additional contact information
public final MapiContactProfessionalPropertySet getProfessionalInfo()
Properties are used to store professional details for the person represented by the contact
public final void setProfessionalInfo(MapiContactProfessionalPropertySet value)
Properties are used to store professional details for the person represented by the contact
public final MapiContactTelephonePropertySet getTelephones()
Specify telephone numbers for the contact
public final void setTelephones(MapiContactTelephonePropertySet value)
Specify telephone numbers for the contact
public final MapiContactElectronicAddressPropertySet getElectronicAddresses()
Specify properties for up to three different e-mail addresses and three different fax addresses
public final void setElectronicAddresses(MapiContactElectronicAddressPropertySet value)
Specify properties for up to three different e-mail addresses and three different fax addresses
public final 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 final void setPhysicalAddresses(MapiContactPhysicalAddressPropertySet value)
Specify three physical addresses: Home Address, Work Address, and Other Address. One of the addresses can be marked as the Mailing Address
public final MapiContactEventPropertySet getEvents()
Specify events associated with a contact
public final void setEvents(MapiContactEventPropertySet value)
Specify events associated with a contact
public final MapiContactOtherPropertySet getOtherFields()
Specify other fields of conhtact.
public final void setOtherFields(MapiContactOtherPropertySet value)
Specify other fields of conhtact.
public final MapiContactPhoto getPhoto()
Contains contact photoMapiContactPhoto
.
public final void setPhoto(MapiContactPhoto value)
Contains contact photoMapiContactPhoto
.
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.ms.System.ArgumentException
- filePath
is null
or empty
public static MapiContact fromVCard(String filePath, Charset encoding)
Reads MapiContact
from the specified vCard file
The supported vCard versions are 2.1 and 3.0
filePath
- A file name to read fromencoding
- File data encodingMapiContact
com.aspose.ms.System.ArgumentException
- filePath
is null
or empty
public static MapiContact fromVCard(InputStream stream)
Reads MapiContact
from the specified stream containing vCard.
The supported vCard versions are 2.1 and 3.0
stream
- A stream to read fromMapiContact
com.aspose.ms.System.ArgumentNullException
- stream
is null
com.aspose.ms.System.NotSupportedException
- stream
does not support readingpublic static MapiContact fromVCard(InputStream stream, Charset encoding)
Reads MapiContact
from the specified stream containing vCard.
The supported vCard versions are 2.1 and 3.0
stream
- A stream to read fromencoding
- Stream data encodingMapiContact
com.aspose.ms.System.ArgumentNullException
- stream
is null
com.aspose.ms.System.NotSupportedException
- stream
does not support readingpublic final MapiMessage getUnderlyingMessage()
Get the MapiMessage that represent contact.
MapiMessage
object.public final 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.ms.System.ArgumentException
- filePath
is null
or empty
public final 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.ms.System.ArgumentException
- filePath
is null
or empty
com.aspose.ms.System.NotSupportedException
- the specified format is not supportedpublic final 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.ms.System.ArgumentException
- filePath
is null
or empty
com.aspose.ms.System.ArgumentNullException
- saveOptions
is null
com.aspose.ms.System.NotSupportedException
- some save option is not supportedpublic final void save(OutputStream stream)
Saves this MapiContact
into the given stream with vCard format.
The supported vCard version is 2.1
stream
- A stream to save tocom.aspose.ms.System.ArgumentNullException
- stream
is null
com.aspose.ms.System.NotSupportedException
- stream
does not support writingpublic final 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
stream
- A stream to save tosaveFormat
- A save formatcom.aspose.ms.System.ArgumentNullException
- stream
is null
com.aspose.ms.System.NotSupportedException
- stream
does not support writingcom.aspose.ms.System.NotSupportedException
- The specified format is not supportedpublic final void save(OutputStream stream, ContactSaveOptions saveOptions)
Saves this MapiContact
to the given stream using specified save options.
The supported save options is VCardSaveOptions
stream
- A stream to save tosaveOptions
- A save optionscom.aspose.ms.System.ArgumentNullException
- stream
or saveOptions
is null
com.aspose.ms.System.NotSupportedException
- stream
does not support writingcom.aspose.ms.System.ArgumentException
- incorrect saveOptions
com.aspose.ms.System.NotSupportedException
- some save option is not supportedpublic void setBodyContent(String content, int contentType)
Sets the content of the body.
setBodyContent
in class MapiMessageItemBase
content
- The content.contentType
- Type of the content.
com.aspose.ms.System.ArgumentNullException
- throws if the specified content string is null or empty.