diff --git a/src/java/davmail/exchange/ews/EWSMethod.java b/src/java/davmail/exchange/ews/EWSMethod.java index 31820957..5fc77916 100644 --- a/src/java/davmail/exchange/ews/EWSMethod.java +++ b/src/java/davmail/exchange/ews/EWSMethod.java @@ -54,6 +54,7 @@ public abstract class EWSMethod extends PostMethod { protected FolderId toFolderId; protected FolderId parentFolderId; protected ItemId itemId; + protected List itemIds; protected ItemId parentItemId; protected Set additionalProperties; protected Disposal deleteType; @@ -197,7 +198,14 @@ public abstract class EWSMethod extends PostMethod { if (updates == null) { writer.write(""); } - itemId.write(writer); + if (itemId != null) { + itemId.write(writer); + } + if (itemIds != null) { + for (ItemId localItemId:itemIds) { + localItemId.write(writer); + } + } if (updates == null) { writer.write(""); } diff --git a/src/java/davmail/exchange/ews/MoveItemMethod.java b/src/java/davmail/exchange/ews/MoveItemMethod.java index e22d1350..e5d7dd03 100644 --- a/src/java/davmail/exchange/ews/MoveItemMethod.java +++ b/src/java/davmail/exchange/ews/MoveItemMethod.java @@ -18,6 +18,8 @@ */ package davmail.exchange.ews; +import java.util.List; + /** * Move Item method. */ @@ -33,4 +35,16 @@ public class MoveItemMethod extends EWSMethod { this.itemId = itemId; this.toFolderId = toFolderId; } + + /** + * Move items to target folder. + * + * @param itemIds item id list + * @param toFolderId target folder id + */ + public MoveItemMethod(List itemIds, FolderId toFolderId) { + super("Item", "MoveItem"); + this.itemIds = itemIds; + this.toFolderId = toFolderId; + } }