MapiAttachmentCollection

Inheritance: java.lang.Object, com.aspose.ms.System.Collections.Generic.List

public class MapiAttachmentCollection extends System.Collections.Generic.List<MapiAttachment>

Represents a collection of MapiAttachment objects.

Constructors

ConstructorDescription
MapiAttachmentCollection()Initializes a new instance of the MapiAttachmentCollection class.
MapiAttachmentCollection(MapiMessageItemBase owner)Initializes a new instance of the MapiAttachmentCollection class.

Methods

MethodDescription
fromJava(List arg0)
toArray(T[] arg0)
toJava(System.Collections.Generic.List arg0)
convertAll(System.Converter<T,TOutput> arg0)
add(T arg0)
add(int arg0, T arg1)
add(String name, byte[] data)Adds the new attachment.
add(String name, MapiMessage msg)Adds the new attachment as embedded message.
add(String name, String sharedLink, String url, String providerName)Adds the reference attachment.
addAll(int arg0, Collection<? extends T> arg1)
addAll(Collection<? extends T> arg0)
addItem(T arg0)
addMapiAttachment(MapiAttachment item)Adds an object to the end of the System.Collections.ObjectModel.Collection1 .
addRange(T[] arg0)
addRange(System.Collections.Generic.IGenericEnumerable arg0)
asReadOnly()
binarySearch(T arg0)
binarySearch(T arg0, Comparator arg1)
binarySearch(int arg0, int arg1, T arg2, Comparator arg3)
clear()
contains(Object arg0)
containsAll(Collection arg0)
containsItem(T arg0)
copyTo(T[] arg0)
copyTo(System.Array arg0, int arg1)
copyTo(int arg0, T[] arg1, int arg2, int arg3)
copyToTArray(T[] arg0, int arg1)
equals(Object arg0)
exists(System.Predicate arg0)
find(System.Predicate arg0)
findAll(System.Predicate arg0)
findIndex(System.Predicate arg0)
findIndex(int arg0, System.Predicate arg1)
findIndex(int arg0, int arg1, System.Predicate arg2)
findLast(System.Predicate arg0)
findLastIndex(System.Predicate arg0)
findLastIndex(int arg0, System.Predicate arg1)
findLastIndex(int arg0, int arg1, System.Predicate arg2)
forEach(System.Action arg0)
get(int arg0)
getCapacity()
getClass()
getRange(int arg0, int arg1)
getSyncRoot()
get_Item(int arg0)
hashCode()
indexOf(T arg0, int arg1)
indexOf(T arg0, int arg1, int arg2)
indexOf(Object arg0)
indexOfItem(T arg0)
insert(int index, String name, MapiMessage msg)Inserts a message as attachment into the MapiAttachmentCollection at the specified index.
insertItem(int arg0, T arg1)
insertMapiAttachment(int index, MapiAttachment item)Inserts an element into the System.Collections.ObjectModel.Collection1 at the specified index.
insertRange(int arg0, System.Collections.Generic.IGenericEnumerable arg1)
isEmpty()
isFixedSize()
isReadOnly()
isSynchronized()
iterator()
lastIndexOf(T arg0, int arg1)
lastIndexOf(T arg0, int arg1, int arg2)
lastIndexOf(Object arg0)
listIterator()
listIterator(int arg0)
notify()
notifyAll()
remove(int arg0)
remove(Object arg0)
removeAll(System.Predicate arg0)
removeAll(Collection arg0)
removeAt(int index)Removes the element at the specified index of the MapiAttachmentCollection.
removeItem(T arg0)
removeMapiAttachment(MapiAttachment item)Removes the first occurrence of a specific object from the MapiAttachmentCollection.
removeRange(int arg0, int arg1)
replace(int index, String name, MapiMessage msg)Replaces an element at the specified index.
retainAll(Collection arg0)
reverse()
reverse(int arg0, int arg1)
set(int arg0, T arg1)
setCapacity(int arg0)
set_Item(int arg0, T arg1)
size()
sort()
sort(System.Comparison arg0)
sort(int arg0, int arg1, Comparator arg2)
sort(Comparator<? super T> arg0)
subList(int arg0, int arg1)
toArray()
toString()
trimExcess()
trueForAll(System.Predicate arg0)
wait()
wait(long arg0)
wait(long arg0, int arg1)

MapiAttachmentCollection()

public MapiAttachmentCollection()

Initializes a new instance of the MapiAttachmentCollection class.

MapiAttachmentCollection(MapiMessageItemBase owner)

public MapiAttachmentCollection(MapiMessageItemBase owner)

Initializes a new instance of the MapiAttachmentCollection class.

Parameters:

ParameterTypeDescription
ownerMapiMessageItemBaseThe owner message.

fromJava(List arg0)

public static System.Collections.Generic.List<T> <T>fromJava(List<T> arg0)

Parameters:

ParameterTypeDescription
arg0java.util.List

Returns: com.aspose.ms.System.Collections.Generic.List

toArray(T[] arg0)

public T[] <T>toArray(T[] arg0)

Parameters:

ParameterTypeDescription
arg0T[]

Returns: T[]

toJava(System.Collections.Generic.List arg0)

public static List<T> <T>toJava(System.Collections.Generic.List<T> arg0)

Parameters:

ParameterTypeDescription
arg0com.aspose.ms.System.Collections.Generic.List

Returns: java.util.List

convertAll(System.Converter<T,TOutput> arg0)

public System.Collections.Generic.List<TOutput> <TOutput>convertAll(System.Converter<T,TOutput> arg0)

Parameters:

ParameterTypeDescription
arg0com.aspose.ms.System.Converter<T,TOutput>

Returns: com.aspose.ms.System.Collections.Generic.List

add(T arg0)

public boolean add(T arg0)

Parameters:

ParameterTypeDescription
arg0T

Returns: boolean

add(int arg0, T arg1)

public void add(int arg0, T arg1)

Parameters:

ParameterTypeDescription
arg0int
arg1T

add(String name, byte[] data)

public final void add(String name, byte[] data)

Adds the new attachment.

Parameters:

ParameterTypeDescription
namejava.lang.StringThe name of attachment.
databyte[]The attachment data.

add(String name, MapiMessage msg)

public final void add(String name, MapiMessage msg)

Adds the new attachment as embedded message.

Parameters:

ParameterTypeDescription
namejava.lang.StringThe name of attachment.
msgMapiMessageThe MapiMessage that represents the attached message.

add(String name, String sharedLink, String url, String providerName)

public final void add(String name, String sharedLink, String url, String providerName)

Adds the reference attachment.


This example demonstrates how to add a reference attachment to a message.

 [C#]
 
 // Let's say you want to send an email message that includes a link to a Document.pdf file stored on a Google Drive.
 // Instead of attaching the document directly to the email message,
 // you can create a reference attachment that links to the file on the Google Drive.
 // Create a message
 var msg = new MapiMessage("from@domain.com", "to@domain.com", "Outlook message file",
     "This message is created by Aspose.Email", OutlookMessageFormat.Unicode);
 // Add reference attachment
 msg.Attachments.Add("Document.pdf",
     "https://drive.google.com/file/d/1HJ-M3F2qq1oRrTZ2GZhUdErJNy2CT3DF/",
     "https://drive.google.com/drive/my-drive",
     "GoogleDrive");
 //Also, you can set additional attachment properties
 msg.Attachments[0].SetProperty(KnownPropertyList.AttachmentPermissionType, AttachmentPermissionType.AnyoneCanEdit);
 msg.Attachments[0].SetProperty(KnownPropertyList.AttachmentOriginalPermissionType, 0);
 msg.Attachments[0].SetProperty(KnownPropertyList.AttachmentIsFolder, false);
 msg.Attachments[0].SetProperty(KnownPropertyList.AttachmentProviderEndpointUrl, "");
 msg.Attachments[0].SetProperty(KnownPropertyList.AttachmentPreviewUrl, "");
 msg.Attachments[0].SetProperty(KnownPropertyList.AttachmentThumbnailUrl, "");
 // Finally save the message
 msg.Save(@"my.msg");
 
 [Visual Basic]
 
 ' Let's say you want to send an email message that includes a link to a Document.pdf file stored on a Google Drive.
 ' Instead of attaching the document directly to the email message,
 ' you can create a reference attachment that links to the file on the Google Drive.
 ' Create a message
 Dim msg As New MapiMessage("from@domain.com", "to@domain.com", "Outlook message file", "This message is created by Aspose.Email", OutlookMessageFormat.Unicode)
 ' Add reference attachment
 msg.Attachments.Add("Document.pdf", "https://drive.google.com/file/d/1HJ-M3F2qq1oRrTZ2GZhUdErJNy2CT3DF/", "https://drive.google.com/drive/my-drive", "GoogleDrive")
 ' Also, you can set additional attachment properties
 msg.Attachments(0).SetProperty(KnownPropertyList.AttachmentPermissionType, AttachmentPermissionType.AnyoneCanEdit)
 msg.Attachments(0).SetProperty(KnownPropertyList.AttachmentOriginalPermissionType, AttachmentPermissionType.None)
 msg.Attachments(0).SetProperty(KnownPropertyList.AttachmentIsFolder, False)
 msg.Attachments(0).SetProperty(KnownPropertyList.AttachmentProviderEndpointUrl, "")
 msg.Attachments(0).SetProperty(KnownPropertyList.AttachmentPreviewUrl, "")
 msg.Attachments(0).SetProperty(KnownPropertyList.AttachmentThumbnailUrl, "")
 ' Finally save the message
 msg.Save("my.msg")

Parameters:

ParameterTypeDescription
namejava.lang.StringThe name of attachment.
sharedLinkjava.lang.StringA fully qualified shared link to the attachment provided by web service manipulating the attachment.
urljava.lang.StringA file location.
providerNamejava.lang.StringA name of reference attachment provider.

A reference attachment is a type of attachment that includes a link or a reference to a file or item, rather than including the file or item itself in the email message. When the recipients of the email click on the reference attachment, they will be able to access the linked file if they have the appropriate permissions to do so. By using a reference attachment, you can send a smaller email message and ensure that everyone has access to the most up-to-date version of the file or item. |

addAll(int arg0, Collection<? extends T> arg1)

public boolean addAll(int arg0, Collection<? extends T> arg1)

Parameters:

ParameterTypeDescription
arg0int
arg1java.util.Collection<? extends T>

Returns: boolean

addAll(Collection<? extends T> arg0)

public boolean addAll(Collection<? extends T> arg0)

Parameters:

ParameterTypeDescription
arg0java.util.Collection<? extends T>

Returns: boolean

addItem(T arg0)

public void addItem(T arg0)

Parameters:

ParameterTypeDescription
arg0T

addMapiAttachment(MapiAttachment item)

public final void addMapiAttachment(MapiAttachment item)

Adds an object to the end of the System.Collections.ObjectModel.Collection1 .

Parameters:

ParameterTypeDescription
itemMapiAttachmentThe object to be added to the end of the System.Collections.ObjectModel.Collection1 . The value can be null for reference types.

addRange(T[] arg0)

public void addRange(T[] arg0)

Parameters:

ParameterTypeDescription
arg0T[]

addRange(System.Collections.Generic.IGenericEnumerable arg0)

public void addRange(System.Collections.Generic.IGenericEnumerable<T> arg0)

Parameters:

ParameterTypeDescription
arg0com.aspose.ms.System.Collections.Generic.IGenericEnumerable

asReadOnly()

public System.Collections.ObjectModel.ReadOnlyCollection<T> asReadOnly()

Returns: com.aspose.ms.System.Collections.ObjectModel.ReadOnlyCollection

binarySearch(T arg0)

public int binarySearch(T arg0)

Parameters:

ParameterTypeDescription
arg0T

Returns: int

binarySearch(T arg0, Comparator arg1)

public int binarySearch(T arg0, Comparator<T> arg1)

Parameters:

ParameterTypeDescription
arg0T
arg1java.util.Comparator

Returns: int

binarySearch(int arg0, int arg1, T arg2, Comparator arg3)

public int binarySearch(int arg0, int arg1, T arg2, Comparator<T> arg3)

Parameters:

ParameterTypeDescription
arg0int
arg1int
arg2T
arg3java.util.Comparator

Returns: int

clear()

public void clear()

contains(Object arg0)

public boolean contains(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

containsAll(Collection arg0)

public boolean containsAll(Collection<?> arg0)

Parameters:

ParameterTypeDescription
arg0java.util.Collection

Returns: boolean

containsItem(T arg0)

public boolean containsItem(T arg0)

Parameters:

ParameterTypeDescription
arg0T

Returns: boolean

copyTo(T[] arg0)

public void copyTo(T[] arg0)

Parameters:

ParameterTypeDescription
arg0T[]

copyTo(System.Array arg0, int arg1)

public void copyTo(System.Array arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0com.aspose.ms.System.Array
arg1int

copyTo(int arg0, T[] arg1, int arg2, int arg3)

public void copyTo(int arg0, T[] arg1, int arg2, int arg3)

Parameters:

ParameterTypeDescription
arg0int
arg1T[]
arg2int
arg3int

copyToTArray(T[] arg0, int arg1)

public void copyToTArray(T[] arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0T[]
arg1int

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

exists(System.Predicate arg0)

public boolean exists(System.Predicate<T> arg0)

Parameters:

ParameterTypeDescription
arg0com.aspose.ms.System.Predicate

Returns: boolean

find(System.Predicate arg0)

public T find(System.Predicate<T> arg0)

Parameters:

ParameterTypeDescription
arg0com.aspose.ms.System.Predicate

Returns: T

findAll(System.Predicate arg0)

public System.Collections.Generic.List<T> findAll(System.Predicate<T> arg0)

Parameters:

ParameterTypeDescription
arg0com.aspose.ms.System.Predicate

Returns: com.aspose.ms.System.Collections.Generic.List

findIndex(System.Predicate arg0)

public int findIndex(System.Predicate<T> arg0)

Parameters:

ParameterTypeDescription
arg0com.aspose.ms.System.Predicate

Returns: int

findIndex(int arg0, System.Predicate arg1)

public int findIndex(int arg0, System.Predicate<T> arg1)

Parameters:

ParameterTypeDescription
arg0int
arg1com.aspose.ms.System.Predicate

Returns: int

findIndex(int arg0, int arg1, System.Predicate arg2)

public int findIndex(int arg0, int arg1, System.Predicate<T> arg2)

Parameters:

ParameterTypeDescription
arg0int
arg1int
arg2com.aspose.ms.System.Predicate

Returns: int

findLast(System.Predicate arg0)

public T findLast(System.Predicate<T> arg0)

Parameters:

ParameterTypeDescription
arg0com.aspose.ms.System.Predicate

Returns: T

findLastIndex(System.Predicate arg0)

public int findLastIndex(System.Predicate<T> arg0)

Parameters:

ParameterTypeDescription
arg0com.aspose.ms.System.Predicate

Returns: int

findLastIndex(int arg0, System.Predicate arg1)

public int findLastIndex(int arg0, System.Predicate<T> arg1)

Parameters:

ParameterTypeDescription
arg0int
arg1com.aspose.ms.System.Predicate

Returns: int

findLastIndex(int arg0, int arg1, System.Predicate arg2)

public int findLastIndex(int arg0, int arg1, System.Predicate<T> arg2)

Parameters:

ParameterTypeDescription
arg0int
arg1int
arg2com.aspose.ms.System.Predicate

Returns: int

forEach(System.Action arg0)

public void forEach(System.Action<T> arg0)

Parameters:

ParameterTypeDescription
arg0com.aspose.ms.System.Action

get(int arg0)

public T get(int arg0)

Parameters:

ParameterTypeDescription
arg0int

Returns: T

getCapacity()

public int getCapacity()

Returns: int

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getRange(int arg0, int arg1)

public System.Collections.Generic.List<T> getRange(int arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0int
arg1int

Returns: com.aspose.ms.System.Collections.Generic.List

getSyncRoot()

public Object getSyncRoot()

Returns: java.lang.Object

get_Item(int arg0)

public T get_Item(int arg0)

Parameters:

ParameterTypeDescription
arg0int

Returns: T

hashCode()

public native int hashCode()

Returns: int

indexOf(T arg0, int arg1)

public int indexOf(T arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0T
arg1int

Returns: int

indexOf(T arg0, int arg1, int arg2)

public int indexOf(T arg0, int arg1, int arg2)

Parameters:

ParameterTypeDescription
arg0T
arg1int
arg2int

Returns: int

indexOf(Object arg0)

public int indexOf(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: int

indexOfItem(T arg0)

public int indexOfItem(T arg0)

Parameters:

ParameterTypeDescription
arg0T

Returns: int

insert(int index, String name, MapiMessage msg)

public final void insert(int index, String name, MapiMessage msg)

Inserts a message as attachment into the MapiAttachmentCollection at the specified index.

Parameters:

ParameterTypeDescription
indexintThe zero-based index at which should be inserted.
namejava.lang.StringThe name of attachment.
msgMapiMessageThe MapiMessage that represents the attached message.

insertItem(int arg0, T arg1)

public void insertItem(int arg0, T arg1)

Parameters:

ParameterTypeDescription
arg0int
arg1T

insertMapiAttachment(int index, MapiAttachment item)

public final void insertMapiAttachment(int index, MapiAttachment item)

Inserts an element into the System.Collections.ObjectModel.Collection1 at the specified index.

Parameters:

ParameterTypeDescription
indexintThe zero-based index at which item should be inserted.
itemMapiAttachmentThe object to insert. The value can be null for reference types.

insertRange(int arg0, System.Collections.Generic.IGenericEnumerable arg1)

public void insertRange(int arg0, System.Collections.Generic.IGenericEnumerable<T> arg1)

Parameters:

ParameterTypeDescription
arg0int
arg1com.aspose.ms.System.Collections.Generic.IGenericEnumerable

isEmpty()

public boolean isEmpty()

Returns: boolean

isFixedSize()

public boolean isFixedSize()

Returns: boolean

isReadOnly()

public boolean isReadOnly()

Returns: boolean

isSynchronized()

public boolean isSynchronized()

Returns: boolean

iterator()

public System.Collections.Generic.List.Enumerator<T> iterator()

Returns: com.aspose.ms.System.Collections.Generic.List.Enumerator

lastIndexOf(T arg0, int arg1)

public int lastIndexOf(T arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0T
arg1int

Returns: int

lastIndexOf(T arg0, int arg1, int arg2)

public int lastIndexOf(T arg0, int arg1, int arg2)

Parameters:

ParameterTypeDescription
arg0T
arg1int
arg2int

Returns: int

lastIndexOf(Object arg0)

public int lastIndexOf(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: int

listIterator()

public ListIterator listIterator()

Returns: java.util.ListIterator

listIterator(int arg0)

public ListIterator listIterator(int arg0)

Parameters:

ParameterTypeDescription
arg0int

Returns: java.util.ListIterator

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

remove(int arg0)

public T remove(int arg0)

Parameters:

ParameterTypeDescription
arg0int

Returns: T

remove(Object arg0)

public boolean remove(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

removeAll(System.Predicate arg0)

public int removeAll(System.Predicate<T> arg0)

Parameters:

ParameterTypeDescription
arg0com.aspose.ms.System.Predicate

Returns: int

removeAll(Collection arg0)

public boolean removeAll(Collection<?> arg0)

Parameters:

ParameterTypeDescription
arg0java.util.Collection

Returns: boolean

removeAt(int index)

public final void removeAt(int index)

Removes the element at the specified index of the MapiAttachmentCollection.

Parameters:

ParameterTypeDescription
indexinthe zero-based index of the element to remove.

removeItem(T arg0)

public boolean removeItem(T arg0)

Parameters:

ParameterTypeDescription
arg0T

Returns: boolean

removeMapiAttachment(MapiAttachment item)

public final boolean removeMapiAttachment(MapiAttachment item)

Removes the first occurrence of a specific object from the MapiAttachmentCollection.

Parameters:

ParameterTypeDescription
itemMapiAttachmentThe object to remove from the MapiAttachmentCollection.

Returns: boolean - true if item is successfully removed; otherwise, false.

removeRange(int arg0, int arg1)

public void removeRange(int arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0int
arg1int

replace(int index, String name, MapiMessage msg)

public final void replace(int index, String name, MapiMessage msg)

Replaces an element at the specified index.

Parameters:

ParameterTypeDescription
indexintThe zero-based index at which should be replaced.
namejava.lang.StringThe name of attachment.
msgMapiMessageThe MapiMessage that represents the attached message.

retainAll(Collection arg0)

public boolean retainAll(Collection<?> arg0)

Parameters:

ParameterTypeDescription
arg0java.util.Collection

Returns: boolean

reverse()

public void reverse()

reverse(int arg0, int arg1)

public void reverse(int arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0int
arg1int

set(int arg0, T arg1)

public T set(int arg0, T arg1)

Parameters:

ParameterTypeDescription
arg0int
arg1T

Returns: T

setCapacity(int arg0)

public void setCapacity(int arg0)

Parameters:

ParameterTypeDescription
arg0int

set_Item(int arg0, T arg1)

public void set_Item(int arg0, T arg1)

Parameters:

ParameterTypeDescription
arg0int
arg1T

size()

public int size()

Returns: int

sort()

public void sort()

sort(System.Comparison arg0)

public void sort(System.Comparison<T> arg0)

Parameters:

ParameterTypeDescription
arg0com.aspose.ms.System.Comparison

sort(int arg0, int arg1, Comparator arg2)

public void sort(int arg0, int arg1, Comparator<T> arg2)

Parameters:

ParameterTypeDescription
arg0int
arg1int
arg2java.util.Comparator

sort(Comparator<? super T> arg0)

public void sort(Comparator<? super T> arg0)

Parameters:

ParameterTypeDescription
arg0java.util.Comparator<? super T>

subList(int arg0, int arg1)

public List<T> subList(int arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0int
arg1int

Returns: java.util.List

toArray()

public Object[] toArray()

Returns: java.lang.Object[]

toString()

public String toString()

Returns: java.lang.String

trimExcess()

public void trimExcess()

trueForAll(System.Predicate arg0)

public boolean trueForAll(System.Predicate<T> arg0)

Parameters:

ParameterTypeDescription
arg0com.aspose.ms.System.Predicate

Returns: boolean

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int