microsoft.exchange.webservices.data
Class Conversation

java.lang.Object
  extended by microsoft.exchange.webservices.data.ServiceObject
      extended by microsoft.exchange.webservices.data.Conversation

public class Conversation
extends ServiceObject

Represents a collection of Conversation related properties. Properties available on this object are defined in the ConversationSchema class.


Constructor Summary
protected Conversation(ExchangeService service)
          Initializes an unsaved local instance of Conversation.
 
Method Summary
 void copyItemsInConversation(FolderId contextFolderId, FolderId destinationFolderId)
          Copies items in the specified conversation to a specific folder.
 void deleteItems(FolderId contextFolderId, DeleteMode deleteMode)
          Deletes items in the specified conversation.
 void disableAlwaysCategorizeItems(boolean processSynchronously)
          Sets up a conversation so that any item received within that conversation is no longer categorized.
 void disableAlwaysDeleteItems(boolean processSynchronously)
          Sets up a conversation so that any item received within that conversation is no longer moved to Deleted Items folder.
 void disableAlwaysMoveItemsInConversation(boolean processSynchronously)
          Sets up a conversation so that any item received within that conversation is no longer moved to a specific folder.
 void enableAlwaysCategorizeItems(java.lang.Iterable<java.lang.String> categories, boolean processSynchronously)
          Sets up a conversation so that any item received within that conversation is always categorized.
 void enableAlwaysDeleteItems(boolean processSynchronously)
          Sets up a conversation so that any item received within that conversation is always moved to Deleted Items folder.
 void enableAlwaysMoveItems(FolderId destinationFolderId, boolean processSynchronously)
          Sets up a conversation so that any item received within that conversation is always moved to a specific folder.
 StringList getCategories()
          Gets a list summarizing the categories stamped on messages in this conversation, in the current folder only.
protected  java.lang.String getChangeXmlElementName()
          This method is not supported in this object.
protected  java.lang.String getDeleteFieldXmlElementName()
          This method is not supported in this object.
protected  ExtendedPropertyCollection getExtendedProperties()
          This method is not supported in this object.
 ConversationFlagStatus getFlagStatus()
          Gets the flag status for this conversation, calculated by aggregating individual messages flag status in the current folder.
 StringList getGlobalCategories()
          Gets a list summarizing the categories stamped on messages in this conversation, across all folders in the mailbox.
 ConversationFlagStatus getGlobalFlagStatus()
          Gets the flag status for this conversation, calculated by aggregating individual messages flag status across all folders in the mailbox.
 boolean getGlobalHasAttachments()
          Gets a value indicating if at least one message in this conversation, across all folders in the mailbox, has an attachment.
 Importance getGlobalImportance()
          Gets the importance of this conversation, calculated by aggregating individual messages importance across all folders in the mailbox.
 StringList getGlobalItemClasses()
          Gets a list summarizing the classes of the items in this conversation, across all folders in the mailbox.
 ItemIdCollection getGlobalItemIds()
          Gets the Ids of the messages in this conversation, across all folders in the mailbox.
 java.util.Date getGlobalLastDeliveryTime()
          Gets the delivery time of the message that was last received in this conversation across all folders in the mailbox.
 int getGlobalMessageCount()
          Gets the total number of messages in this conversation across all folders in the mailbox.
 int getGlobalSize()
          Gets the size of this conversation, calculated by adding the sizes of all messages in the conversation across all folders in the mailbox.
 StringList getGlobalUniqueRecipients()
          Gets a list of all the people who have received messages in this conversation across all folders in the mailbox.
 StringList getGlobalUniqueSenders()
          Gets a list of all the people who have sent messages in this conversation across all folders in the mailbox.
 StringList getGlobalUniqueUnreadSenders()
          Gets a list of all the people who have sent messages that are currently unread in this conversation across all folders in the mailbox.
 int getGlobalUnreadCount()
          Gets the total number of unread messages in this conversation across all folders in the mailbox.
 boolean getHasAttachments()
          Gets a value indicating if at least one message in this conversation, in the current folder only, has an attachment.
 ConversationId getId()
          Gets the Id of this Conversation.
protected  PropertyDefinition getIdPropertyDefinition()
          The property definition for the Id of this object.
 Importance getImportance()
          Gets the importance of this conversation, calculated by aggregating individual messages importance in the current folder only.
protected  boolean getIsTimeZoneHeaderRequired(boolean isUpdateOperation)
          This method is not supported in this object.
 StringList getItemClasses()
          Gets a list summarizing the classes of the items in this conversation, in the current folder only.
 ItemIdCollection getItemIds()
          Gets the Ids of the messages in this conversation, in the current folder only.
 java.util.Date getLastDeliveryTime()
          Gets the delivery time of the message that was last received in this conversation in the current folder only.
 int getMessageCount()
          Gets the total number of messages in this conversation in the current folder only.
protected  ExchangeVersion getMinimumRequiredServerVersion()
          Gets the minimum required server version.
protected  ServiceObjectSchema getSchema()
          Internal method to return the schema associated with this type of object
protected  java.lang.String getSetFieldXmlElementName()
          This method is not supported in this object.
 int getSize()
          Gets the size of this conversation, calculated by adding the sizes of all messages in the conversation in the current folder only.
 java.lang.String getTopic()
          Gets the topic of this Conversation.
 StringList getUniqueRecipients()
          Gets a list of all the people who have received messages in this conversation in the current folder only.
 StringList getUniqueSenders()
          Gets a list of all the people who have sent messages in this conversation in the current folder only.
 StringList getUniqueUnreadSenders()
          Gets a list of all the people who have sent messages that are currently unread in this conversation in the current folder only.
 int getUnreadCount()
          Gets the total number of unread messages in this conversation in the current folder only.
protected  void internalDelete(DeleteMode deleteMode, SendCancellationsMode sendCancellationsMode, AffectedTaskOccurrence affectedTaskOccurrences)
          This is not supported in this object.
protected  void internalLoad(PropertySet propertySet)
          This method is not supported in this object.
 void moveItemsInConversation(FolderId contextFolderId, FolderId destinationFolderId)
          Moves items in the specified conversation to a specific folder.
 void setReadStateForItemsInConversation(FolderId contextFolderId, boolean isRead)
          Sets the read state of items in the specified conversation.
 
Methods inherited from class microsoft.exchange.webservices.data.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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Conversation

protected Conversation(ExchangeService service)
                throws java.lang.Exception
Initializes an unsaved local instance of Conversation.

Parameters:
service - The service The ExchangeService object to which the item will be bound.
Throws:
java.lang.Exception
Method Detail

getSchema

protected ServiceObjectSchema getSchema()
Internal method to return the schema associated with this type of object

Specified by:
getSchema in class ServiceObject
Returns:
The schema associated with this type of object.

getMinimumRequiredServerVersion

protected ExchangeVersion getMinimumRequiredServerVersion()
Gets the minimum required server version.

Specified by:
getMinimumRequiredServerVersion in class ServiceObject
Returns:
Earliest Exchange version in which this service object type is supported.

getIdPropertyDefinition

protected PropertyDefinition getIdPropertyDefinition()
The property definition for the Id of this object.

Overrides:
getIdPropertyDefinition in class ServiceObject
Returns:
A PropertyDefinition instance.

internalLoad

protected void internalLoad(PropertySet propertySet)
This method is not supported in this object. Loads the specified set of properties on the object.

Specified by:
internalLoad in class ServiceObject
Parameters:
propertySet - The propertySet The properties to load.

internalDelete

protected void internalDelete(DeleteMode deleteMode,
                              SendCancellationsMode sendCancellationsMode,
                              AffectedTaskOccurrence affectedTaskOccurrences)
This is not supported in this object. Deletes the object.

Specified by:
internalDelete in class ServiceObject
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

protected java.lang.String getChangeXmlElementName()
This method is not supported in this object. Gets the name of the change XML element.

Overrides:
getChangeXmlElementName in class ServiceObject
Returns:
XML element name

getDeleteFieldXmlElementName

protected java.lang.String getDeleteFieldXmlElementName()
This method is not supported in this object. Gets the name of the delete field XML element.

Overrides:
getDeleteFieldXmlElementName in class ServiceObject
Returns:
XML element name

getSetFieldXmlElementName

protected java.lang.String getSetFieldXmlElementName()
This method is not supported in this object. Gets the name of the set field XML element.

Overrides:
getSetFieldXmlElementName in class ServiceObject
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:
getIsTimeZoneHeaderRequired in class ServiceObject
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 properties collection.

Overrides:
getExtendedProperties in class ServiceObject
Returns:
Extended properties collection.

enableAlwaysCategorizeItems

public void enableAlwaysCategorizeItems(java.lang.Iterable<java.lang.String> categories,
                                        boolean processSynchronously)
                                 throws ServiceResponseException,
                                        java.lang.IndexOutOfBoundsException,
                                        java.lang.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 items in the conversation.
processSynchronously - Indicates whether the method should return only once enabling this rule and stamping existing items in the conversation is completely done. If processSynchronously is false, the method returns immediately.
Throws:
java.lang.Exception
java.lang.IndexOutOfBoundsException
ServiceResponseException

disableAlwaysCategorizeItems

public void disableAlwaysCategorizeItems(boolean processSynchronously)
                                  throws ServiceResponseException,
                                         java.lang.IndexOutOfBoundsException,
                                         java.lang.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 items in the conversation is completely done. If processSynchronously is false, the method returns immediately.
Throws:
java.lang.Exception
java.lang.IndexOutOfBoundsException
ServiceResponseException

enableAlwaysDeleteItems

public void enableAlwaysDeleteItems(boolean processSynchronously)
                             throws ServiceResponseException,
                                    java.lang.IndexOutOfBoundsException,
                                    java.lang.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 items in the conversation is completely done. If processSynchronously is false, the method returns immediately.
Throws:
java.lang.Exception
java.lang.IndexOutOfBoundsException
ServiceResponseException

disableAlwaysDeleteItems

public void disableAlwaysDeleteItems(boolean processSynchronously)
                              throws ServiceResponseException,
                                     java.lang.IndexOutOfBoundsException,
                                     java.lang.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 items in the conversation is completely done. If processSynchronously is false, the method returns immediately.
Throws:
java.lang.Exception
java.lang.IndexOutOfBoundsException
ServiceResponseException

enableAlwaysMoveItems

public void enableAlwaysMoveItems(FolderId destinationFolderId,
                                  boolean processSynchronously)
                           throws ServiceResponseException,
                                  java.lang.IndexOutOfBoundsException,
                                  java.lang.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 items should be moved.
processSynchronously - Indicates whether the method should return only once enabling this rule and moving existing items in the conversation is completely done. If processSynchronously is false, the method returns immediately.
Throws:
java.lang.Exception
java.lang.IndexOutOfBoundsException
ServiceResponseException

disableAlwaysMoveItemsInConversation

public void disableAlwaysMoveItemsInConversation(boolean processSynchronously)
                                          throws ServiceResponseException,
                                                 java.lang.IndexOutOfBoundsException,
                                                 java.lang.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:
java.lang.Exception
java.lang.IndexOutOfBoundsException
ServiceResponseException

deleteItems

public void deleteItems(FolderId contextFolderId,
                        DeleteMode deleteMode)
                 throws ServiceResponseException,
                        java.lang.IndexOutOfBoundsException,
                        java.lang.Exception
Deletes items in the specified conversation. Calling this method results in a call to EWS.

Parameters:
contextFolderId - The Id of the folder items must belong to in order to be deleted. If contextFolderId is null, items across the entire mailbox are deleted.
deleteMode - The deletion mode.
Throws:
java.lang.Exception
java.lang.IndexOutOfBoundsException
ServiceResponseException

moveItemsInConversation

public void moveItemsInConversation(FolderId contextFolderId,
                                    FolderId destinationFolderId)
                             throws ServiceResponseException,
                                    java.lang.IndexOutOfBoundsException,
                                    java.lang.Exception
Moves items in the specified conversation to a specific folder. Calling this method results in a call to EWS.

Parameters:
contextFolderId - The Id of the folder items must belong to in order to be moved. If contextFolderId is null, items across the entire mailbox are moved.
destinationFolderId - The Id of the destination folder.
Throws:
java.lang.Exception
java.lang.IndexOutOfBoundsException
ServiceResponseException

copyItemsInConversation

public void copyItemsInConversation(FolderId contextFolderId,
                                    FolderId destinationFolderId)
                             throws ServiceResponseException,
                                    java.lang.IndexOutOfBoundsException,
                                    java.lang.Exception
Copies items in the specified conversation to a specific folder. Calling this method results in a call to EWS.

Parameters:
contextFolderId - The Id of the folder items must belong to in order to be copied. If contextFolderId is null, items across the entire mailbox are copied.
destinationFolderId - The Id of the destination folder.
Throws:
java.lang.Exception
java.lang.IndexOutOfBoundsException
ServiceResponseException

setReadStateForItemsInConversation

public void setReadStateForItemsInConversation(FolderId contextFolderId,
                                               boolean isRead)
                                        throws ServiceResponseException,
                                               java.lang.IndexOutOfBoundsException,
                                               java.lang.Exception
Sets the read state of items in the specified conversation. Calling this method results in a call to EWS.

Parameters:
contextFolderId - The Id of the folder items must belong to in order for their read state to be set. If contextFolderId is null, the read states of items across the entire mailbox are set.
isRead - if set to true, conversation items are marked as read; otherwise they are marked as unread.
Throws:
java.lang.Exception
java.lang.IndexOutOfBoundsException
ServiceResponseException

getId

public ConversationId getId()
                     throws ServiceLocalException
Gets the Id of this Conversation.

Overrides:
getId in class ServiceObject
Returns:
Id
Throws:
ServiceLocalException
java.lang.Exception

getTopic

public java.lang.String getTopic()
                          throws ArgumentException
Gets the topic of this Conversation.

Returns:
value
Throws:
ArgumentException

getUniqueRecipients

public StringList getUniqueRecipients()
                               throws java.lang.Exception
Gets a list of all the people who have received messages in this conversation in the current folder only.

Returns:
String
Throws:
java.lang.Exception

getGlobalUniqueRecipients

public StringList getGlobalUniqueRecipients()
                                     throws java.lang.Exception
Gets a list of all the people who have received messages in this conversation across all folders in the mailbox.

Returns:
String
Throws:
java.lang.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 folders in the mailbox.

Returns:
unreadSenders
Throws:
ArgumentException

getUniqueSenders

public StringList getUniqueSenders()
                            throws java.lang.Exception
Gets a list of all the people who have sent messages in this conversation in the current folder only.

Returns:
String
Throws:
java.lang.Exception

getGlobalUniqueSenders

public StringList getGlobalUniqueSenders()
                                  throws java.lang.Exception
Gets a list of all the people who have sent messages in this conversation across all folders in the mailbox.

Returns:
String
Throws:
java.lang.Exception

getLastDeliveryTime

public java.util.Date getLastDeliveryTime()
                                   throws java.lang.Exception
Gets the delivery time of the message that was last received in this conversation in the current folder only.

Returns:
Date
Throws:
java.lang.Exception

getGlobalLastDeliveryTime

public java.util.Date getGlobalLastDeliveryTime()
                                         throws java.lang.Exception
Gets the delivery time of the message that was last received in this conversation across all folders in the mailbox.

Returns:
Date
Throws:
java.lang.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 folders 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 folders 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 folders 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 folders 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 folders 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 folders in the mailbox.

Returns:
integer
Throws:
ServiceLocalException

getItemClasses

public StringList getItemClasses()
                          throws java.lang.Exception
Gets a list summarizing the classes of the items in this conversation, in the current folder only.

Returns:
string
Throws:
java.lang.Exception

getGlobalItemClasses

public StringList getGlobalItemClasses()
                                throws java.lang.Exception
Gets a list summarizing the classes of the items in this conversation, across all folders in the mailbox.

Returns:
string
Throws:
java.lang.Exception

getImportance

public Importance getImportance()
                         throws java.lang.Exception
Gets the importance of this conversation, calculated by aggregating individual messages importance in the current folder only.

Returns:
important
Throws:
java.lang.Exception

getGlobalImportance

public Importance getGlobalImportance()
                               throws java.lang.Exception
Gets the importance of this conversation, calculated by aggregating individual messages importance across all folders in the mailbox.

Returns:
important
Throws:
java.lang.Exception

getItemIds

public ItemIdCollection getItemIds()
                            throws java.lang.Exception
Gets the Ids of the messages in this conversation, in the current folder only.

Returns:
Id
Throws:
java.lang.Exception

getGlobalItemIds

public ItemIdCollection getGlobalItemIds()
                                  throws java.lang.Exception
Gets the Ids of the messages in this conversation, across all folders in the mailbox.

Returns:
Id
Throws:
java.lang.Exception