public final class MapiDistributionList extends MapiMessageItemBase
This class serves as a wrapper for MapiMessage to simplify the process of handling distribution list information
from MAPI properties. It provides a more intuitive interface for accessing and manipulating distribution list data
within the MAPI message.
Example:
// Load the MAPI message from a file
MapiMessage msg = MapiMessage.load("distributionList.msg");
// Check if the loaded message is a supported distribution list type
if (msg.getSupportedType() == MapiItemType.DistList) {
// Convert the MAPI message to a MapiDistributionList object
MapiDistributionList mapiDistributionList = (MapiDistributionList) msg.toMapiMessageItem();
// Display some distribution list info
System.out.println(mapiDistributionList.getDisplayName());
System.out.println(mapiDistributionList.getMembers().size());
}
attachments, namedPropertyMappingStorage, objectsToDispose, recipients| Constructor and Description |
|---|
MapiDistributionList()
Initializes a new instance of the
MapiDistributionList class. |
MapiDistributionList(String displayName,
MapiDistributionListMemberCollection members)
Initializes a new instance of the
MapiDistributionList class. |
| Modifier and Type | Method and Description |
|---|---|
static MapiDistributionList |
fromVCF(InputStream stream)
Loads MapiDistributionList from VCF stream.
|
static MapiDistributionList |
fromVCF(String filePath)
Loads MapiDistributionList from VCF file.
|
String |
getDisplayName()
Gets or sets the user-visible name of the personal distribution list.
|
MapiDistributionListMemberCollection |
getMembers()
Gets the list of the members of the personal distribution list.
|
MapiMessage |
getUnderlyingMessage()
Retrieves the underlying MapiMessage object.
|
void |
save(OutputStream stream)
Saves the specified stream.
|
void |
save(OutputStream stream,
MapiDistributionListSaveOptions options)
Saves the specified stream.
|
void |
save(String fileName)
Saves the specified file name.
|
void |
save(String fileName,
MapiDistributionListSaveOptions options)
Saves the specified file name.
|
void |
setDisplayName(String value)
Gets or sets the user-visible name of the personal distribution list.
|
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 MapiDistributionList()
Initializes a new instance of the MapiDistributionList class.
public MapiDistributionList(String displayName, MapiDistributionListMemberCollection members)
Initializes a new instance of the MapiDistributionList class.
displayName - The display namme.members - The recipiens.public final MapiDistributionListMemberCollection getMembers()
Gets the list of the members of the personal distribution list.
Value: The collection of MapiDistributionListMember.public final String getDisplayName()
Gets or sets the user-visible name of the personal distribution list.
Value: The display name.public final void setDisplayName(String value)
Gets or sets the user-visible name of the personal distribution list.
Value: The display name.public final void save(String fileName)
Saves the specified file name.
fileName - Name of the file.public final void save(String fileName, MapiDistributionListSaveOptions options)
Saves the specified file name.
fileName - Name of the file.options - Additional options for saving DistributionList.InvalidOperationException - Thrown if DistributionList is empty.NotSupportedException - Thrown if the DistributionList is saved in WebDavpublic final void save(OutputStream stream)
Saves the specified stream.
stream - The stream.public final void save(OutputStream stream, MapiDistributionListSaveOptions options)
Saves the specified stream.
stream - The stream.options - Additional options for saving DistributionList.InvalidOperationException - Thrown if DistributionList is empty.NotSupportedException - Thrown if the DistributionList is saved in WebDavpublic final MapiMessage getUnderlyingMessage()
MapiMessage object.
Retrieves the underlying MAPI message from a MapiDistributionList object and prints out its message class.
// Retrieve the underlying MAPI message from the MapiDistributionList object
MapiMessage msg = mapiDistributionList.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)0xfa, (byte)0xfd, (byte)0xd0, (byte)0xa8, (byte)0x9f, (byte)0xe6, (byte)0xa7, (byte)0x59 })
System.out.println(msg.getMessageClass());
public static MapiDistributionList fromVCF(String filePath)
Loads MapiDistributionList from VCF file.
filePath - Path to the VCF file.public static MapiDistributionList fromVCF(InputStream stream)
Loads MapiDistributionList from VCF stream.
stream - Stream in the VCF format.Copyright (c) 2008-2024 Aspose Pty Ltd. All Rights Reserved.