mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-21 06:58:51 -05:00
EWS: implement batch move method
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@2314 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
192bd4500a
commit
732ed0ec66
@ -54,6 +54,7 @@ public abstract class EWSMethod extends PostMethod {
|
||||
protected FolderId toFolderId;
|
||||
protected FolderId parentFolderId;
|
||||
protected ItemId itemId;
|
||||
protected List<ItemId> itemIds;
|
||||
protected ItemId parentItemId;
|
||||
protected Set<FieldURI> additionalProperties;
|
||||
protected Disposal deleteType;
|
||||
@ -197,7 +198,14 @@ public abstract class EWSMethod extends PostMethod {
|
||||
if (updates == null) {
|
||||
writer.write("<m:ItemIds>");
|
||||
}
|
||||
itemId.write(writer);
|
||||
if (itemId != null) {
|
||||
itemId.write(writer);
|
||||
}
|
||||
if (itemIds != null) {
|
||||
for (ItemId localItemId:itemIds) {
|
||||
localItemId.write(writer);
|
||||
}
|
||||
}
|
||||
if (updates == null) {
|
||||
writer.write("</m:ItemIds>");
|
||||
}
|
||||
|
@ -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<ItemId> itemIds, FolderId toFolderId) {
|
||||
super("Item", "MoveItem");
|
||||
this.itemIds = itemIds;
|
||||
this.toFolderId = toFolderId;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user