Class Task
- 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.Task
-
-
Constructor Summary
Constructors Constructor Description Task(ExchangeService service)Initializes an unsaved local instance of Task.To bind to an existing task, use Task.Bind() instead.Task(ItemAttachment parentAttachment)Initializes a new instance of the class.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static Taskbind(ExchangeService service, ItemId id)Binds to an existing task and loads its first class property.static Taskbind(ExchangeService service, ItemId id, PropertySet propertySet)Binds to an existing task and loads the specified set of property.voiddeleteCurrentOccurrence(DeleteMode deleteMode)Deletes the current occurrence of a recurring task.IntegergetActualWork()Gets the actual amount of time that is spent on the task.DategetAssignedTime()Gets the date and time the task was assigned.StringgetBillingInformation()Gets the billing information of the task.IntegergetChangeCount()Gets the number of times the task has changed since it was created.StringListgetCompanies()Gets a list of companies associated with the task.DategetCompleteDate()Gets the date and time on which the task was completed.StringListgetContacts()Gets a list of contacts associated with the task.protected AffectedTaskOccurrencegetDefaultAffectedTaskOccurrences()Gets the default setting for how to treat affected task occurrences on Delete.TaskDelegationStategetDelegationState()Gets the current delegation state of the task.StringgetDelegator()Gets the name of the delegator of this task.DategetDueDate()Gets a list of contacts associated with the task.BooleangetIsComplete()Gets a value indicating whether the task is complete.BooleangetIsRecurring()Gets a value indicating whether the task is recurring.BooleangetIsTeamTask()Gets a value indicating whether the task is a team task.booleangetIsTimeZoneHeaderRequired(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.StringgetMileage()Gets the mileage of the task.ExchangeVersiongetMinimumRequiredServerVersion()Gets the minimum required server version.TaskModegetMode()Gets a value indicating the mode of the task.StringgetOwner()Gets the name of the owner of the task.DoublegetPercentComplete()Gets the completion percentage of the task.RecurrencegetRecurrence()Gets the recurrence pattern for this task.ServiceObjectSchemagetSchema()Internal method to return the schema associated with this type of object.DategetStartDate()Gets the date and time on which the task starts.TaskStatusgetStatus()Gets the status of the task.StringgetStatusDescription()Gets a string representing the status of the task, localized according to the PreferredCulture property of the ExchangeService object the task is bound to.IntegergetTotalWork()Gets the total amount of work spent on the task.voidsetActualWork(Integer value)Sets the checks if is read.voidsetBillingInformation(String value)Sets the billing information.voidsetCompanies(StringList value)Sets the companies.voidsetCompleteDate(Date value)Sets the complete date.voidsetContacts(StringList value)Sets the contacts.voidsetDueDate(Date value)Sets the due date.voidsetMileage(String value)Sets the mileage.voidsetPercentComplete(Double value)Sets the completion percentage of the task.voidsetPercentComplete(String value)Deprecated.use Double parameter insteadvoidsetRecurrence(Recurrence value)Sets the recurrence.voidsetStartDate(Date value)Sets the start date.voidsetStatus(TaskStatus value)Sets the status.voidsetTotalWork(Integer value)Sets the total work.TaskupdateTask(ConflictResolutionMode conflictResolutionMode)Applies the local changes that have been made to this task.-
Methods inherited from class microsoft.exchange.webservices.data.core.service.item.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, 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
-
Task
public Task(ExchangeService service) throws Exception
Initializes an unsaved local instance of Task.To bind to an existing task, use Task.Bind() instead.- Parameters:
service- the service- Throws:
Exception- the exception
-
Task
public Task(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 Task bind(ExchangeService service, ItemId id, PropertySet propertySet) throws Exception
Binds to an existing task 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:
- A Task instance representing the task corresponding to the specified Id.
- Throws:
Exception- the exception
-
bind
public static Task bind(ExchangeService service, ItemId id) throws Exception
Binds to an existing task and loads its first class property. Calling this method results in a call to EWS.- Parameters:
service- the serviceid- the id- Returns:
- A Task instance representing the task 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()
Gets the minimum required server version.- Overrides:
getMinimumRequiredServerVersionin classItem- Returns:
- Earliest Exchange version in which this service object type is supported.
-
getIsTimeZoneHeaderRequired
public 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:
getIsTimeZoneHeaderRequiredin classItem- 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, 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 exceptionException- the exception
-
updateTask
public Task updateTask(ConflictResolutionMode conflictResolutionMode) throws ServiceResponseException, 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 exceptionException- the exception
-
getActualWork
public 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(Integer value) throws Exception
Sets the checks if is read.- Parameters:
value- the new checks if is read- Throws:
Exception- the exception
-
getAssignedTime
public 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 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(String value) throws Exception
Sets the billing information.- Parameters:
value- the new billing information- Throws:
Exception- the exception
-
getChangeCount
public 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 Exception
Sets the companies.- Parameters:
value- the new companies- Throws:
Exception- the exception
-
getCompleteDate
public 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(Date value) throws Exception
Sets the complete date.- Parameters:
value- the new complete date- Throws:
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 Exception
Sets the contacts.- Parameters:
value- the new contacts- Throws:
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 String getDelegator() throws ServiceLocalException
Gets the name of the delegator of this task.- Returns:
- the delegator
- Throws:
ServiceLocalException- the service local exception
-
getDueDate
public 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(Date value) throws Exception
Sets the due date.- Parameters:
value- the new due date- Throws:
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 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 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 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 String getMileage() throws ServiceLocalException
Gets the mileage of the task.- Returns:
- the mileage
- Throws:
ServiceLocalException- the service local exception
-
setMileage
public void setMileage(String value) throws Exception
Sets the mileage.- Parameters:
value- the new mileage- Throws:
Exception- the exception
-
getOwner
public String getOwner() throws ServiceLocalException
Gets the name of the owner of the task.- Returns:
- the owner
- Throws:
ServiceLocalException- the service local exception
-
getPercentComplete
public Double getPercentComplete() throws ServiceLocalException
Gets the completion percentage of the task. PercentComplete must be between 0 and 100.- Returns:
- the percent complete
- Throws:
ServiceLocalException- the service local exception
-
setPercentComplete
@Deprecated public void setPercentComplete(String value) throws Exception
Deprecated.use Double parameter insteadSets the completion percentage of the task. PercentComplete must be between 0.0 and 100.0 .- Parameters:
value- the new percent complete- Throws:
Exception- the exception
-
setPercentComplete
public void setPercentComplete(Double value) throws Exception
Sets the completion percentage of the task. PercentComplete must be between 0.0 and 100.0 .- Parameters:
value- the new percent complete- Throws:
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 Exception
Sets the recurrence.- Parameters:
value- the new recurrence- Throws:
Exception- the exception
-
getStartDate
public 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(Date value) throws Exception
Sets the start date.- Parameters:
value- the new start date- Throws:
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 Exception
Sets the status.- Parameters:
value- the new status- Throws:
Exception- the exception
-
getStatusDescription
public 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 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(Integer value) throws Exception
Sets the total work.- Parameters:
value- the new total work- Throws:
Exception- the exception
-
getDefaultAffectedTaskOccurrences
protected AffectedTaskOccurrence getDefaultAffectedTaskOccurrences()
Gets the default setting for how to treat affected task occurrences on Delete.- Overrides:
getDefaultAffectedTaskOccurrencesin classItem- Returns:
- the default affected task occurrences
-
-