diff --git a/src/java/davmail/exchange/ews/DeleteItemMethod.java b/src/java/davmail/exchange/ews/DeleteItemMethod.java index 79a006ca..d2874547 100644 --- a/src/java/davmail/exchange/ews/DeleteItemMethod.java +++ b/src/java/davmail/exchange/ews/DeleteItemMethod.java @@ -28,9 +28,10 @@ public class DeleteItemMethod extends EWSMethod { * @param itemId item id * @param deleteType delete mode */ - public DeleteItemMethod(ItemId itemId, DeleteType deleteType) { + public DeleteItemMethod(ItemId itemId, DeleteType deleteType, SendMeetingCancellations sendMeetingCancellations) { super("Item", "DeleteItem"); addMethodOption(deleteType); + addMethodOption(sendMeetingCancellations); this.itemId = itemId; } diff --git a/src/java/davmail/exchange/ews/EwsExchangeSession.java b/src/java/davmail/exchange/ews/EwsExchangeSession.java index b4eb7810..52ee29a5 100644 --- a/src/java/davmail/exchange/ews/EwsExchangeSession.java +++ b/src/java/davmail/exchange/ews/EwsExchangeSession.java @@ -194,7 +194,7 @@ public class EwsExchangeSession extends ExchangeSession { @Override public void deleteMessage(ExchangeSession.Message message) throws IOException { LOGGER.debug("Delete " + message.permanentUrl); - DeleteItemMethod deleteItemMethod = new DeleteItemMethod(((EwsExchangeSession.Message) message).itemId, DeleteType.HardDelete); + DeleteItemMethod deleteItemMethod = new DeleteItemMethod(((EwsExchangeSession.Message) message).itemId, DeleteType.HardDelete, SendMeetingCancellations.SendToNone); executeMethod(deleteItemMethod); } @@ -1081,7 +1081,7 @@ public class EwsExchangeSession extends ExchangeSession { public void deleteItem(String folderPath, String itemName) throws IOException { EWSMethod.Item item = getEwsItem(folderPath, itemName); if (item != null) { - DeleteItemMethod deleteItemMethod = new DeleteItemMethod(new ItemId(item), DeleteType.HardDelete); + DeleteItemMethod deleteItemMethod = new DeleteItemMethod(new ItemId(item), DeleteType.HardDelete, SendMeetingCancellations.SendToNone); executeMethod(deleteItemMethod); } } diff --git a/src/java/davmail/exchange/ews/MessageDisposition.java b/src/java/davmail/exchange/ews/MessageDisposition.java index 433ba412..9a2e33ae 100644 --- a/src/java/davmail/exchange/ews/MessageDisposition.java +++ b/src/java/davmail/exchange/ews/MessageDisposition.java @@ -21,6 +21,7 @@ package davmail.exchange.ews; /** * MessageDisposition flag. */ +@SuppressWarnings({"JavaDoc"}) public class MessageDisposition extends AttributeOption { private MessageDisposition(String value) { diff --git a/src/java/davmail/exchange/ews/SendMeetingCancellations.java b/src/java/davmail/exchange/ews/SendMeetingCancellations.java new file mode 100644 index 00000000..1f349e08 --- /dev/null +++ b/src/java/davmail/exchange/ews/SendMeetingCancellations.java @@ -0,0 +1,32 @@ +/* + * DavMail POP/IMAP/SMTP/CalDav/LDAP Exchange Gateway + * Copyright (C) 2010 Mickael Guessant + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package davmail.exchange.ews; + +/** + * Item update option. + */ +public class SendMeetingCancellations extends AttributeOption { + private SendMeetingCancellations(String value) { + super("SendMeetingCancellations", value); + } + + public static final SendMeetingCancellations SendToNone = new SendMeetingCancellations("SendToNone"); + public static final SendMeetingCancellations SendOnlyToAll = new SendMeetingCancellations("SendOnlyToAll"); + public static final SendMeetingCancellations SendToAllAndSaveCopy = new SendMeetingCancellations("SendToAllAndSaveCopy"); +}