Class Conversation
- java.lang.Object
-
- microsoft.exchange.webservices.data.core.service.ServiceObject
-
- microsoft.exchange.webservices.data.core.service.item.Conversation
-
public class Conversation extends ServiceObject
Represents a collection of Conversation related property. Properties available on this object are defined in the ConversationSchema class.
-
-
Constructor Summary
Constructors Constructor Description Conversation(ExchangeService service)Initializes an unsaved local instance of Conversation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcopyItemsInConversation(FolderId contextFolderId, FolderId destinationFolderId)Copies item in the specified conversation to a specific folder.voiddeleteItems(FolderId contextFolderId, DeleteMode deleteMode)Deletes item in the specified conversation.voiddisableAlwaysCategorizeItems(boolean processSynchronously)Sets up a conversation so that any item received within that conversation is no longer categorized.voiddisableAlwaysDeleteItems(boolean processSynchronously)Sets up a conversation so that any item received within that conversation is no longer moved to Deleted Items folder.voiddisableAlwaysMoveItemsInConversation(boolean processSynchronously)Sets up a conversation so that any item received within that conversation is no longer moved to a specific folder.voidenableAlwaysCategorizeItems(Iterable<String> categories, boolean processSynchronously)Sets up a conversation so that any item received within that conversation is always categorized.voidenableAlwaysDeleteItems(boolean processSynchronously)Sets up a conversation so that any item received within that conversation is always moved to Deleted Items folder.voidenableAlwaysMoveItems(FolderId destinationFolderId, boolean processSynchronously)Sets up a conversation so that any item received within that conversation is always moved to a specific folder.StringListgetCategories()Gets a list summarizing the categories stamped on messages in this conversation, in the current folder only.StringgetChangeXmlElementName()This method is not supported in this object.StringgetDeleteFieldXmlElementName()This method is not supported in this object.protected ExtendedPropertyCollectiongetExtendedProperties()This method is not supported in this object.ConversationFlagStatusgetFlagStatus()Gets the flag status for this conversation, calculated by aggregating individual messages flag status in the current folder.StringListgetGlobalCategories()Gets a list summarizing the categories stamped on messages in this conversation, across all folder in the mailbox.ConversationFlagStatusgetGlobalFlagStatus()Gets the flag status for this conversation, calculated by aggregating individual messages flag status across all folder in the mailbox.booleangetGlobalHasAttachments()Gets a value indicating if at least one message in this conversation, across all folder in the mailbox, has an attachment.ImportancegetGlobalImportance()Gets the importance of this conversation, calculated by aggregating individual messages importance across all folder in the mailbox.StringListgetGlobalItemClasses()Gets a list summarizing the classes of the item in this conversation, across all folder in the mailbox.ItemIdCollectiongetGlobalItemIds()Gets the Ids of the messages in this conversation, across all folder in the mailbox.DategetGlobalLastDeliveryTime()Gets the delivery time of the message that was last received in this conversation across all folder in the mailbox.intgetGlobalMessageCount()Gets the total number of messages in this conversation across all folder in the mailbox.intgetGlobalSize()Gets the size of this conversation, calculated by adding the sizes of all messages in the conversation across all folder in the mailbox.StringListgetGlobalUniqueRecipients()Gets a list of all the people who have received messages in this conversation across all folder in the mailbox.StringListgetGlobalUniqueSenders()Gets a list of all the people who have sent messages in this conversation across all folder in the mailbox.StringListgetGlobalUniqueUnreadSenders()Gets a list of all the people who have sent messages that are currently unread in this conversation across all folder in the mailbox.intgetGlobalUnreadCount()Gets the total number of unread messages in this conversation across all folder in the mailbox.booleangetHasAttachments()Gets a value indicating if at least one message in this conversation, in the current folder only, has an attachment.ConversationIdgetId()Gets the Id of this Conversation.PropertyDefinitiongetIdPropertyDefinition()The property definition for the Id of this object.ImportancegetImportance()Gets the importance of this conversation, calculated by aggregating individual messages importance in the current folder only.protected booleangetIsTimeZoneHeaderRequired(boolean isUpdateOperation)This method is not supported in this object.StringListgetItemClasses()Gets a list summarizing the classes of the item in this conversation, in the current folder only.ItemIdCollectiongetItemIds()Gets the Ids of the messages in this conversation, in the current folder only.DategetLastDeliveryTime()Gets the delivery time of the message that was last received in this conversation in the current folder only.intgetMessageCount()Gets the total number of messages in this conversation in the current folder only.ExchangeVersiongetMinimumRequiredServerVersion()Gets the minimum required server version.ServiceObjectSchemagetSchema()Internal method to return the schema associated with this type of objectStringgetSetFieldXmlElementName()This method is not supported in this object.intgetSize()Gets the size of this conversation, calculated by adding the sizes of all messages in the conversation in the current folder only.StringgetTopic()Gets the topic of this Conversation.StringListgetUniqueRecipients()Gets a list of all the people who have received messages in this conversation in the current folder only.StringListgetUniqueSenders()Gets a list of all the people who have sent messages in this conversation in the current folder only.StringListgetUniqueUnreadSenders()Gets a list of all the people who have sent messages that are currently unread in this conversation in the current folder only.intgetUnreadCount()Gets the total number of unread messages in this conversation in the current folder only.protected voidinternalDelete(DeleteMode deleteMode, SendCancellationsMode sendCancellationsMode, AffectedTaskOccurrence affectedTaskOccurrences)This is not supported in this object.protected voidinternalLoad(PropertySet propertySet)This method is not supported in this object.voidmoveItemsInConversation(FolderId contextFolderId, FolderId destinationFolderId)Moves item in the specified conversation to a specific folder.voidsetReadStateForItemsInConversation(FolderId contextFolderId, boolean isRead)Sets the read state of item in the specified conversation.-
Methods inherited from class microsoft.exchange.webservices.data.core.service.ServiceObject
addServiceObjectChangedEvent, changed, clearChangeLog, clearServiceObjectChangedEvent, getIsCustomDateTimeScopingRequired, getLoadedPropertyDefinitions, getObjectFromPropertyDefinition, getPropertyBag, getService, getXmlElementName, getXmlElementNameOverride, isDirty, isNew, load, load, loadFromXml, loadFromXml, removeServiceObjectChangedEvent, schema, setService, throwIfThisIsNew, throwIfThisIsNotNew, tryGetExtendedProperty, tryGetProperty, tryGetProperty, validate, writeToXml, writeToXmlForUpdate
-
-
-
-
Constructor Detail
-
Conversation
public Conversation(ExchangeService service) throws Exception
Initializes an unsaved local instance of Conversation.- Parameters:
service- The service The ExchangeService object to which the item will be bound.- Throws:
Exception
-
-
Method Detail
-
getSchema
public ServiceObjectSchema getSchema()
Internal method to return the schema associated with this type of object- Specified by:
getSchemain classServiceObject- Returns:
- The schema associated with this type of object.
-
getMinimumRequiredServerVersion
public ExchangeVersion getMinimumRequiredServerVersion()
Gets the minimum required server version.- Specified by:
getMinimumRequiredServerVersionin classServiceObject- Returns:
- Earliest Exchange version in which this service object type is supported.
-
getIdPropertyDefinition
public PropertyDefinition getIdPropertyDefinition()
The property definition for the Id of this object.- Overrides:
getIdPropertyDefinitionin classServiceObject- Returns:
- A PropertyDefinition instance.
-
internalLoad
protected void internalLoad(PropertySet propertySet)
This method is not supported in this object. Loads the specified set of property on the object.- Specified by:
internalLoadin classServiceObject- Parameters:
propertySet- The propertySet The property to load.
-
internalDelete
protected void internalDelete(DeleteMode deleteMode, SendCancellationsMode sendCancellationsMode, AffectedTaskOccurrence affectedTaskOccurrences)
This is not supported in this object. Deletes the object.- Specified by:
internalDeletein classServiceObject- Parameters:
deleteMode- The deleteMode The deletion mode.sendCancellationsMode- The sendCancellationsMode Indicates whether meeting cancellation messages should be sent.affectedTaskOccurrences- The affectedTaskOccurrences Indicate which occurrence of a recurring task should be deleted.
-
getChangeXmlElementName
public String getChangeXmlElementName()
This method is not supported in this object. Gets the name of the change XML element.- Overrides:
getChangeXmlElementNamein classServiceObject- Returns:
- XML element name
-
getDeleteFieldXmlElementName
public String getDeleteFieldXmlElementName()
This method is not supported in this object. Gets the name of the delete field XML element.- Overrides:
getDeleteFieldXmlElementNamein classServiceObject- Returns:
- XML element name
-
getSetFieldXmlElementName
public String getSetFieldXmlElementName()
This method is not supported in this object. Gets the name of the set field XML element.- Overrides:
getSetFieldXmlElementNamein classServiceObject- Returns:
- XML element name
-
getIsTimeZoneHeaderRequired
protected boolean getIsTimeZoneHeaderRequired(boolean isUpdateOperation)
This method is not supported in this object. Gets a value indicating whether a time zone SOAP header should be emitted in a CreateItem or UpdateItem request so this item can be property saved or updated.- Overrides:
getIsTimeZoneHeaderRequiredin classServiceObject- Parameters:
isUpdateOperation- Indicates whether the operation being petrformed is an update operation.- Returns:
- true if a time zone SOAP header should be emitted; otherwise, false.
-
getExtendedProperties
protected ExtendedPropertyCollection getExtendedProperties()
This method is not supported in this object. Gets the extended property collection.- Overrides:
getExtendedPropertiesin classServiceObject- Returns:
- Extended property collection.
-
enableAlwaysCategorizeItems
public void enableAlwaysCategorizeItems(Iterable<String> categories, boolean processSynchronously) throws ServiceResponseException, IndexOutOfBoundsException, Exception
Sets up a conversation so that any item received within that conversation is always categorized. Calling this method results in a call to EWS.- Parameters:
categories- The categories that should be stamped on item in the conversation.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:
ExceptionIndexOutOfBoundsExceptionServiceResponseException
-
disableAlwaysCategorizeItems
public void disableAlwaysCategorizeItems(boolean processSynchronously) throws ServiceResponseException, IndexOutOfBoundsException, Exception
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.- Parameters:
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:
ExceptionIndexOutOfBoundsExceptionServiceResponseException
-
enableAlwaysDeleteItems
public void enableAlwaysDeleteItems(boolean processSynchronously) throws ServiceResponseException, IndexOutOfBoundsException, Exception
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.- Parameters:
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:
ExceptionIndexOutOfBoundsExceptionServiceResponseException
-
disableAlwaysDeleteItems
public void disableAlwaysDeleteItems(boolean processSynchronously) throws ServiceResponseException, IndexOutOfBoundsException, Exception
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.- Parameters:
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:
ExceptionIndexOutOfBoundsExceptionServiceResponseException
-
enableAlwaysMoveItems
public void enableAlwaysMoveItems(FolderId destinationFolderId, boolean processSynchronously) throws ServiceResponseException, IndexOutOfBoundsException, Exception
Sets up a conversation so that any item received within that conversation is always moved to a specific folder. Calling this method results in a call to EWS.- Parameters:
destinationFolderId- The Id of the folder to which conversation item should be moved.processSynchronously- Indicates whether the method should return only once enabling this rule and moving existing item in the conversation is completely done. If processSynchronously is false, the method returns immediately.- Throws:
ExceptionIndexOutOfBoundsExceptionServiceResponseException
-
disableAlwaysMoveItemsInConversation
public void disableAlwaysMoveItemsInConversation(boolean processSynchronously) throws ServiceResponseException, IndexOutOfBoundsException, Exception
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.- Parameters:
processSynchronously- Indicates whether the method should return only once disabling this rule is completely done. If processSynchronously is false, the method returns immediately.- Throws:
ExceptionIndexOutOfBoundsExceptionServiceResponseException
-
deleteItems
public void deleteItems(FolderId contextFolderId, DeleteMode deleteMode) throws ServiceResponseException, IndexOutOfBoundsException, Exception
Deletes item in the specified conversation. Calling this method results in a call to EWS.- Parameters:
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.deleteMode- The deletion mode.- Throws:
ExceptionIndexOutOfBoundsExceptionServiceResponseException
-
moveItemsInConversation
public void moveItemsInConversation(FolderId contextFolderId, FolderId destinationFolderId) throws ServiceResponseException, IndexOutOfBoundsException, Exception
Moves item in the specified conversation to a specific folder. Calling this method results in a call to EWS.- Parameters:
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.destinationFolderId- The Id of the destination folder.- Throws:
ExceptionIndexOutOfBoundsExceptionServiceResponseException
-
copyItemsInConversation
public void copyItemsInConversation(FolderId contextFolderId, FolderId destinationFolderId) throws ServiceResponseException, IndexOutOfBoundsException, Exception
Copies item in the specified conversation to a specific folder. Calling this method results in a call to EWS.- Parameters:
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.destinationFolderId- The Id of the destination folder.- Throws:
ExceptionIndexOutOfBoundsExceptionServiceResponseException
-
setReadStateForItemsInConversation
public void setReadStateForItemsInConversation(FolderId contextFolderId, boolean isRead) throws ServiceResponseException, IndexOutOfBoundsException, Exception
Sets the read state of item in the specified conversation. Calling this method results in a call to EWS.- Parameters:
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.isRead- if set to true, conversation item are marked as read; otherwise they are marked as unread.- Throws:
ExceptionIndexOutOfBoundsExceptionServiceResponseException
-
getId
public ConversationId getId() throws ServiceLocalException
Gets the Id of this Conversation.- Overrides:
getIdin classServiceObject- Returns:
- Id
- Throws:
ServiceLocalException
-
getTopic
public String getTopic() throws ArgumentException
Gets the topic of this Conversation.- Returns:
- value
- Throws:
ArgumentException
-
getUniqueRecipients
public StringList getUniqueRecipients() throws Exception
Gets a list of all the people who have received messages in this conversation in the current folder only.- Returns:
- String
- Throws:
Exception
-
getGlobalUniqueRecipients
public StringList getGlobalUniqueRecipients() throws Exception
Gets a list of all the people who have received messages in this conversation across all folder in the mailbox.- Returns:
- String
- Throws:
Exception
-
getUniqueUnreadSenders
public StringList getUniqueUnreadSenders() throws ArgumentException
Gets a list of all the people who have sent messages that are currently unread in this conversation in the current folder only.- Returns:
- unreadSenders
- Throws:
ArgumentException
-
getGlobalUniqueUnreadSenders
public StringList getGlobalUniqueUnreadSenders() throws ArgumentException
Gets a list of all the people who have sent messages that are currently unread in this conversation across all folder in the mailbox.- Returns:
- unreadSenders
- Throws:
ArgumentException
-
getUniqueSenders
public StringList getUniqueSenders() throws Exception
Gets a list of all the people who have sent messages in this conversation in the current folder only.- Returns:
- String
- Throws:
Exception
-
getGlobalUniqueSenders
public StringList getGlobalUniqueSenders() throws Exception
Gets a list of all the people who have sent messages in this conversation across all folder in the mailbox.- Returns:
- String
- Throws:
Exception
-
getLastDeliveryTime
public Date getLastDeliveryTime() throws Exception
Gets the delivery time of the message that was last received in this conversation in the current folder only.- Returns:
- Date
- Throws:
Exception
-
getGlobalLastDeliveryTime
public Date getGlobalLastDeliveryTime() throws Exception
Gets the delivery time of the message that was last received in this conversation across all folder in the mailbox.- Returns:
- Date
- Throws:
Exception
-
getCategories
public StringList getCategories() throws ArgumentException
Gets a list summarizing the categories stamped on messages in this conversation, in the current folder only.- Returns:
- value
- Throws:
ArgumentException
-
getGlobalCategories
public StringList getGlobalCategories() throws ArgumentException
Gets a list summarizing the categories stamped on messages in this conversation, across all folder in the mailbox.- Returns:
- returnValue
- Throws:
ArgumentException
-
getFlagStatus
public ConversationFlagStatus getFlagStatus() throws ArgumentException
Gets the flag status for this conversation, calculated by aggregating individual messages flag status in the current folder.- Returns:
- returnValue
- Throws:
ArgumentException
-
getGlobalFlagStatus
public ConversationFlagStatus getGlobalFlagStatus() throws ArgumentException
Gets the flag status for this conversation, calculated by aggregating individual messages flag status across all folder in the mailbox.- Returns:
- returnValue
- Throws:
ArgumentException
-
getHasAttachments
public boolean getHasAttachments() throws ServiceLocalException
Gets a value indicating if at least one message in this conversation, in the current folder only, has an attachment.- Returns:
- Value
- Throws:
ServiceLocalException
-
getGlobalHasAttachments
public boolean getGlobalHasAttachments() throws ServiceLocalException
Gets a value indicating if at least one message in this conversation, across all folder in the mailbox, has an attachment.- Returns:
- boolean
- Throws:
ServiceLocalException
-
getMessageCount
public int getMessageCount() throws ServiceLocalException
Gets the total number of messages in this conversation in the current folder only.- Returns:
- integer
- Throws:
ServiceLocalException
-
getGlobalMessageCount
public int getGlobalMessageCount() throws ServiceLocalException
Gets the total number of messages in this conversation across all folder in the mailbox.- Returns:
- integer
- Throws:
ServiceLocalException
-
getUnreadCount
public int getUnreadCount() throws ArgumentException
Gets the total number of unread messages in this conversation in the current folder only.- Returns:
- returnValue
- Throws:
ArgumentException
-
getGlobalUnreadCount
public int getGlobalUnreadCount() throws ArgumentException
Gets the total number of unread messages in this conversation across all folder in the mailbox.- Returns:
- returnValue
- Throws:
ArgumentException
-
getSize
public int getSize() throws ServiceLocalException
Gets the size of this conversation, calculated by adding the sizes of all messages in the conversation in the current folder only.- Returns:
- integer
- Throws:
ServiceLocalException
-
getGlobalSize
public int getGlobalSize() throws ServiceLocalException
Gets the size of this conversation, calculated by adding the sizes of all messages in the conversation across all folder in the mailbox.- Returns:
- integer
- Throws:
ServiceLocalException
-
getItemClasses
public StringList getItemClasses() throws Exception
Gets a list summarizing the classes of the item in this conversation, in the current folder only.- Returns:
- string
- Throws:
Exception
-
getGlobalItemClasses
public StringList getGlobalItemClasses() throws Exception
Gets a list summarizing the classes of the item in this conversation, across all folder in the mailbox.- Returns:
- string
- Throws:
Exception
-
getImportance
public Importance getImportance() throws Exception
Gets the importance of this conversation, calculated by aggregating individual messages importance in the current folder only.- Returns:
- important
- Throws:
Exception
-
getGlobalImportance
public Importance getGlobalImportance() throws Exception
Gets the importance of this conversation, calculated by aggregating individual messages importance across all folder in the mailbox.- Returns:
- important
- Throws:
Exception
-
getItemIds
public ItemIdCollection getItemIds() throws Exception
Gets the Ids of the messages in this conversation, in the current folder only.- Returns:
- Id
- Throws:
Exception
-
getGlobalItemIds
public ItemIdCollection getGlobalItemIds() throws Exception
Gets the Ids of the messages in this conversation, across all folder in the mailbox.- Returns:
- Id
- Throws:
Exception
-
-