microsoft.exchange.webservices.data
Class ResponseObject<TMessage extends EmailMessage>

java.lang.Object
  extended by microsoft.exchange.webservices.data.ServiceObject
      extended by microsoft.exchange.webservices.data.ResponseObject<TMessage>
Type Parameters:
TMessage - the generic type
Direct Known Subclasses:
CalendarResponseMessageBase, ResponseMessage

public abstract class ResponseObject<TMessage extends EmailMessage>
extends ServiceObject

The Class ResponseObject.


Constructor Summary
protected ResponseObject(Item referenceItem)
          Initializes a new instance of the class.
 
Method Summary
protected  ServiceObjectSchema getSchema()
          Internal method to return the schema associated with this type of object.
protected  java.util.List<Item> internalCreate(FolderId destinationFolderId, MessageDisposition messageDisposition)
          Create the response object.
protected  void internalDelete(DeleteMode deleteMode, SendCancellationsMode sendCancellationsMode, AffectedTaskOccurrence affectedTaskOccurrences)
          Deletes the object.
protected  void internalLoad(PropertySet propertySet)
          Loads the specified set of properties on the object.
 TMessage save()
          Saves the response in the Drafts folder.
 TMessage save(FolderId destinationFolderId)
          Saves the response in the specified folder.
 TMessage save(WellKnownFolderName destinationFolderName)
          Saves the response in the specified folder.
 void send()
          Sends this response without saving a copy.
 void sendAndSaveCopy()
          Sends this response and saves a copy in the Sent Items folder.
 void sendAndSaveCopy(FolderId destinationFolderId)
          Sends this response and saves a copy in the specified folder.
 void sendAndSaveCopy(WellKnownFolderName destinationFolderName)
          Sends this response and saves a copy in the specified folder.
 
Methods inherited from class microsoft.exchange.webservices.data.ServiceObject
addServiceObjectChangedEvent, changed, clearChangeLog, clearServiceObjectChangedEvent, getChangeXmlElementName, getDeleteFieldXmlElementName, getExtendedProperties, getId, getIdPropertyDefinition, getIsCustomDateTimeScopingRequired, getIsTimeZoneHeaderRequired, getLoadedPropertyDefinitions, getMinimumRequiredServerVersion, getObjectFromPropertyDefinition, getPropertyBag, getService, getSetFieldXmlElementName, 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

ResponseObject

protected ResponseObject(Item referenceItem)
                  throws java.lang.Exception
Initializes a new instance of the class.

Parameters:
referenceItem - the reference item
Throws:
java.lang.Exception - the 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.

internalLoad

protected void internalLoad(PropertySet propertySet)
Loads the specified set of properties on the object.

Specified by:
internalLoad in class ServiceObject
Parameters:
propertySet - the property set

internalDelete

protected void internalDelete(DeleteMode deleteMode,
                              SendCancellationsMode sendCancellationsMode,
                              AffectedTaskOccurrence affectedTaskOccurrences)
Deletes the object.

Specified by:
internalDelete in class ServiceObject
Parameters:
deleteMode - the delete mode
sendCancellationsMode - the send cancellations mode
affectedTaskOccurrences - the affected task occurrences

internalCreate

protected java.util.List<Item> internalCreate(FolderId destinationFolderId,
                                              MessageDisposition messageDisposition)
                                       throws java.lang.Exception
Create the response object.

Parameters:
destinationFolderId - the destination folder id
messageDisposition - the message disposition
Returns:
The list of items returned by EWS.
Throws:
java.lang.Exception - the exception

save

public TMessage save(FolderId destinationFolderId)
                                   throws java.lang.Exception
Saves the response in the specified folder. Calling this method results in a call to EWS.

Parameters:
destinationFolderId - the destination folder id
Returns:
A TMessage that represents the response.
Throws:
java.lang.Exception - the exception

save

public TMessage save(WellKnownFolderName destinationFolderName)
                                   throws java.lang.Exception
Saves the response in the specified folder. Calling this method results in a call to EWS.

Parameters:
destinationFolderName - the destination folder name
Returns:
A TMessage that represents the response.
Throws:
java.lang.Exception - the exception

save

public TMessage save()
                                   throws java.lang.Exception
Saves the response in the Drafts folder. Calling this method results in a call to EWS.

Returns:
A TMessage that represents the response.
Throws:
java.lang.Exception - the exception

send

public void send()
          throws java.lang.Exception
Sends this response without saving a copy. Calling this method results in a call to EWS.

Throws:
java.lang.Exception - the exception

sendAndSaveCopy

public void sendAndSaveCopy(FolderId destinationFolderId)
                     throws java.lang.Exception
Sends this response and saves a copy in the specified folder. Calling this method results in a call to EWS.

Parameters:
destinationFolderId - the destination folder id
Throws:
java.lang.Exception - the exception

sendAndSaveCopy

public void sendAndSaveCopy(WellKnownFolderName destinationFolderName)
                     throws java.lang.Exception
Sends this response and saves a copy in the specified folder. Calling this method results in a call to EWS.

Parameters:
destinationFolderName - the destination folder name
Throws:
java.lang.Exception - the exception

sendAndSaveCopy

public void sendAndSaveCopy()
                     throws java.lang.Exception
Sends this response and saves a copy in the Sent Items folder. Calling this method results in a call to EWS.

Throws:
java.lang.Exception - the exception