public final class MapiNote extends MapiMessageItemBase
This class serves as a wrapper for MapiMessage to simplify the process of handling note information
from MAPI properties. It provides a more intuitive interface for accessing and manipulating note data
within the MAPI message.
Example:
// Load the MAPI message from a file
MapiMessage msg = MapiMessage.load("note.msg");
// Check if the loaded message is a supported note type
if (msg.getSupportedType() == MapiItemType.Note) {
// Convert the MAPI message to a MapiNote object
MapiNote mapiNote = (MapiNote) msg.toMapiMessageItem();
// Display some note info
System.out.println(mapiNote.getColor());
System.out.println(mapiNote.getBody());
}
attachments, namedPropertyMappingStorage, objectsToDispose, recipients| Constructor and Description |
|---|
MapiNote()
Initializes a new instance of the
MapiNote class. |
MapiNote(String subject,
String body)
Initializes a new instance of the
MapiNote class. |
| Modifier and Type | Method and Description |
|---|---|
int |
getColor()
Gets or sets the suggested background color of the Note object
|
Date |
getCreationDate()
Gets or sets the creation date of note
|
int |
getHeight()
Gets or sets height of the visible message window in pixels
|
MapiMessage |
getUnderlyingMessage()
Retrieves the underlying MapiMessage object.
|
int |
getWidth()
Gets or sets width of the visible message window in pixels
|
int |
getXPosition()
Gets or sets the distance, in pixels,
from the left edge of the screen
that a user interface displays a Note object
|
int |
getYPosition()
Gets or sets the distance, in pixels,
from the top edge of the screen
that a user interface displays a Note object
|
void |
save(OutputStream stream,
int saveFormat)
Saves this
MapiNote to the given stream using specified format. |
void |
save(String filePath,
int saveFormat)
Saves this
MapiNote into file using specified format. |
void |
setColor(int value)
Gets or sets the suggested background color of the Note object
|
void |
setCreationDate(Date value)
Gets or sets the creation date of note
|
void |
setHeight(int value)
Gets or sets height of the visible message window in pixels
|
void |
setWidth(int value)
Gets or sets width of the visible message window in pixels
|
void |
setXPosition(int value)
Gets or sets the distance, in pixels,
from the left edge of the screen
that a user interface displays a Note object
|
void |
setYPosition(int value)
Gets or sets the distance, in pixels,
from the top edge of the screen
that a user interface displays a Note object
|
checkIsDisposed, close, createNamedProperty, dispose, getAttachments, getBilling, getBody, getBodyHtml, getBodyRtf, getBodyType, getCategories, getCompanies, getItemId, getMessageClass, getMileage, getNamedProperties, getNamedPropertyMapping, getProperty, getPropertyStream, getRecipients, getSensitivity, getSubject, getSubjectPrefix, getSubStorages, getSupportedType, initNamedPropertyMappingStorage, removeProperty, setBilling, setBody, setBodyContent, setBodyContent, setBodyRtf, setBodyRtf, setCategories, setCompanies, setMessageClass, setMessageFlags, setMileage, setNamedPropertyMapping, setProperty, setRecipients, setSensitivity, setsIMapiMessageItemMembers, setSubjectcreateMapiNode, getCodePage, getProperties, getPropertyBoolean, getPropertyBytes, getPropertyDateTime, getPropertyInt32, getPropertyLong, getPropertyShort, getPropertyString, getPropertyString, isStoreUnicodeOk, setProperty, tryGetPropertyData, tryGetPropertyDateTime, tryGetPropertyInt32, tryGetPropertyLong, tryGetPropertyString, tryGetPropertyString, tryGetPropertyString, tryGetPropertyStringpublic MapiNote()
Initializes a new instance of the MapiNote class.
public final Date getCreationDate()
Gets or sets the creation date of note
public final void setCreationDate(Date value)
Gets or sets the creation date of note
public final int getColor()
Gets or sets the suggested background color of the Note object
public final void setColor(int value)
Gets or sets the suggested background color of the Note object
public final int getWidth()
Gets or sets width of the visible message window in pixels
public final void setWidth(int value)
Gets or sets width of the visible message window in pixels
public final int getHeight()
Gets or sets height of the visible message window in pixels
public final void setHeight(int value)
Gets or sets height of the visible message window in pixels
public final int getXPosition()
Gets or sets the distance, in pixels, from the left edge of the screen that a user interface displays a Note object
public final void setXPosition(int value)
Gets or sets the distance, in pixels, from the left edge of the screen that a user interface displays a Note object
public final int getYPosition()
Gets or sets the distance, in pixels, from the top edge of the screen that a user interface displays a Note object
public final void setYPosition(int value)
Gets or sets the distance, in pixels, from the top edge of the screen that a user interface displays a Note object
public final MapiMessage getUnderlyingMessage()
MapiMessage object.
Retrieves the underlying MAPI message from a MapiNote object and prints out its message class.
// Retrieve the underlying MAPI message from the MapiNote object
MapiMessage msg = mapiNote.getUnderlyingMessage();
// Print out the message class of the MAPI message
// Will output XVHK4D9KDb.get(new byte[] { (byte)0xc6, (byte)0xa8, (byte)0x7f, (byte)0x5c, (byte)0xed, (byte)0xe0, (byte)0xca, (byte)0xbf, (byte)0xb8, (byte)0xf6, (byte)0x9a, (byte)0x42, (byte)0x80, (byte)0x4a })
System.out.println(msg.getMessageClass());
public final void save(OutputStream stream, int saveFormat)
Saves this MapiNote to the given stream using specified format.
Copyright (c) 2008-2024 Aspose Pty Ltd. All Rights Reserved.