microsoft.exchange.webservices.data
Class PostItem

java.lang.Object
  extended by microsoft.exchange.webservices.data.ServiceObject
      extended by microsoft.exchange.webservices.data.Item
          extended by microsoft.exchange.webservices.data.PostItem

public final class PostItem
extends Item

Represents a post item. Properties available on post items are defined in the PostItemSchema class.


Constructor Summary
  PostItem(ExchangeService service)
          Initializes an unsaved local instance of PostItem.To bind to an existing post item, use PostItem.Bind() instead.
protected PostItem(ItemAttachment parentAttachment)
          Initializes a new instance of the class.
 
Method Summary
static PostItem bind(ExchangeService service, ItemId id)
          Binds to an existing post item and loads its first class properties.
static PostItem bind(ExchangeService service, ItemId id, PropertySet propertySet)
          Binds to an existing post item and loads the specified set of properties.
 ResponseMessage createForward()
          Creates a forward response to the post item.
 PostReply createPostReply()
          Creates a post reply to this post item.
 ResponseMessage createReply(boolean replyAll)
          Creates a e-mail reply response to the post item.
 void forward(MessageBody bodyPrefix, EmailAddress... toRecipients)
          Forwards the post item.
 void forward(MessageBody bodyPrefix, java.lang.Iterable<EmailAddress> toRecipients)
          Forwards the post item.
 byte[] getConversationIndex()
          Gets the conversation index of the post item.
 java.lang.String getConversationTopic()
          Gets the conversation topic of the post item.
 EmailAddress getFrom()
          Gets the "on behalf" poster of the post item.
 java.lang.String getInternetMessageId()
          Gets the Internet message Id of the post item.
 java.lang.Boolean getIsRead()
          Gets a value indicating whether the post item is read.
protected  ExchangeVersion getMinimumRequiredServerVersion()
          Internal method to return the schema associated with this type of object.
 java.util.Date getPostedTime()
          Gets the the date and time when the post item was posted.
 java.lang.String getReferences()
          Gets the references of the post item.
protected  ServiceObjectSchema getSchema()
          Internal method to return the schema associated with this type of object.
 EmailAddress getSender()
          Gets the sender (poster) of the post item.
 void postReply(MessageBody bodyPrefix)
          Posts a reply to this post item.
 void reply(MessageBody bodyPrefix, boolean replyAll)
          Replies to the post item.
 void setFrom(EmailAddress value)
          Sets the from.
 void setIsRead(java.lang.Boolean value)
          Sets the checks if is read.
 void setIsRead(java.lang.String value)
          Sets the checks if is read.
 void setSender(EmailAddress value)
          Sets the sender.
 
Methods inherited from class microsoft.exchange.webservices.data.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, setSubject, throwIfThisIsAttachment, update, validate
 
Methods inherited from class microsoft.exchange.webservices.data.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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PostItem

public PostItem(ExchangeService service)
         throws java.lang.Exception
Initializes an unsaved local instance of PostItem.To bind to an existing post item, use PostItem.Bind() instead.

Parameters:
service - the service
Throws:
java.lang.Exception - the exception

PostItem

protected PostItem(ItemAttachment parentAttachment)
            throws java.lang.Exception
Initializes a new instance of the class.

Parameters:
parentAttachment - the parent attachment
Throws:
java.lang.Exception - the exception
Method Detail

bind

public static PostItem bind(ExchangeService service,
                            ItemId id,
                            PropertySet propertySet)
                     throws java.lang.Exception
Binds to an existing post item and loads the specified set of properties. Calling this method results in a call to EWS.

Parameters:
service - the service
id - the id
propertySet - the property set
Returns:
An PostItem instance representing the post item corresponding to the specified Id.
Throws:
java.lang.Exception - the exception

bind

public static PostItem bind(ExchangeService service,
                            ItemId id)
                     throws java.lang.Exception
Binds to an existing post item and loads its first class properties. calling this method results in a call to EWS.

Parameters:
service - the service
id - the id
Returns:
An PostItem instance representing the post item corresponding to the specified Id.
Throws:
java.lang.Exception - the exception

getSchema

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

Overrides:
getSchema in class Item
Returns:
The schema associated with this type of object.

getMinimumRequiredServerVersion

protected ExchangeVersion getMinimumRequiredServerVersion()
Internal method to return the schema associated with this type of object.

Overrides:
getMinimumRequiredServerVersion in class Item
Returns:
The schema associated with this type of object.

createPostReply

public PostReply createPostReply()
                          throws java.lang.Exception
Creates a post reply to this post item.

Returns:
A PostReply that can be modified and saved.
Throws:
java.lang.Exception - the exception

postReply

public void postReply(MessageBody bodyPrefix)
               throws java.lang.Exception
Posts a reply to this post item. Calling this method results in a call to EWS.

Parameters:
bodyPrefix - the body prefix
Throws:
java.lang.Exception - the exception

createReply

public ResponseMessage createReply(boolean replyAll)
                            throws java.lang.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:
java.lang.Exception - the exception

reply

public void reply(MessageBody bodyPrefix,
                  boolean replyAll)
           throws java.lang.Exception
Replies to the post item. Calling this method results in a call to EWS.

Parameters:
bodyPrefix - the body prefix
replyAll - the reply all
Throws:
java.lang.Exception - the exception

createForward

public ResponseMessage createForward()
                              throws java.lang.Exception
Creates a forward response to the post item.

Returns:
A ResponseMessage representing the forward response that can subsequently be modified and sent.
Throws:
java.lang.Exception - the exception

forward

public void forward(MessageBody bodyPrefix,
                    EmailAddress... toRecipients)
             throws java.lang.Exception
Forwards the post item. Calling this method results in a call to EWS.

Parameters:
bodyPrefix - the body prefix
toRecipients - the to recipients
Throws:
java.lang.Exception - the exception

forward

public void forward(MessageBody bodyPrefix,
                    java.lang.Iterable<EmailAddress> toRecipients)
             throws java.lang.Exception
Forwards the post item. Calling this method results in a call to EWS.

Parameters:
bodyPrefix - the body prefix
toRecipients - the to recipients
Throws:
java.lang.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 java.lang.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 java.lang.Exception
Sets the from.

Parameters:
value - the new from
Throws:
java.lang.Exception - the exception

getInternetMessageId

public java.lang.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 java.lang.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(java.lang.Boolean value)
               throws java.lang.Exception
Sets the checks if is read.

Parameters:
value - the new checks if is read
Throws:
java.lang.Exception - the exception

getPostedTime

public java.util.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 java.lang.String getReferences()
                               throws ServiceLocalException
Gets the references of the post item.

Returns:
the references
Throws:
ServiceLocalException - the service local exception

setIsRead

public void setIsRead(java.lang.String value)
               throws java.lang.Exception
Sets the checks if is read.

Parameters:
value - the new checks if is read
Throws:
java.lang.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 java.lang.Exception
Sets the sender.

Parameters:
value - the new sender
Throws:
java.lang.Exception - the exception