Class PostItem
- java.lang.Object
-
- microsoft.exchange.webservices.data.core.service.ServiceObject
-
- microsoft.exchange.webservices.data.core.service.item.Item
-
- microsoft.exchange.webservices.data.core.service.item.PostItem
-
-
Constructor Summary
Constructors Constructor Description PostItem(ExchangeService service)Initializes an unsaved local instance of PostItem.To bind to an existing post item, use PostItem.Bind() instead.PostItem(ItemAttachment parentAttachment)Initializes a new instance of the class.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PostItembind(ExchangeService service, ItemId id)Binds to an existing post item and loads its first class property.static PostItembind(ExchangeService service, ItemId id, PropertySet propertySet)Binds to an existing post item and loads the specified set of property.ResponseMessagecreateForward()Creates a forward response to the post item.PostReplycreatePostReply()Creates a post reply to this post item.ResponseMessagecreateReply(boolean replyAll)Creates a e-mail reply response to the post item.voidforward(MessageBody bodyPrefix, Iterable<EmailAddress> toRecipients)Forwards the post item.voidforward(MessageBody bodyPrefix, EmailAddress... toRecipients)Forwards the post item.byte[]getConversationIndex()Gets the conversation index of the post item.StringgetConversationTopic()Gets the conversation topic of the post item.EmailAddressgetFrom()Gets the "on behalf" poster of the post item.StringgetInternetMessageId()Gets the Internet message Id of the post item.BooleangetIsRead()Gets a value indicating whether the post item is read.ExchangeVersiongetMinimumRequiredServerVersion()Internal method to return the schema associated with this type of object.DategetPostedTime()Gets the the date and time when the post item was posted.StringgetReferences()Gets the references of the post item.ServiceObjectSchemagetSchema()Internal method to return the schema associated with this type of object.EmailAddressgetSender()Gets the sender (poster) of the post item.voidpostReply(MessageBody bodyPrefix)Posts a reply to this post item.voidreply(MessageBody bodyPrefix, boolean replyAll)Replies to the post item.voidsetFrom(EmailAddress value)Sets the from.voidsetIsRead(Boolean value)Sets the checks if is read.voidsetIsRead(String value)Sets the checks if is read.voidsetSender(EmailAddress value)Sets the sender.-
Methods inherited from class microsoft.exchange.webservices.data.core.service.item.Item
copy, copy, delete, getAllowedResponseActions, getAttachments, getBody, getCategories, getConversationId, getCulture, getDateTimeCreated, getDateTimeReceived, getDateTimeSent, getDefaultAffectedTaskOccurrences, getDefaultSendCancellationsMode, getDefaultSendInvitationsMode, getDefaultSendInvitationsOrCancellationsMode, getDisplayCc, getDisplayTo, getEffectiveRights, getExtendedProperties, getHasAttachments, getId, getIdPropertyDefinition, getImportance, getInReplyTo, getInternetMessageHeaders, getIsAssociated, getIsDraft, getIsFromMe, getIsNew, getIsReminderSet, getIsResend, getIsSubmitted, getIsTimeZoneHeaderRequired, getIsUnmodified, getItemClass, getLastModifiedName, getLastModifiedTime, getMimeContent, getParentAttachment, getParentFolderId, getReminderDueBy, getReminderMinutesBeforeStart, getRootItemId, getSensitivity, getSize, getSubject, getUniqueBody, getWebClientEditFormQueryString, getWebClientReadFormQueryString, hasUnprocessedAttachmentChanges, internalCreate, internalDelete, internalLoad, internalUpdate, isAttachment, move, move, removeExtendedProperty, save, save, save, setBody, setCategories, setCulture, setExtendedProperty, setImportance, setInReplyTo, setIsReminderSet, setItemClass, setMimeContent, setReminderDueBy, setReminderMinutesBeforeStart, setSensitivity, setSubject, throwIfThisIsAttachment, update, validate
-
Methods inherited from class microsoft.exchange.webservices.data.core.service.ServiceObject
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
-
-
-
-
Constructor Detail
-
PostItem
public PostItem(ExchangeService service) throws Exception
Initializes an unsaved local instance of PostItem.To bind to an existing post item, use PostItem.Bind() instead.- Parameters:
service- the service- Throws:
Exception- the exception
-
PostItem
public PostItem(ItemAttachment parentAttachment) throws Exception
Initializes a new instance of the class.- Parameters:
parentAttachment- the parent attachment- Throws:
Exception- the exception
-
-
Method Detail
-
bind
public static PostItem bind(ExchangeService service, ItemId id, PropertySet propertySet) throws Exception
Binds to an existing post item and loads the specified set of property. Calling this method results in a call to EWS.- Parameters:
service- the serviceid- the idpropertySet- the property set- Returns:
- An PostItem instance representing the post item corresponding to the specified Id.
- Throws:
Exception- the exception
-
bind
public static PostItem bind(ExchangeService service, ItemId id) throws Exception
Binds to an existing post item and loads its first class property. calling this method results in a call to EWS.- Parameters:
service- the serviceid- the id- Returns:
- An PostItem instance representing the post item corresponding to the specified Id.
- Throws:
Exception- the exception
-
getSchema
public ServiceObjectSchema getSchema()
Internal method to return the schema associated with this type of object.
-
getMinimumRequiredServerVersion
public ExchangeVersion getMinimumRequiredServerVersion()
Internal method to return the schema associated with this type of object.- Overrides:
getMinimumRequiredServerVersionin classItem- Returns:
- The schema associated with this type of object.
-
createPostReply
public PostReply createPostReply() throws Exception
Creates a post reply to this post item.- Returns:
- A PostReply that can be modified and saved.
- Throws:
Exception- the exception
-
postReply
public void postReply(MessageBody bodyPrefix) throws Exception
Posts a reply to this post item. Calling this method results in a call to EWS.- Parameters:
bodyPrefix- the body prefix- Throws:
Exception- the exception
-
createReply
public ResponseMessage createReply(boolean replyAll) throws Exception
Creates a e-mail reply response to the post item.- Parameters:
replyAll- the reply all- Returns:
- A ResponseMessage representing the e-mail reply response that can subsequently be modified and sent.
- Throws:
Exception- the exception
-
reply
public void reply(MessageBody bodyPrefix, boolean replyAll) throws Exception
Replies to the post item. Calling this method results in a call to EWS.- Parameters:
bodyPrefix- the body prefixreplyAll- the reply all- Throws:
Exception- the exception
-
createForward
public ResponseMessage createForward() throws Exception
Creates a forward response to the post item.- Returns:
- A ResponseMessage representing the forward response that can subsequently be modified and sent.
- Throws:
Exception- the exception
-
forward
public void forward(MessageBody bodyPrefix, EmailAddress... toRecipients) throws Exception
Forwards the post item. Calling this method results in a call to EWS.- Parameters:
bodyPrefix- the body prefixtoRecipients- the to recipients- Throws:
Exception- the exception
-
forward
public void forward(MessageBody bodyPrefix, Iterable<EmailAddress> toRecipients) throws Exception
Forwards the post item. Calling this method results in a call to EWS.- Parameters:
bodyPrefix- the body prefixtoRecipients- the to recipients- Throws:
Exception- the exception
-
getConversationIndex
public byte[] getConversationIndex() throws ServiceLocalException
Gets the conversation index of the post item.- Returns:
- the conversation index
- Throws:
ServiceLocalException- the service local exception
-
getConversationTopic
public String getConversationTopic() throws ServiceLocalException
Gets the conversation topic of the post item.- Returns:
- the conversation topic
- Throws:
ServiceLocalException- the service local exception
-
getFrom
public EmailAddress getFrom() throws ServiceLocalException
Gets the "on behalf" poster of the post item.- Returns:
- the from
- Throws:
ServiceLocalException- the service local exception
-
setFrom
public void setFrom(EmailAddress value) throws Exception
Sets the from.- Parameters:
value- the new from- Throws:
Exception- the exception
-
getInternetMessageId
public String getInternetMessageId() throws ServiceLocalException
Gets the Internet message Id of the post item.- Returns:
- the internet message id
- Throws:
ServiceLocalException- the service local exception
-
getIsRead
public Boolean getIsRead() throws ServiceLocalException
Gets a value indicating whether the post item is read.- Returns:
- the checks if is read
- Throws:
ServiceLocalException- the service local exception
-
setIsRead
public void setIsRead(Boolean value) throws Exception
Sets the checks if is read.- Parameters:
value- the new checks if is read- Throws:
Exception- the exception
-
getPostedTime
public Date getPostedTime() throws ServiceLocalException
Gets the the date and time when the post item was posted.- Returns:
- the posted time
- Throws:
ServiceLocalException- the service local exception
-
getReferences
public String getReferences() throws ServiceLocalException
Gets the references of the post item.- Returns:
- the references
- Throws:
ServiceLocalException- the service local exception
-
setIsRead
public void setIsRead(String value) throws Exception
Sets the checks if is read.- Parameters:
value- the new checks if is read- Throws:
Exception- the exception
-
getSender
public EmailAddress getSender() throws ServiceLocalException
Gets the sender (poster) of the post item.- Returns:
- the sender
- Throws:
ServiceLocalException- the service local exception
-
setSender
public void setSender(EmailAddress value) throws Exception
Sets the sender.- Parameters:
value- the new sender- Throws:
Exception- the exception
-
-