public Object createServiceObjectWithServiceParam( ExchangeService srv) throws Exception { return new Conversation(srv); } }, null);
/** * 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(); }
/** * Gets the Id of this Conversation. * * @return Id * @throws ServiceLocalException */ public ConversationId getId() throws ServiceLocalException { return getPropertyBag().getObjectFromPropertyDefinition( getIdPropertyDefinition()); }
/** * Sets up a conversation so that any item received within that * conversation is no longer moved to Deleted Items folder. * Calling this method results in a call to EWS. * * @param processSynchronously Indicates whether the method should return * only once disabling this rule and restoring the item * in the conversation is completely done. If processSynchronously * is false, the method returns immediately. * @throws Exception * @throws IndexOutOfBoundsException * @throws ServiceResponseException */ public void disableAlwaysDeleteItems(boolean processSynchronously) throws ServiceResponseException, IndexOutOfBoundsException, Exception { ArrayList<ConversationId> convArry = new ArrayList<ConversationId>(); convArry.add(this.getId()); this.getService().disableAlwaysDeleteItemsInConversations( convArry, processSynchronously).getResponseAtIndex(0).throwIfNecessary(); }
/** * Gets a list of all the people who have received * messages in this conversation in the current folder only. * * @return String * @throws Exception */ public StringList getUniqueRecipients() throws Exception { return getPropertyBag().getObjectFromPropertyDefinition( ConversationSchema.UniqueRecipients); }
reader.skipCurrentElement(); } else { item.loadFromXml( reader, true, /* clearPropertyBag */
/** * Gets a list summarizing the classes of the item * in this conversation, in the current folder only. * * @return string * @throws Exception */ public StringList getItemClasses() throws Exception { return getPropertyBag().getObjectFromPropertyDefinition( ConversationSchema.ItemClasses); }
/** * Sets up a conversation so that any item received * within that conversation is always moved to Deleted Items folder. * Calling this method results in a call to EWS. * * @param processSynchronously Indicates whether the method should * return only once enabling this rule and deleting existing item * in the conversation is completely done. If processSynchronously * is false, the method returns immediately. * @throws Exception * @throws IndexOutOfBoundsException * @throws ServiceResponseException */ public void enableAlwaysDeleteItems(boolean processSynchronously) throws ServiceResponseException, IndexOutOfBoundsException, Exception { ArrayList<ConversationId> convArry = new ArrayList<ConversationId>(); convArry.add(this.getId()); this.getService().enableAlwaysDeleteItemsInConversations( convArry, processSynchronously).getResponseAtIndex(0).throwIfNecessary(); }
reader.skipCurrentElement(); } else { item.loadFromXml( reader, true, /* clearPropertyBag */
/** * 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(); }
/** * Gets a list summarizing the classes of the item * in this conversation, across all folder in the mailbox. * * @return string * @throws Exception */ public StringList getGlobalItemClasses() throws Exception { return getPropertyBag().getObjectFromPropertyDefinition( ConversationSchema.GlobalItemClasses); }
/** * Sets up a conversation so that any item * received within that conversation is no longer categorized. * Calling this method results in a call to EWS. * * @param processSynchronously Indicates whether the method should * return only once disabling this rule and * removing the categories from existing item * in the conversation is completely done. If processSynchronously * is false, the method returns immediately. * @throws Exception * @throws IndexOutOfBoundsException * @throws ServiceResponseException */ public void disableAlwaysCategorizeItems(boolean processSynchronously) throws ServiceResponseException, IndexOutOfBoundsException, Exception { ArrayList<ConversationId> convArry = new ArrayList<ConversationId>(); convArry.add(this.getId()); this.getService().disableAlwaysCategorizeItemsInConversations( convArry, processSynchronously). getResponseAtIndex(0).throwIfNecessary(); }
/** * Gets the Id of this Conversation. * * @return Id * @throws ServiceLocalException */ public ConversationId getId() throws ServiceLocalException { return getPropertyBag().getObjectFromPropertyDefinition( getIdPropertyDefinition()); }
public Object createServiceObjectWithServiceParam( ExchangeService srv) throws Exception { return new Conversation(srv); } }, null);
/** * 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(); }
/** * Gets the delivery time of the message that was last * received in this conversation in the current folder only. * * @return Date * @throws Exception */ public Date getLastDeliveryTime() throws Exception { return getPropertyBag().getObjectFromPropertyDefinition( ConversationSchema.LastDeliveryTime); }
/** * Sets up a conversation so that any item received within * that conversation is no longer moved to a specific * folder. Calling this method results in a call to EWS. * * @param processSynchronously Indicates whether the method should return only * once disabling this * rule is completely done. If processSynchronously * is false, the method returns immediately. * @throws Exception * @throws IndexOutOfBoundsException * @throws ServiceResponseException */ public void disableAlwaysMoveItemsInConversation(boolean processSynchronously) throws ServiceResponseException, IndexOutOfBoundsException, Exception { ArrayList<ConversationId> convArry = new ArrayList<ConversationId>(); convArry.add(this.getId()); this.getService().disableAlwaysMoveItemsInConversations( convArry, processSynchronously).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(); }
/** * Gets a list of all the people who have sent messages * in this conversation across all folder in the mailbox. * * @return String * @throws Exception */ public StringList getGlobalUniqueSenders() throws Exception { return getPropertyBag().getObjectFromPropertyDefinition( ConversationSchema.GlobalUniqueSenders); }
/** * Sets up a conversation so that any item * received within that conversation is always categorized. * Calling this method results in a call to EWS. * * @param categories The categories that should be stamped on item in the conversation. * @param processSynchronously Indicates whether the method should * return only once enabling this rule and stamping existing item * in the conversation is completely done. * If processSynchronously is false, the method returns immediately. * @throws Exception * @throws IndexOutOfBoundsException * @throws ServiceResponseException */ public void enableAlwaysCategorizeItems(Iterable<String> categories, boolean processSynchronously) throws ServiceResponseException, IndexOutOfBoundsException, Exception { ArrayList<ConversationId> convArry = new ArrayList<ConversationId>(); convArry.add(this.getId()); this.getService().enableAlwaysCategorizeItemsInConversations( convArry, categories, processSynchronously).getResponseAtIndex(0).throwIfNecessary(); }