public class Item extends ServiceObject
Constructor and Description |
---|
Item(ExchangeService service)
Initializes an unsaved local instance of
|
Item(ItemAttachment parentAttachment)
Initializes a new instance of the item class.
|
Modifier and Type | Method and Description |
---|---|
static Item |
bind(ExchangeService service,
ItemId id)
Binds to an existing item, whatever its actual type is, and loads the
specified set of property.
|
static Item |
bind(ExchangeService service,
ItemId id,
PropertySet propertySet)
Binds to an existing item, whatever its actual type is, and loads the
specified set of property.
|
Item |
copy(FolderId destinationFolderId)
Creates a copy of this item in the specified folder.
|
Item |
copy(WellKnownFolderName destinationFolderName)
Creates a copy of this item in the specified folder.
|
void |
delete(DeleteMode deleteMode)
Deletes the item.
|
EnumSet<ResponseActions> |
getAllowedResponseActions()
Gets a value indicating which response actions are allowed on this item.
|
AttachmentCollection |
getAttachments()
Gets a list of the attachments to this item.
|
MessageBody |
getBody()
Gets the body of this item.
|
StringList |
getCategories()
Gets the list of categories associated with this item.
|
ConversationId |
getConversationId()
Gets the Id of the conversation this item is part of.
|
String |
getCulture()
Gets the culture associated with this item.
|
Date |
getDateTimeCreated()
Gets the date and time this item was created.
|
Date |
getDateTimeReceived()
Gets the time when this item was received.
|
Date |
getDateTimeSent()
Gets the date and time this item was sent.
|
protected AffectedTaskOccurrence |
getDefaultAffectedTaskOccurrences()
Gets the default setting for how to treat affected task occurrences on
Delete.
|
protected SendCancellationsMode |
getDefaultSendCancellationsMode()
Gets the default setting for sending cancellations on Delete.
|
protected SendInvitationsMode |
getDefaultSendInvitationsMode()
Gets the default settings for sending invitations on Save.
|
protected SendInvitationsOrCancellationsMode |
getDefaultSendInvitationsOrCancellationsMode()
Gets the default settings for sending invitations or cancellations on
Update.
|
String |
getDisplayCc()
Gets a text summarizing the Cc receipients of this item.
|
String |
getDisplayTo()
Gets a text summarizing the To recipients of this item.
|
EnumSet<EffectiveRights> |
getEffectiveRights()
Gets a value indicating the effective rights the current authenticated
user has on this item.
|
ExtendedPropertyCollection |
getExtendedProperties()
Gets a list of extended property defined on this item.
|
boolean |
getHasAttachments()
Gets a value indicating whether the item has attachments.
|
ItemId |
getId()
Gets the Id of this item.
|
PropertyDefinition |
getIdPropertyDefinition()
The property definition for the Id of this object.
|
Importance |
getImportance()
Gets the importance of this item.
|
String |
getInReplyTo()
Gets the In-Reply-To reference of this item.
|
InternetMessageHeaderCollection |
getInternetMessageHeaders()
Gets a list of Internet headers for this item.
|
boolean |
getIsAssociated()
Gets a value indicating whether the message has been submitted to be
sent.
|
boolean |
getIsDraft()
Gets a value indicating whether the message has been submitted to be
sent.
|
boolean |
getIsFromMe()
Gets a value indicating whether the item has been sent by the current
authenticated user.
|
boolean |
getIsNew()
Gets a value indicating whether this object is a real store item, or if
it's a local object that has yet to be saved.
|
boolean |
getIsReminderSet()
Gets a value indicating whether a reminder is set for this item.
|
boolean |
getIsResend()
Gets a value indicating whether the item is a resend of another item.
|
boolean |
getIsSubmitted()
Gets a value indicating whether the message has been submitted to be
sent.
|
boolean |
getIsTimeZoneHeaderRequired(boolean isUpdateOperation)
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.
|
boolean |
getIsUnmodified()
Gets a value indicating whether the item has been modified since it was
created.
|
String |
getItemClass()
Gets the custom class name of this item.
|
String |
getLastModifiedName()
Gets the name of the user who last modified this item.
|
Date |
getLastModifiedTime()
Gets the date and time this item was last modified.
|
MimeContent |
getMimeContent()
Get the MIME content of this item.
|
ExchangeVersion |
getMinimumRequiredServerVersion()
Gets the minimum required server version.
|
ItemAttachment |
getParentAttachment()
Gets the parent attachment of this item.
|
FolderId |
getParentFolderId()
Gets the Id of the parent folder of this item.
|
Date |
getReminderDueBy()
Gets the date and time when the reminder is due for this item.
|
int |
getReminderMinutesBeforeStart()
Gets the number of minutes before the start of this item when the
reminder should be triggered.
|
ItemId |
getRootItemId()
Gets Id of the root item for this item.
|
ServiceObjectSchema |
getSchema()
Internal method to return the schema associated with this type of object.
|
Sensitivity |
getSensitivity()
Gets the sensitivity of this item.
|
int |
getSize()
Gets the size of this item.
|
String |
getSubject()
Gets the subject.
|
UniqueBody |
getUniqueBody()
Gets the body part that is unique to the conversation this item is part
of.
|
String |
getWebClientEditFormQueryString()
Gets the query string that should be appended to the Exchange Web client
URL to open this item using the appropriate read form in a web browser.
|
String |
getWebClientReadFormQueryString()
Gets the query string that should be appended to the Exchange Web client
URL to open this item using the appropriate read form in a web browser.
|
boolean |
hasUnprocessedAttachmentChanges()
Gets a value indicating whether this instance has unprocessed attachment
collection changes.
|
protected void |
internalCreate(FolderId parentFolderId,
MessageDisposition messageDisposition,
SendInvitationsMode sendInvitationsMode)
Create item.
|
protected void |
internalDelete(DeleteMode deleteMode,
SendCancellationsMode sendCancellationsMode,
AffectedTaskOccurrence affectedTaskOccurrences)
Deletes the object.
|
protected void |
internalLoad(PropertySet propertySet)
The property definition for the Id of this object.
|
protected Item |
internalUpdate(FolderId parentFolderId,
ConflictResolutionMode conflictResolutionMode,
MessageDisposition messageDisposition,
SendInvitationsOrCancellationsMode sendInvitationsOrCancellationsMode)
Update item.
|
boolean |
isAttachment()
Gets a value indicating whether the item is an attachment.
|
Item |
move(FolderId destinationFolderId)
Moves this item to a the specified folder.
|
Item |
move(WellKnownFolderName destinationFolderName)
Moves this item to a the specified folder.
|
boolean |
removeExtendedProperty(ExtendedPropertyDefinition extendedPropertyDefinition)
Removes an extended property.
|
void |
save()
Saves this item in the default folder based on the item's type (for
example, an e-mail message is saved to the Drafts folder).
|
void |
save(FolderId parentFolderId)
Saves this item in a specific folder.
|
void |
save(WellKnownFolderName parentFolderName)
Saves this item in a specific folder.
|
void |
setBody(MessageBody value)
Sets the body.
|
void |
setCategories(StringList value)
Sets the categories.
|
void |
setCulture(String value)
Sets the culture.
|
void |
setExtendedProperty(ExtendedPropertyDefinition extendedPropertyDefinition,
Object value)
Sets the extended property.
|
void |
setImportance(Importance value)
Sets the importance.
|
void |
setInReplyTo(String value)
Sets the in reply to.
|
void |
setIsReminderSet(Boolean value)
Sets the checks if is reminder set.
|
void |
setItemClass(String value)
Sets the item class.
|
void |
setMimeContent(MimeContent value)
Sets the mime content.
|
void |
setReminderDueBy(Date value)
Sets the reminder due by.
|
void |
setReminderMinutesBeforeStart(int value)
Sets the reminder minutes before start.
|
void |
setSensitivity(Sensitivity value)
Sets the sensitivity.
|
void |
setSubject(String subject)
Sets the subject.
|
protected void |
throwIfThisIsAttachment()
Throws exception if this is attachment.
|
void |
update(ConflictResolutionMode conflictResolutionMode)
Applies the local changes that have been made to this item.
|
void |
validate()
Validates this instance.
|
addServiceObjectChangedEvent, changed, clearChangeLog, clearServiceObjectChangedEvent, getChangeXmlElementName, getDeleteFieldXmlElementName, getIsCustomDateTimeScopingRequired, getLoadedPropertyDefinitions, getObjectFromPropertyDefinition, getPropertyBag, getService, getSetFieldXmlElementName, getXmlElementName, getXmlElementNameOverride, isDirty, isNew, load, load, loadFromXml, loadFromXml, removeServiceObjectChangedEvent, schema, setService, throwIfThisIsNew, throwIfThisIsNotNew, tryGetExtendedProperty, tryGetProperty, tryGetProperty, writeToXml, writeToXmlForUpdate
public Item(ExchangeService service) throws Exception
service
- the serviceException
- the exceptionpublic Item(ItemAttachment parentAttachment) throws Exception
parentAttachment
- The parent attachment.Exception
- the exceptionpublic static Item bind(ExchangeService service, ItemId id, PropertySet propertySet) throws Exception
service
- The service to use to bind to the item.id
- The Id of the item to bind to.propertySet
- The set of property to load.Exception
- the exceptionpublic static Item bind(ExchangeService service, ItemId id) throws Exception
service
- The service to use to bind to the item.id
- The Id of the item to bind to.Exception
- the exceptionpublic ServiceObjectSchema getSchema()
getSchema
in class ServiceObject
public ExchangeVersion getMinimumRequiredServerVersion()
getMinimumRequiredServerVersion
in class ServiceObject
protected void throwIfThisIsAttachment() throws InvalidOperationException
InvalidOperationException
- the invalid operation exceptionpublic PropertyDefinition getIdPropertyDefinition()
getIdPropertyDefinition
in class ServiceObject
protected void internalLoad(PropertySet propertySet) throws Exception
internalLoad
in class ServiceObject
propertySet
- the property setException
- the exceptionprotected void internalDelete(DeleteMode deleteMode, SendCancellationsMode sendCancellationsMode, AffectedTaskOccurrence affectedTaskOccurrences) throws ServiceLocalException, Exception
internalDelete
in class ServiceObject
deleteMode
- the delete modesendCancellationsMode
- the send cancellations modeaffectedTaskOccurrences
- the affected task occurrencesServiceLocalException
- the service local exceptionException
- the exceptionprotected void internalCreate(FolderId parentFolderId, MessageDisposition messageDisposition, SendInvitationsMode sendInvitationsMode) throws Exception
parentFolderId
- the parent folder idmessageDisposition
- the message dispositionsendInvitationsMode
- the send invitations modeException
- the exceptionprotected Item internalUpdate(FolderId parentFolderId, ConflictResolutionMode conflictResolutionMode, MessageDisposition messageDisposition, SendInvitationsOrCancellationsMode sendInvitationsOrCancellationsMode) throws ServiceResponseException, Exception
parentFolderId
- the parent folder idconflictResolutionMode
- the conflict resolution modemessageDisposition
- the message dispositionsendInvitationsOrCancellationsMode
- the send invitations or cancellations modeServiceResponseException
- the service response exceptionException
- the exceptionpublic boolean hasUnprocessedAttachmentChanges() throws ServiceLocalException
ServiceLocalException
public ItemAttachment getParentAttachment()
public ItemId getRootItemId() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic void delete(DeleteMode deleteMode) throws ServiceLocalException, Exception
deleteMode
- the delete modeServiceLocalException
- the service local exceptionException
- the exceptionpublic void save(FolderId parentFolderId) throws Exception
parentFolderId
- the parent folder idException
- the exceptionpublic void save(WellKnownFolderName parentFolderName) throws Exception
parentFolderName
- the parent folder nameException
- the exceptionpublic void save() throws Exception
Exception
- the exceptionpublic void update(ConflictResolutionMode conflictResolutionMode) throws ServiceResponseException, Exception
conflictResolutionMode
- the conflict resolution modeServiceResponseException
- the service response exceptionException
- the exceptionpublic Item copy(FolderId destinationFolderId) throws Exception
destinationFolderId
- the destination folder idException
- the exceptionpublic Item copy(WellKnownFolderName destinationFolderName) throws Exception
destinationFolderName
- the destination folder nameException
- the exceptionpublic Item move(FolderId destinationFolderId) throws Exception
destinationFolderId
- the destination folder idException
- the exceptionpublic Item move(WellKnownFolderName destinationFolderName) throws Exception
destinationFolderName
- the destination folder nameException
- the exceptionpublic void setExtendedProperty(ExtendedPropertyDefinition extendedPropertyDefinition, Object value) throws Exception
extendedPropertyDefinition
- the extended property definitionvalue
- the valueException
- the exceptionpublic boolean removeExtendedProperty(ExtendedPropertyDefinition extendedPropertyDefinition) throws Exception
extendedPropertyDefinition
- the extended property definitionException
- the exceptionpublic void validate() throws Exception
validate
in class ServiceObject
Exception
- the exceptionpublic boolean getIsTimeZoneHeaderRequired(boolean isUpdateOperation) throws Exception
getIsTimeZoneHeaderRequired
in class ServiceObject
isUpdateOperation
- Indicates whether the operation being petrformed is an update
operation.ServiceLocalException
Exception
public boolean isAttachment()
public boolean getIsNew() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic ItemId getId() throws ServiceLocalException
getId
in class ServiceObject
ServiceLocalException
- the service local exceptionpublic MimeContent getMimeContent() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic void setMimeContent(MimeContent value) throws Exception
value
- the new mime contentException
- the exceptionpublic FolderId getParentFolderId() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic Sensitivity getSensitivity() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic void setSensitivity(Sensitivity value) throws Exception
value
- the new sensitivityException
- the exceptionpublic AttachmentCollection getAttachments() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic Date getDateTimeReceived() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic int getSize() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic StringList getCategories() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic void setCategories(StringList value) throws Exception
value
- the new categoriesException
- the exceptionpublic String getCulture() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic void setCulture(String value) throws Exception
value
- the new cultureException
- the exceptionpublic Importance getImportance() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic void setImportance(Importance value) throws Exception
value
- the new importanceException
- the exceptionpublic String getInReplyTo() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic void setInReplyTo(String value) throws Exception
value
- the new in reply toException
- the exceptionpublic boolean getIsSubmitted() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic boolean getIsAssociated() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic boolean getIsDraft() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic boolean getIsFromMe() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic boolean getIsResend() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic boolean getIsUnmodified() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic InternetMessageHeaderCollection getInternetMessageHeaders() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic Date getDateTimeSent() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic Date getDateTimeCreated() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic EnumSet<ResponseActions> getAllowedResponseActions() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic Date getReminderDueBy() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic void setReminderDueBy(Date value) throws Exception
value
- the new reminder due byException
- the exceptionpublic boolean getIsReminderSet() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic void setIsReminderSet(Boolean value) throws Exception
value
- the new checks if is reminder setException
- the exceptionpublic int getReminderMinutesBeforeStart() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic void setReminderMinutesBeforeStart(int value) throws Exception
value
- the new reminder minutes before startException
- the exceptionpublic String getDisplayCc() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic String getDisplayTo() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic boolean getHasAttachments() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic MessageBody getBody() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic void setBody(MessageBody value) throws Exception
value
- the new bodyException
- the exceptionpublic String getItemClass() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic void setItemClass(String value) throws Exception
value
- the new item classException
- the exceptionpublic void setSubject(String subject) throws Exception
subject
- the new subjectException
- the exceptionpublic String getSubject() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic String getWebClientReadFormQueryString() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic String getWebClientEditFormQueryString() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic ExtendedPropertyCollection getExtendedProperties() throws ServiceLocalException
getExtendedProperties
in class ServiceObject
ServiceLocalException
- the service local exceptionpublic EnumSet<EffectiveRights> getEffectiveRights() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic String getLastModifiedName() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic Date getLastModifiedTime() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic ConversationId getConversationId() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic UniqueBody getUniqueBody() throws ServiceLocalException
ServiceLocalException
- the service local exceptionprotected AffectedTaskOccurrence getDefaultAffectedTaskOccurrences()
protected SendCancellationsMode getDefaultSendCancellationsMode()
protected SendInvitationsMode getDefaultSendInvitationsMode()
protected SendInvitationsOrCancellationsMode getDefaultSendInvitationsOrCancellationsMode()
Copyright © 2012–2015 Microsoft. All rights reserved.