MapiMessageItemBase

Inheritance: java.lang.Object, com.aspose.email.MapiPropertyContainer

All Implemented Interfaces: com.aspose.email.IMapiMessageItem, com.aspose.ms.System.IDisposable, java.io.Closeable

public abstract class MapiMessageItemBase extends MapiPropertyContainer implements IMapiMessageItem, System.IDisposable, Closeable

Represents the base class for all MapiMessageItem classes and keeps common collections of mapi properties, attachments, recipients.

Methods

Method Description
getItemId() The item id, uses with a server
getProperty(PropertyDescriptor pd) Gets MAPI property by property descriptor.
setProperty(PropertyDescriptor pd, Object value) Sets MAPI property.
getAttachments() Gets the attachments in the message.
getPropertyStream() Gets the property stream.
getNamedProperties() Gets the named properties of message.
getRecipients() Gets the recipients of the message.
setRecipients(MapiRecipientCollection value) Gets the recipients of the message.
getSubStorages() Gets the sub storages.
getNamedPropertyMapping() Gets the named property mapping.
getSubjectPrefix() Gets a subject prefix that typically indicates some action on a message, such as “FW: " for forwarding.
getBodyType() Gets the type of the body.
getBodyRtf() Gets or sets the RTF formatted message text.
setBodyRtf(String value) Gets or sets the RTF formatted message text.
getBodyHtml() Gets the ``` BodyRtf ```(#getBodyRtf/#setBodyRtf(String)) of the message converted to HTML, if present, otherwise an empty string.
getCompanies() Contains the names of the companies that are associated with an item.
setCompanies(String[] value) Contains the names of the companies that are associated with an item.
getCategories() Contains keywords or categories for the message object.
setCategories(String[] value) Contains keywords or categories for the message object.
getMileage() Contains the mileage information that is associated with an item.
setMileage(String value) Contains the mileage information that is associated with an item.
getBilling() Contains the billing information associated with an item.
setBilling(String value) Contains the billing information associated with an item.
getSensitivity() Gets the Sensitivity.
setSensitivity(int value) Gets the Sensitivity.
getMessageClass() Gets a case-sensitive string that identifies the sender-defined message class, such as IPM.Note.
setMessageClass(String value) Gets a case-sensitive string that identifies the sender-defined message class, such as IPM.Note.
getBody() Gets the message text.
setBody(String value) Gets the message text.
getSubject() Gets or sets the subject of the message.
setSubject(String value) Gets or sets the subject of the message.
dispose() Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
close()
setNamedPropertyMapping(MapiNamedPropertyMappingStorage value) Sets the named property mapping.
setBodyRtf(String value, boolean compression) Gets or sets the RTF formatted message text.
setBodyContent(String content, int contentType) Sets the content of the body.
setBodyContent(String content, int contentType, boolean compression) Sets the content of the body.
setMessageFlags(long flags) Sets the message flags.
removeProperty(long tag) Provides correctly removing property from all collections.

getItemId()

public String getItemId()

The item id, uses with a server

Returns: java.lang.String

getProperty(PropertyDescriptor pd)

public MapiProperty getProperty(PropertyDescriptor pd)

Gets MAPI property by property descriptor.

Parameters:

Parameter Type Description
pd PropertyDescriptor Property descriptor for looked property

Returns: MapiProperty - Mapi property if it is found, otherwise null.

setProperty(PropertyDescriptor pd, Object value)

public void setProperty(PropertyDescriptor pd, Object value)

Sets MAPI property.

Parameters:

Parameter Type Description
pd PropertyDescriptor The property descriptor.
value java.lang.Object The property data.

getAttachments()

public final MapiAttachmentCollection getAttachments()

Gets the attachments in the message.

Value: The attachment collection.

Returns: MapiAttachmentCollection

getPropertyStream()

public final MapiPropertyStream getPropertyStream()

Gets the property stream.

Value: The property stream.

Returns: MapiPropertyStream

getNamedProperties()

public final MapiPropertyCollection getNamedProperties()

Gets the named properties of message.

Value: The collection of named properties.

Returns: MapiPropertyCollection

getRecipients()

public final MapiRecipientCollection getRecipients()

Gets the recipients of the message.

Value: The collection of recipients.

Returns: MapiRecipientCollection

setRecipients(MapiRecipientCollection value)

public final void setRecipients(MapiRecipientCollection value)

Gets the recipients of the message.

Value: The collection of recipients.

Parameters:

Parameter Type Description
value MapiRecipientCollection

getSubStorages()

public final MapiPropertyCollection getSubStorages()

Gets the sub storages.

Value: The sub storages.

Returns: MapiPropertyCollection

getNamedPropertyMapping()

public final MapiNamedPropertyMappingStorage getNamedPropertyMapping()

Gets the named property mapping.

Value: The named property mapping.

Returns: MapiNamedPropertyMappingStorage

getSubjectPrefix()

public final String getSubjectPrefix()

Gets a subject prefix that typically indicates some action on a message, such as “FW: " for forwarding.

Value: The string that represents subject prefix.

Returns: java.lang.String

getBodyType()

public final int getBodyType()

Gets the type of the body.

Value: The type of the body.

Returns: int

getBodyRtf()

public final String getBodyRtf()

Gets or sets the RTF formatted message text.

Value: The string that represents message body rtf.


When setting a value, the values of PR_RTF_COMPRESSED, PR_RTF_DECOMPRESSES, PR_BODY properties are updated. A string value being set must have RTF format. Thus, if it is necessary to set a value in HTML format, the value must be first to encoded within RTF, according to RTF Extensions Specification. To set the content of the body message in HTML or Plain Text formats quickly, please, use SetBodyContent method. When setting a null value or empty string, the values of BodyRtf and Body properties are set null.

Returns: java.lang.String

setBodyRtf(String value)

public final void setBodyRtf(String value)

Gets or sets the RTF formatted message text.

Value: The string that represents message body rtf.


When setting a value, the values of PR_RTF_COMPRESSED, PR_RTF_DECOMPRESSES, PR_BODY properties are updated. A string value being set must have RTF format. Thus, if it is necessary to set a value in HTML format, the value must be first to encoded within RTF, according to RTF Extensions Specification. To set the content of the body message in HTML or Plain Text formats quickly, please, use SetBodyContent method. When setting a null value or empty string, the values of BodyRtf and Body properties are set null.

Parameters:

Parameter Type Description
value java.lang.String

getBodyHtml()

public final String getBodyHtml()

Gets the ``` BodyRtf ```(#getBodyRtf/#setBodyRtf(String)) of the message converted to HTML, if present, otherwise an empty string.

Returns: java.lang.String

getCompanies()

public final String[] getCompanies()

Contains the names of the companies that are associated with an item.

Returns: java.lang.String[]

setCompanies(String[] value)

public final void setCompanies(String[] value)

Contains the names of the companies that are associated with an item.

Parameters:

Parameter Type Description
value java.lang.String[]

getCategories()

public final String[] getCategories()

Contains keywords or categories for the message object.

Returns: java.lang.String[]

setCategories(String[] value)

public final void setCategories(String[] value)

Contains keywords or categories for the message object.

Parameters:

Parameter Type Description
value java.lang.String[]

getMileage()

public final String getMileage()

Contains the mileage information that is associated with an item.

Returns: java.lang.String

setMileage(String value)

public final void setMileage(String value)

Contains the mileage information that is associated with an item.

Parameters:

Parameter Type Description
value java.lang.String

getBilling()

public final String getBilling()

Contains the billing information associated with an item.

Returns: java.lang.String

setBilling(String value)

public final void setBilling(String value)

Contains the billing information associated with an item.

Parameters:

Parameter Type Description
value java.lang.String

getSensitivity()

public final int getSensitivity()

Gets the Sensitivity.

Value: The sensitivity.

Returns: int

setSensitivity(int value)

public final void setSensitivity(int value)

Gets the Sensitivity.

Value: The sensitivity.

Parameters:

Parameter Type Description
value int

getMessageClass()

public final String getMessageClass()

Gets a case-sensitive string that identifies the sender-defined message class, such as IPM.Note. The message class specifies the type, purpose, or content of the message.

Value: The string that represents message class.

Returns: java.lang.String

setMessageClass(String value)

public final void setMessageClass(String value)

Gets a case-sensitive string that identifies the sender-defined message class, such as IPM.Note. The message class specifies the type, purpose, or content of the message.

Value: The string that represents message class.

Parameters:

Parameter Type Description
value java.lang.String

getBody()

public String getBody()

Gets the message text.

Value: The string that represents message body.

Returns: java.lang.String

setBody(String value)

public void setBody(String value)

Gets the message text.

Value: The string that represents message body.

Parameters:

Parameter Type Description
value java.lang.String

getSubject()

public final String getSubject()

Gets or sets the subject of the message.

Value: The string that represents message subject.


When setting a value, the values of SubjectPrefix(PR_SUBJECT_PREFIX) and NormalizedSubject(PR_NORMALIZED_SUBJECT) properties are updated as well. If Subject has no prefix, the value of SubjectPrefix property is set null. When setting a null value or empty string, the values of Subject, SubjectPrefix, NormalizedSubject properties are set null.

Returns: java.lang.String

setSubject(String value)

public final void setSubject(String value)

Gets or sets the subject of the message.

Value: The string that represents message subject.


When setting a value, the values of SubjectPrefix(PR_SUBJECT_PREFIX) and NormalizedSubject(PR_NORMALIZED_SUBJECT) properties are updated as well. If Subject has no prefix, the value of SubjectPrefix property is set null. When setting a null value or empty string, the values of Subject, SubjectPrefix, NormalizedSubject properties are set null.

Parameters:

Parameter Type Description
value java.lang.String

dispose()

public void dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

close()

public void close()

setNamedPropertyMapping(MapiNamedPropertyMappingStorage value)

public final void setNamedPropertyMapping(MapiNamedPropertyMappingStorage value)

Sets the named property mapping.

Parameters:

Parameter Type Description
value MapiNamedPropertyMappingStorage The MapiNamedPropertyMappingStorage.

setBodyRtf(String value, boolean compression)

public final void setBodyRtf(String value, boolean compression)

Gets or sets the RTF formatted message text.

Value: The string that represents message body rtf.


When setting a value, the values of PR_RTF_COMPRESSED, PR_RTF_DECOMPRESSES, PR_BODY properties are updated. A string value being set must have RTF format. Thus, if it is necessary to set a value in HTML format, the value must be first to encoded within RTF, according to RTF Extensions Specification. To set the content of the body message in HTML or Plain Text formats quickly, please, use SetBodyContent method. When setting a null value or empty string, the values of BodyRtf and Body properties are set null.

Parameters:

Parameter Type Description
value java.lang.String
compression boolean Specify that the content should be compressed.

setBodyContent(String content, int contentType)

public void setBodyContent(String content, int contentType)

Sets the content of the body.

Parameters:

Parameter Type Description
content java.lang.String The content.
contentType int Type of the content.

It is provided for setting of the content of the body message in RTF, HTML or Plain Text formats. When setting a value, the values of PR_RTF_COMPRESSED, PR_RTF_DECOMPRESSES, PR_BODY properties are updated as well. Note, after the value in HTML format is set, BodyRtf property returns the value which is encoded within RTF. |

setBodyContent(String content, int contentType, boolean compression)

public void setBodyContent(String content, int contentType, boolean compression)

Sets the content of the body.

Parameters:

Parameter Type Description
content java.lang.String The content.
contentType int Type of the content.
compression boolean Specify that the content should be compressed.

It is provided for setting of the content of the body message in RTF, HTML or Plain Text formats. When setting a value, the values of PR_RTF_COMPRESSED, PR_RTF_DECOMPRESSES, PR_BODY properties are updated as well. Note, after the value in HTML format is set, BodyRtf property returns the value which is encoded within RTF. |

setMessageFlags(long flags)

public final void setMessageFlags(long flags)

Sets the message flags.

Parameters:

Parameter Type Description
flags long The message flags.

removeProperty(long tag)

public final void removeProperty(long tag)

Provides correctly removing property from all collections.

Parameters:

Parameter Type Description
tag long The tag of MapiProperty.