public final class MapiContact extends MapiMessageItemBase
Represents outlook contact information
attachments, namedPropertyMappingStorage, propertyStream, recipients, subStorages
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 |
MapiAttachmentCollection |
getAttachments()
Gets the attachments in the contact.
|
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
|
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
Aspose.Email.Outlook.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 |
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
Aspose.Email.Outlook.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
|
byte[] |
toWebDavStream()
Saves the MapiContact to a WebDav data stream.
|
checkIsDisposed, dispose, getBilling, getBody, getBodyHtml, getBodyRtf, getBodyType, getCategories, getCompanies, getMessageClass, getMileage, getNamedProperties, getNamedPropertyMapping, getPropertyStream, getRecipients, getSensitivity, getSubject, getSubjectPrefix, getSubStorages, initNamedPropertyMappingStorage, removeProperty, setBilling, setBody, setBodyContent, setBodyRtf, setCategories, setCompanies, setMessageClass, setMessageFlags, setMileage, setNamedPropertyMapping, setProperty, setRecipients, setSensitivity, setsIMapiMessageItemMembers, setSubject, updateStorage, updateStorage
createMapiNode, getCodePage, getMyProperties, getProperties, getPropertyBoolean, getPropertyBytes, getPropertyDateTime, getPropertyInt32, getPropertyLong, getPropertyShort, getPropertyString, getPropertyString, isStoreUnicodeOk, setProperty, setProperty, setProperty, setProperty, setProperty, setPropertySet, 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 MapiContactNamePropertySet getNameInfo()
The properties are used to specify the name of the person represented by the contact
MapiContactNamePropertySet
object.public void setNameInfo(MapiContactNamePropertySet value)
The properties are used to specify the name of the person represented by the contact
value
- a MapiContactNamePropertySet
object.public MapiContactPersonalInfoPropertySet getPersonalInfo()
Specify other additional contact information
MapiContactPersonalInfoPropertySet
object.public void setPersonalInfo(MapiContactPersonalInfoPropertySet value)
Specify other additional contact information
value
- a MapiContactPersonalInfoPropertySet
object.public MapiContactProfessionalPropertySet getProfessionalInfo()
Properties are used to store professional details for the person represented by the contact
MapiContactProfessionalPropertySet
object.public void setProfessionalInfo(MapiContactProfessionalPropertySet value)
Properties are used to store professional details for the person represented by the contact
value
- a MapiContactProfessionalPropertySet
object.public MapiContactTelephonePropertySet getTelephones()
Specify telephone numbers for the contact
MapiContactTelephonePropertySet
object.public void setTelephones(MapiContactTelephonePropertySet value)
Specify telephone numbers for the contact
value
- a MapiContactTelephonePropertySet
object.public MapiContactElectronicAddressPropertySet getElectronicAddresses()
Specify properties for up to three different e-mail addresses and three different fax addresses
MapiContactElectronicAddressPropertySet
object.public void setElectronicAddresses(MapiContactElectronicAddressPropertySet value)
Specify properties for up to three different e-mail addresses and three different fax addresses
value
- a MapiContactElectronicAddressPropertySet
object.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
MapiContactPhysicalAddressPropertySet
object.public 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
value
- a MapiContactPhysicalAddressPropertySet
object.public MapiContactEventPropertySet getEvents()
Specify events associated with a contact
MapiContactEventPropertySet
object.public void setEvents(MapiContactEventPropertySet value)
Specify events associated with a contact
value
- a MapiContactEventPropertySet
object.public MapiContactOtherPropertySet getOtherFields()
Specify other fields of conhtact.
MapiContactOtherPropertySet
object.public void setOtherFields(MapiContactOtherPropertySet value)
Specify other fields of conhtact.
value
- a MapiContactOtherPropertySet
object.public MapiContactPhoto getPhoto()
Contains contact photoAspose.Email.Outlook.MapiContactPhoto
.
MapiContactPhoto
object.public void setPhoto(MapiContactPhoto value)
Contains contact photoAspose.Email.Outlook.MapiContactPhoto
.
value
- a MapiContactPhoto
object.public MapiAttachmentCollection getAttachments()
Gets the attachments in the contact.
Value: The attachment collection.getAttachments
in class MapiMessageItemBase
MapiAttachmentCollection
object.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(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 MapiMessage getUnderlyingMessage()
Get the MapiMessage that represent contact.
MapiMessage
object.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.ms.System.ArgumentException
- 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.ms.System.ArgumentException
- filePath
is null
or empty
com.aspose.ms.System.NotSupportedException
- 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.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 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 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 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 byte[] toWebDavStream()
Saves the MapiContact to a WebDav data stream.
System.IO.MemoryStream
that represents a WebDav data.Copyright (c) 2008-2015 Aspose Pty Ltd. All Rights Reserved.