/** * Copies item in the specified conversation to a specific folder. * Calling this method results in a call to EWS. * * @param contextFolderId The Id of the folder item must belong to in * order to be copied. If contextFolderId * is null, item across the entire mailbox are copied. * @param destinationFolderId The Id of the destination folder. * @throws Exception * @throws IndexOutOfBoundsException * @throws ServiceResponseException */ public void copyItemsInConversation( FolderId contextFolderId, FolderId destinationFolderId) throws ServiceResponseException, IndexOutOfBoundsException, Exception { HashMap<ConversationId, Date> m = new HashMap<ConversationId, Date>(); m.put(this.getId(), this.getGlobalLastDeliveryTime()); List<HashMap<ConversationId, Date>> f = new ArrayList<HashMap<ConversationId, Date>>(); f.add(m); this.getService().copyItemsInConversations( f, contextFolderId, destinationFolderId). getResponseAtIndex(0).throwIfNecessary(); }
/** * Deletes item in the specified conversation. * Calling this method results in a call to EWS. * * @param contextFolderId The Id of the folder item must belong * to in order to be deleted. If contextFolderId is * null, item across the entire mailbox are deleted. * @param deleteMode The deletion mode. * @throws Exception * @throws IndexOutOfBoundsException * @throws ServiceResponseException */ public void deleteItems(FolderId contextFolderId, DeleteMode deleteMode) throws ServiceResponseException, IndexOutOfBoundsException, Exception { HashMap<ConversationId, Date> m = new HashMap<ConversationId, Date>(); m.put(this.getId(), this.getGlobalLastDeliveryTime()); List<HashMap<ConversationId, Date>> f = new ArrayList<HashMap<ConversationId, Date>>(); f.add(m); this.getService().deleteItemsInConversations( f, contextFolderId, deleteMode).getResponseAtIndex(0).throwIfNecessary(); }
/** * Sets the read state of item in the specified conversation. * Calling this method results in a call to EWS. * * @param contextFolderId The Id of the folder item must * belong to in order for their read state to * be set. If contextFolderId is null, the read states of * item across the entire mailbox are set. * @param isRead if set to <c>true</c>, conversation item are marked as read; * otherwise they are marked as unread. * @throws Exception * @throws IndexOutOfBoundsException * @throws ServiceResponseException */ public void setReadStateForItemsInConversation( FolderId contextFolderId, boolean isRead) throws ServiceResponseException, IndexOutOfBoundsException, Exception { HashMap<ConversationId, Date> m = new HashMap<ConversationId, Date>(); m.put(this.getId(), this.getGlobalLastDeliveryTime()); List<HashMap<ConversationId, Date>> f = new ArrayList<HashMap<ConversationId, Date>>(); f.add(m); this.getService().setReadStateForItemsInConversations( f, contextFolderId, isRead). getResponseAtIndex(0).throwIfNecessary(); }
/** * Moves item in the specified conversation to a specific folder. * Calling this method results in a call to EWS. * * @param contextFolderId The Id of the folder item must belong to * in order to be moved. If contextFolderId is null, * item across the entire mailbox are moved. * @param destinationFolderId The Id of the destination folder. * @throws Exception * @throws IndexOutOfBoundsException * @throws ServiceResponseException */ public void moveItemsInConversation( FolderId contextFolderId, FolderId destinationFolderId) throws ServiceResponseException, IndexOutOfBoundsException, Exception { HashMap<ConversationId, Date> m = new HashMap<ConversationId, Date>(); m.put(this.getId(), this.getGlobalLastDeliveryTime()); List<HashMap<ConversationId, Date>> f = new ArrayList<HashMap<ConversationId, Date>>(); f.add(m); this.getService().moveItemsInConversations( f, contextFolderId, destinationFolderId). getResponseAtIndex(0).throwIfNecessary(); }
/** * Deletes item in the specified conversation. * Calling this method results in a call to EWS. * * @param contextFolderId The Id of the folder item must belong * to in order to be deleted. If contextFolderId is * null, item across the entire mailbox are deleted. * @param deleteMode The deletion mode. * @throws Exception * @throws IndexOutOfBoundsException * @throws ServiceResponseException */ public void deleteItems(FolderId contextFolderId, DeleteMode deleteMode) throws ServiceResponseException, IndexOutOfBoundsException, Exception { HashMap<ConversationId, Date> m = new HashMap<ConversationId, Date>(); m.put(this.getId(), this.getGlobalLastDeliveryTime()); List<HashMap<ConversationId, Date>> f = new ArrayList<HashMap<ConversationId, Date>>(); f.add(m); this.getService().deleteItemsInConversations( f, contextFolderId, deleteMode).getResponseAtIndex(0).throwIfNecessary(); }
/** * Sets the read state of item in the specified conversation. * Calling this method results in a call to EWS. * * @param contextFolderId The Id of the folder item must * belong to in order for their read state to * be set. If contextFolderId is null, the read states of * item across the entire mailbox are set. * @param isRead if set to <c>true</c>, conversation item are marked as read; * otherwise they are marked as unread. * @throws Exception * @throws IndexOutOfBoundsException * @throws ServiceResponseException */ public void setReadStateForItemsInConversation( FolderId contextFolderId, boolean isRead) throws ServiceResponseException, IndexOutOfBoundsException, Exception { HashMap<ConversationId, Date> m = new HashMap<ConversationId, Date>(); m.put(this.getId(), this.getGlobalLastDeliveryTime()); List<HashMap<ConversationId, Date>> f = new ArrayList<HashMap<ConversationId, Date>>(); f.add(m); this.getService().setReadStateForItemsInConversations( f, contextFolderId, isRead). getResponseAtIndex(0).throwIfNecessary(); }
/** * Moves item in the specified conversation to a specific folder. * Calling this method results in a call to EWS. * * @param contextFolderId The Id of the folder item must belong to * in order to be moved. If contextFolderId is null, * item across the entire mailbox are moved. * @param destinationFolderId The Id of the destination folder. * @throws Exception * @throws IndexOutOfBoundsException * @throws ServiceResponseException */ public void moveItemsInConversation( FolderId contextFolderId, FolderId destinationFolderId) throws ServiceResponseException, IndexOutOfBoundsException, Exception { HashMap<ConversationId, Date> m = new HashMap<ConversationId, Date>(); m.put(this.getId(), this.getGlobalLastDeliveryTime()); List<HashMap<ConversationId, Date>> f = new ArrayList<HashMap<ConversationId, Date>>(); f.add(m); this.getService().moveItemsInConversations( f, contextFolderId, destinationFolderId). getResponseAtIndex(0).throwIfNecessary(); }
/** * Copies item in the specified conversation to a specific folder. * Calling this method results in a call to EWS. * * @param contextFolderId The Id of the folder item must belong to in * order to be copied. If contextFolderId * is null, item across the entire mailbox are copied. * @param destinationFolderId The Id of the destination folder. * @throws Exception * @throws IndexOutOfBoundsException * @throws ServiceResponseException */ public void copyItemsInConversation( FolderId contextFolderId, FolderId destinationFolderId) throws ServiceResponseException, IndexOutOfBoundsException, Exception { HashMap<ConversationId, Date> m = new HashMap<ConversationId, Date>(); m.put(this.getId(), this.getGlobalLastDeliveryTime()); List<HashMap<ConversationId, Date>> f = new ArrayList<HashMap<ConversationId, Date>>(); f.add(m); this.getService().copyItemsInConversations( f, contextFolderId, destinationFolderId). getResponseAtIndex(0).throwIfNecessary(); }