microsoft.exchange.webservices.data
Class Task

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

public class Task
extends Item

Represents a Task item. Properties available on tasks are defined in the TaskSchema class.


Constructor Summary
  Task(ExchangeService service)
          * Initializes an unsaved local instance of Task.To bind to an existing task, use Task.Bind() instead.
protected Task(ItemAttachment parentAttachment)
          * Initializes a new instance of the class.
 
Method Summary
static Task bind(ExchangeService service, ItemId id)
          * Binds to an existing task and loads its first class properties.
static Task bind(ExchangeService service, ItemId id, PropertySet propertySet)
          * Binds to an existing task and loads the specified set of properties.
 void deleteCurrentOccurrence(DeleteMode deleteMode)
          * Deletes the current occurrence of a recurring task.
 java.lang.Integer getActualWork()
          Gets the actual amount of time that is spent on the task.
 java.util.Date getAssignedTime()
          Gets the date and time the task was assigned.
 java.lang.String getBillingInformation()
          Gets the billing information of the task.
 java.lang.Integer getChangeCount()
          Gets the number of times the task has changed since it was created.
 StringList getCompanies()
          Gets a list of companies associated with the task.
 java.util.Date getCompleteDate()
          Gets the date and time on which the task was completed.
 StringList getContacts()
          Gets a list of contacts associated with the task.
protected  AffectedTaskOccurrence getDefaultAffectedTaskOccurrences()
          Gets the default setting for how to treat affected task occurrences on Delete.
 TaskDelegationState getDelegationState()
          Gets the current delegation state of the task.
 java.lang.String getDelegator()
          Gets the name of the delegator of this task.
 java.util.Date getDueDate()
          Gets a list of contacts associated with the task.
 java.lang.Boolean getIsComplete()
          Gets a value indicating whether the task is complete.
 java.lang.Boolean getIsRecurring()
          Gets a value indicating whether the task is recurring.
 java.lang.Boolean getIsTeamTask()
          Gets a value indicating whether the task is a team task.
protected  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.
 java.lang.String getMileage()
          Gets the mileage of the task.
protected  ExchangeVersion getMinimumRequiredServerVersion()
          Gets the minimum required server version.
 TaskMode getMode()
          Gets a value indicating the mode of the task.
 java.lang.String getOwner()
          Gets the name of the owner of the task.
 java.lang.Double getPercentComplete()
          Gets the completeion percentage of the task.
 Recurrence getRecurrence()
          Gets the recurrence pattern for this task.
protected  ServiceObjectSchema getSchema()
          Internal method to return the schema associated with this type of object.
 java.util.Date getStartDate()
          Gets the date and time on which the task starts.
 TaskStatus getStatus()
          Gets the status of the task.
 java.lang.String getStatusDescription()
          Gets a string representing the status of the task, localized according to the PreferredCulture property of the ExchangeService object the task is bound to.
 java.lang.Integer getTotalWork()
          Gets the total amount of work spent on the task.
 void setActualWork(java.lang.Integer value)
          Sets the checks if is read.
 void setBillingInformation(java.lang.String value)
          Sets the billing information.
 void setCompanies(StringList value)
          Sets the companies.
 void setCompleteDate(java.util.Date value)
          Sets the complete date.
 void setContacts(StringList value)
          Sets the contacts.
 void setDueDate(java.util.Date value)
          Sets the due date.
 void setMileage(java.lang.String value)
          Sets the mileage.
 void setPercentComplete(java.lang.String value)
          Sets the percent complete.
 void setRecurrence(Recurrence value)
          Sets the recurrence.
 void setStartDate(java.util.Date value)
          Sets the start date.
 void setStatus(TaskStatus value)
          Sets the status.
 void setTotalWork(java.lang.Integer value)
          Sets the total work.
 Task updateTask(ConflictResolutionMode conflictResolutionMode)
          * Applies the local changes that have been made to this task.
 
Methods inherited from class microsoft.exchange.webservices.data.Item
copy, copy, delete, getAllowedResponseActions, getAttachments, getBody, getCategories, getConversationId, getCulture, getDateTimeCreated, getDateTimeReceived, getDateTimeSent, getDefaultSendCancellationsMode, getDefaultSendInvitationsMode, getDefaultSendInvitationsOrCancellationsMode, getDisplayCc, getDisplayTo, getEffectiveRights, getExtendedProperties, getHasAttachments, getId, getIdPropertyDefinition, getImportance, getInReplyTo, getInternetMessageHeaders, getIsAssociated, getIsDraft, getIsFromMe, getIsNew, getIsReminderSet, getIsResend, getIsSubmitted, 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

Task

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

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

Task

protected Task(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 Task bind(ExchangeService service,
                        ItemId id,
                        PropertySet propertySet)
                 throws java.lang.Exception
* Binds to an existing task 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:
A Task instance representing the task corresponding to the specified Id.
Throws:
java.lang.Exception - the exception

bind

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

Parameters:
service - the service
id - the id
Returns:
A Task instance representing the task 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()
Gets the minimum required server version.

Overrides:
getMinimumRequiredServerVersion in class Item
Returns:
Earliest Exchange version in which this service object type is supported.

getIsTimeZoneHeaderRequired

protected 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.

Overrides:
getIsTimeZoneHeaderRequired in class Item
Parameters:
isUpdateOperation - the is update operation
Returns:
if a time zone SOAP header should be emitted; otherwise, .

deleteCurrentOccurrence

public void deleteCurrentOccurrence(DeleteMode deleteMode)
                             throws ServiceLocalException,
                                    java.lang.Exception
* Deletes the current occurrence of a recurring task. After the current occurrence isdeleted, the task represents the next occurrence. Developers should call Load to retrieve the new property values of the task. Calling this method results in a call to EWS.

Parameters:
deleteMode - the delete mode
Throws:
ServiceLocalException - the service local exception
java.lang.Exception - the exception

updateTask

public Task updateTask(ConflictResolutionMode conflictResolutionMode)
                throws ServiceResponseException,
                       java.lang.Exception
* Applies the local changes that have been made to this task. Calling this method results in at least one call to EWS. Mutliple calls to EWS might be made if attachments have been added or removed.

Parameters:
conflictResolutionMode - the conflict resolution mode
Returns:
A Task object representing the completed occurrence if the task is recurring and the update marks it as completed; or a Task object representing the current occurrence if the task is recurring and the uypdate changed its recurrence pattern; or null in every other case.
Throws:
ServiceResponseException - the service response exception
java.lang.Exception - the exception

getActualWork

public java.lang.Integer getActualWork()
                                throws ServiceLocalException
Gets the actual amount of time that is spent on the task.

Returns:
the actual work
Throws:
ServiceLocalException - the service local exception

setActualWork

public void setActualWork(java.lang.Integer 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

getAssignedTime

public java.util.Date getAssignedTime()
                               throws ServiceLocalException
Gets the date and time the task was assigned.

Returns:
the assigned time
Throws:
ServiceLocalException - the service local exception

getBillingInformation

public java.lang.String getBillingInformation()
                                       throws ServiceLocalException
Gets the billing information of the task.

Returns:
the billing information
Throws:
ServiceLocalException - the service local exception

setBillingInformation

public void setBillingInformation(java.lang.String value)
                           throws java.lang.Exception
Sets the billing information.

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

getChangeCount

public java.lang.Integer getChangeCount()
                                 throws ServiceLocalException
Gets the number of times the task has changed since it was created.

Returns:
the change count
Throws:
ServiceLocalException - the service local exception

getCompanies

public StringList getCompanies()
                        throws ServiceLocalException
Gets a list of companies associated with the task.

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

setCompanies

public void setCompanies(StringList value)
                  throws java.lang.Exception
Sets the companies.

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

getCompleteDate

public java.util.Date getCompleteDate()
                               throws ServiceLocalException
Gets the date and time on which the task was completed.

Returns:
the complete date
Throws:
ServiceLocalException - the service local exception

setCompleteDate

public void setCompleteDate(java.util.Date value)
                     throws java.lang.Exception
Sets the complete date.

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

getContacts

public StringList getContacts()
                       throws ServiceLocalException
Gets a list of contacts associated with the task.

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

setContacts

public void setContacts(StringList value)
                 throws java.lang.Exception
Sets the contacts.

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

getDelegationState

public TaskDelegationState getDelegationState()
                                       throws ServiceLocalException
Gets the current delegation state of the task.

Returns:
the delegation state
Throws:
ServiceLocalException - the service local exception

getDelegator

public java.lang.String getDelegator()
                              throws ServiceLocalException
Gets the name of the delegator of this task.

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

getDueDate

public java.util.Date getDueDate()
                          throws ServiceLocalException
Gets a list of contacts associated with the task.

Returns:
the due date
Throws:
ServiceLocalException - the service local exception

setDueDate

public void setDueDate(java.util.Date value)
                throws java.lang.Exception
Sets the due date.

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

getMode

public TaskMode getMode()
                 throws ServiceLocalException
Gets a value indicating the mode of the task.

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

getIsComplete

public java.lang.Boolean getIsComplete()
                                throws ServiceLocalException
Gets a value indicating whether the task is complete.

Returns:
the checks if is complete
Throws:
ServiceLocalException - the service local exception

getIsRecurring

public java.lang.Boolean getIsRecurring()
                                 throws ServiceLocalException
Gets a value indicating whether the task is recurring.

Returns:
the checks if is recurring
Throws:
ServiceLocalException - the service local exception

getIsTeamTask

public java.lang.Boolean getIsTeamTask()
                                throws ServiceLocalException
Gets a value indicating whether the task is a team task.

Returns:
the checks if is team task
Throws:
ServiceLocalException - the service local exception

getMileage

public java.lang.String getMileage()
                            throws ServiceLocalException
Gets the mileage of the task.

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

setMileage

public void setMileage(java.lang.String value)
                throws java.lang.Exception
Sets the mileage.

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

getOwner

public java.lang.String getOwner()
                          throws ServiceLocalException
Gets the name of the owner of the task.

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

getPercentComplete

public java.lang.Double getPercentComplete()
                                    throws ServiceLocalException
Gets the completeion percentage of the task. PercentComplete must be between 0 and 100.

Returns:
the percent complete
Throws:
ServiceLocalException - the service local exception

setPercentComplete

public void setPercentComplete(java.lang.String value)
                        throws java.lang.Exception
Sets the percent complete.

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

getRecurrence

public Recurrence getRecurrence()
                         throws ServiceLocalException
Gets the recurrence pattern for this task. Available recurrence pattern classes include Recurrence.DailyPattern, Recurrence.MonthlyPattern and Recurrence.YearlyPattern.

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

setRecurrence

public void setRecurrence(Recurrence value)
                   throws java.lang.Exception
Sets the recurrence.

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

getStartDate

public java.util.Date getStartDate()
                            throws ServiceLocalException
Gets the date and time on which the task starts.

Returns:
the start date
Throws:
ServiceLocalException - the service local exception

setStartDate

public void setStartDate(java.util.Date value)
                  throws java.lang.Exception
Sets the start date.

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

getStatus

public TaskStatus getStatus()
                     throws ServiceLocalException
Gets the status of the task.

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

setStatus

public void setStatus(TaskStatus value)
               throws java.lang.Exception
Sets the status.

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

getStatusDescription

public java.lang.String getStatusDescription()
                                      throws ServiceLocalException
Gets a string representing the status of the task, localized according to the PreferredCulture property of the ExchangeService object the task is bound to.

Returns:
the status description
Throws:
ServiceLocalException - the service local exception

getTotalWork

public java.lang.Integer getTotalWork()
                               throws ServiceLocalException
Gets the total amount of work spent on the task.

Returns:
the total work
Throws:
ServiceLocalException - the service local exception

setTotalWork

public void setTotalWork(java.lang.Integer value)
                  throws java.lang.Exception
Sets the total work.

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

getDefaultAffectedTaskOccurrences

protected AffectedTaskOccurrence getDefaultAffectedTaskOccurrences()
Gets the default setting for how to treat affected task occurrences on Delete. AffectedTaskOccurrence.AllOccurrences: All affected Task occurrences will be deleted.

Overrides:
getDefaultAffectedTaskOccurrences in class Item
Returns:
the default affected task occurrences