Class ResponseObject<TMessage extends EmailMessage>
- java.lang.Object
-
- microsoft.exchange.webservices.data.core.service.ServiceObject
-
- microsoft.exchange.webservices.data.core.service.response.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
Constructors Modifier Constructor Description protectedResponseObject(Item referenceItem)Initializes a new instance of the class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ServiceObjectSchemagetSchema()Internal method to return the schema associated with this type of object.protected List<Item>internalCreate(FolderId destinationFolderId, MessageDisposition messageDisposition)Create the response object.protected voidinternalDelete(DeleteMode deleteMode, SendCancellationsMode sendCancellationsMode, AffectedTaskOccurrence affectedTaskOccurrences)Deletes the object.protected voidinternalLoad(PropertySet propertySet)Loads the specified set of property on the object.TMessagesave()Saves the response in the Drafts folder.TMessagesave(WellKnownFolderName destinationFolderName)Saves the response in the specified folder.TMessagesave(FolderId destinationFolderId)Saves the response in the specified folder.voidsend()Sends this response without saving a copy.voidsendAndSaveCopy()Sends this response and saves a copy in the Sent Items folder.voidsendAndSaveCopy(WellKnownFolderName destinationFolderName)Sends this response and saves a copy in the specified folder.voidsendAndSaveCopy(FolderId destinationFolderId)Sends this response and saves a copy in the specified folder.-
Methods inherited from class microsoft.exchange.webservices.data.core.service.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
-
-
-
-
Constructor Detail
-
ResponseObject
protected ResponseObject(Item referenceItem) throws Exception
Initializes a new instance of the class.- Parameters:
referenceItem- the reference item- Throws:
Exception- the 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.
-
internalLoad
protected void internalLoad(PropertySet propertySet)
Loads the specified set of property on the object.- Specified by:
internalLoadin classServiceObject- Parameters:
propertySet- the property set
-
internalDelete
protected void internalDelete(DeleteMode deleteMode, SendCancellationsMode sendCancellationsMode, AffectedTaskOccurrence affectedTaskOccurrences)
Deletes the object.- Specified by:
internalDeletein classServiceObject- Parameters:
deleteMode- the delete modesendCancellationsMode- the send cancellations modeaffectedTaskOccurrences- the affected task occurrences
-
internalCreate
protected List<Item> internalCreate(FolderId destinationFolderId, MessageDisposition messageDisposition) throws Exception
Create the response object.- Parameters:
destinationFolderId- the destination folder idmessageDisposition- the message disposition- Returns:
- The list of item returned by EWS.
- Throws:
Exception- the exception
-
save
public TMessage save(FolderId destinationFolderId) throws 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:
Exception- the exception
-
save
public TMessage save(WellKnownFolderName destinationFolderName) throws 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:
Exception- the exception
-
save
public TMessage save() throws 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:
Exception- the exception
-
send
public void send() throws Exception
Sends this response without saving a copy. Calling this method results in a call to EWS.- Throws:
Exception- the exception
-
sendAndSaveCopy
public void sendAndSaveCopy(FolderId destinationFolderId) throws 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:
Exception- the exception
-
sendAndSaveCopy
public void sendAndSaveCopy(WellKnownFolderName destinationFolderName) throws 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:
Exception- the exception
-
sendAndSaveCopy
public void sendAndSaveCopy() throws Exception
Sends this response and saves a copy in the Sent Items folder. Calling this method results in a call to EWS.- Throws:
Exception- the exception
-
-