Compoze Software, Inc.

com.compoze.domino
Class Task


java.lang.Object

  |

  +--com.compoze.domino.AbstractItem

        |

        +--com.compoze.domino.AbstractDocument

              |

              +--com.compoze.domino.Memo

                    |

                    +--com.compoze.domino.Task

All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
TaskNotice

public class Task
extends Memo
implements java.io.Serializable

This class is a Domino task ("to do"). Task instances are obtained from the Documents class. Methods that access properites on the class require that the properties were loaded beforehand, when the message was initially retrieved. Any methods in this class that begin with the string server make a query to the server, and require that the PropertyKey.DOCUMENT_ID and PropertyKey.DOCUMENT_TYPE properties to be loaded beforehand. Any additional property requirements are indicated on each individual method.

See Also:
Documents.serverCreateTask(PropertyValue[]), Serialized Form

Field Summary
static PropertyKey[] ALL_PROPS
          Contains an array of all of the properties available on a task.
 
Fields inherited from class com.compoze.domino.AbstractItem
m_props, m_session
 
Method Summary
 NameInfo getChair()
          Gets the chair for the task.
 java.util.Date getDueDateTime()
          Gets the due date time for this task.
 java.util.Date[] getDueDateTimeArray()
          Gets the due date time array for this task.
 java.lang.String getDueDateTimeArrayString(java.text.DateFormat dateFormat)
          Gets the due date time array for this task formatted with the specified date format.
 java.lang.String getDueDateTimeArrayString(java.text.DateFormat dateFormat, java.lang.String sDelim)
          Gets the due date time array for this task formatted with the specified date format.
 java.lang.String getDueDateTimeString(java.text.DateFormat dateFormat)
          Gets the due date time for this task formatted with the specified date format.
 TaskDueState getDueState()
          Gets the due state for the task.
 InstanceType getInstanceType()
          Gets the instance type for this task.
 NameInfo getPrincipal()
          Gets the principal for the task.
 java.util.Date getStartDateTime()
          Gets the start date time for this task.
 java.util.Date[] getStartDateTimeArray()
          Gets the start date time array for this task.
 java.lang.String getStartDateTimeArrayString(java.text.DateFormat dateFormat)
          Gets the start date time array for this task formatted with the specified date format.
 java.lang.String getStartDateTimeArrayString(java.text.DateFormat dateFormat, java.lang.String sDelim)
          Gets the start date time array for this task formatted with the specified date format.
 java.lang.String getStartDateTimeString(java.text.DateFormat dateFormat)
          Gets the start date time for this task formatted with the specified date format.
 boolean isRepeating()
          Checks if this task is repeating.
 void serverCompleted(boolean bComplete)
          Hits the server and mark the task completed.
 void serverDelete()
          Hits the server to delete the task.
 void serverDelete(int iUpdateRule)
          Hits the server to delete the task.
 RepeatPattern serverGetRepeatPattern()
          Hits the server and gets the repeat pattern for this task.
 void serverSetRepeatPattern(RepeatPattern pattern)
          Hits the server and sets the repeat pattern on the task.
 void serverUpdate()
          Hits the server to update any changed properties.
 void setDateTimes(java.util.Date startDate, java.util.Date dueDate)
          Sets the start and due date time for this task.
 
Methods inherited from class com.compoze.domino.Memo
getBody, getBodyHtml, getBodyHtml, getBodyStoredFormHtml, getBodyStoredFormHtml, getDeliveredDate, getDeliveredDateString, getDeliveryPriority, getDeliveryReportLevel, getFollowUpDate, getFollowUpStatus, getFollowUpText, getImportance, getMemoDate, getMemoDateString, getNormalizedSubject, getPostedDate, getPostedDateString, getPreventCopy, getRecipientInfoArray, getReturnReceipt, getSenderInfo, getSenderName, getSubject, getSubject, getSubject, getSubject, getUnread, isEncrypted, serverForward, serverReply, serverSaveAsDraft, serverSaveAsDraft, serverSaveAsDraft, serverSaveAsDraft, serverUpdate, setBody, setBodyHtml, setDeliveryPriority, setDeliveryReportLevel, setFollowUpDate, setFollowUpStatus, setFollowUpText, setImportance, setPreventCopy, setReturnReceipt, setSubject, setUnread
 
Methods inherited from class com.compoze.domino.AbstractDocument
getAttachmentCount, getAttachmentInfo, getAttachmentInfoArray, getDateCreated, getDateCreatedString, getDateModified, getDateModifiedString, getDocumentType, getEmbeddedImageCount, getEmbeddedImageInfo, getEmbeddedImageInfoArray, getID, getParentID, getSize, getSizeInKilos, hasAttachment, serverAddAttachment, serverCopyTo, serverDeleteAttachment, serverMoveTo
 
Methods inherited from class com.compoze.domino.AbstractItem
get, getBoolean, getDate, getDateArray, getDouble, getInt, getPropertyKeys, getString, getStringArray, getUpdatedPropertyValues, set, setBoolean, setDate, setDouble, setInt, setString, setStringArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALL_PROPS


public static final PropertyKey[] ALL_PROPS
Contains an array of all of the properties available on a task. Although this can be used when specifying property keys to retrieve, it's preferable to only specify the keys that are required as the number of properties that are pulled back from the server has a direct impact on performance.
Method Detail

getStartDateTime


public java.util.Date getStartDateTime()
                                throws DominoException
Gets the start date time for this task. If this is a repeating task that has multiple start dates, and this task was not retrieved using an instance date, the first start date is returned.
Returns:
the start date time
See Also:
PropertyKey.START_DATE_TIME, getStartDateTimeArray(), isRepeating()

getStartDateTimeArray


public java.util.Date[] getStartDateTimeArray()
                                       throws DominoException
Gets the start date time array for this task. This returns an array of start dates if this is a repeating task.
Returns:
the start date time array or an empty array if no start date is set
See Also:
PropertyKey.START_DATE_TIME, isRepeating()

getStartDateTimeString


public java.lang.String getStartDateTimeString(java.text.DateFormat dateFormat)
                                        throws DominoException
Gets the start date time for this task formatted with the specified date format.
Parameters:
dateFormat - the date format (may not be null)
Returns:
the start date time or empty string if start date time property is null
See Also:
PropertyKey.START_DATE_TIME

getStartDateTimeArrayString


public java.lang.String getStartDateTimeArrayString(java.text.DateFormat dateFormat)
                                             throws DominoException
Gets the start date time array for this task formatted with the specified date format. The dates are delimited by a comma-space (", ").
Parameters:
dateFormat - the date format (may not be null)
Returns:
the start date time or empty string if start date time property is null
See Also:
PropertyKey.START_DATE_TIME

getStartDateTimeArrayString


public java.lang.String getStartDateTimeArrayString(java.text.DateFormat dateFormat,
                                                    java.lang.String sDelim)
                                             throws DominoException
Gets the start date time array for this task formatted with the specified date format.
Parameters:
dateFormat - the date format (may not be null)
sDelim - the delimiter (may not be null)
Returns:
the start date time or empty string if start date time property is null
See Also:
PropertyKey.START_DATE_TIME

setDateTimes


public void setDateTimes(java.util.Date startDate,
                         java.util.Date dueDate)
                  throws DominoException
Sets the start and due date time for this task.

Note: the start date must be before the due date. If not, the dates are swapped.

Parameters:
startDate - the start date time or null for no start date
dueDate - the due date time or null for no due date
See Also:
PropertyKey.START_DATE_TIME, PropertyKey.START_DATE, PropertyKey.DUE_DATE_TIME, PropertyKey.DUE_DATE

getDueDateTime


public java.util.Date getDueDateTime()
                              throws DominoException
Gets the due date time for this task. If this is a repeating task that has multiple due dates, and this task was not retrieved using an instance date, the first due date is returned.
Returns:
the due date time
See Also:
PropertyKey.DUE_DATE_TIME, getDueDateTimeArray(), isRepeating()

getDueDateTimeArray


public java.util.Date[] getDueDateTimeArray()
                                     throws DominoException
Gets the due date time array for this task. This returns an array of due dates if this is a repeating task.
Returns:
the due date time array or an empty array if no due date is set
See Also:
PropertyKey.DUE_DATE_TIME, isRepeating()

getDueDateTimeString


public java.lang.String getDueDateTimeString(java.text.DateFormat dateFormat)
                                      throws DominoException
Gets the due date time for this task formatted with the specified date format.
Parameters:
dateFormat - the date format (may not be null)
Returns:
the due date time or empty string if due date time property is null
See Also:
PropertyKey.DUE_DATE_TIME

getDueDateTimeArrayString


public java.lang.String getDueDateTimeArrayString(java.text.DateFormat dateFormat)
                                           throws DominoException
Gets the due date time array for this task formatted with the specified date format. The dates are delimited by a comma (", ").
Parameters:
dateFormat - the date format (may not be null)
Returns:
the due date time or empty string if due date time property is null
See Also:
PropertyKey.DUE_DATE_TIME

getDueDateTimeArrayString


public java.lang.String getDueDateTimeArrayString(java.text.DateFormat dateFormat,
                                                  java.lang.String sDelim)
                                           throws DominoException
Gets the due date time array for this task formatted with the specified date format.
Parameters:
dateFormat - the date format (may not be null)
sDelim - the delimiter (may not be null)
Returns:
the due date time or empty string if due date time property is null
See Also:
PropertyKey.DUE_DATE_TIME

isRepeating


public boolean isRepeating()
                    throws DominoException
Checks if this task is repeating.
Returns:
true if the task is repeating; false otherwise
See Also:
PropertyKey.REPEATS

getChair


public NameInfo getChair()
                  throws DominoException
Gets the chair for the task.
Returns:
the chair for the task
See Also:
PropertyKey.CHAIR

getDueState


public TaskDueState getDueState()
                         throws DominoException
Gets the due state for the task.
Returns:
the due state for the task
See Also:
PropertyKey.DUE_STATE

getInstanceType


public InstanceType getInstanceType()
                             throws DominoException
Gets the instance type for this task.
Returns:
the instance type
See Also:
PropertyKey.INSTANCE_TYPE

serverSetRepeatPattern


public void serverSetRepeatPattern(RepeatPattern pattern)
                            throws DominoException
Hits the server and sets the repeat pattern on the task. This method only works on tasks that are of instance type SINGLE; otherwise, this method does nothing.

Note: the repeat pattern is set immediately and cannot be undone. There is no need to call serverUpdate().

Note: the existing task start date (if set) will be set to the start date of the specified repeat pattern

Note: the due date time property must be loaded prior to calling this method

Parameters:
pattern - the repeat patten (may not be null)
See Also:
getInstanceType(), PropertyKey.INSTANCE_TYPE, PropertyKey.DUE_DATE_TIME

serverGetRepeatPattern


public RepeatPattern serverGetRepeatPattern()
                                     throws DominoException
Hits the server and gets the repeat pattern for this task. This method only works on task that are repeating; otherwise, this method does nothing.
Returns:
the repeat patten or null if this is not a repeating task
See Also:
isRepeating(), PropertyKey.REPEATS

getPrincipal


public NameInfo getPrincipal()
                      throws DominoException
Gets the principal for the task.
Returns:
the principal for the task
See Also:
PropertyKey.PRINCIPAL

serverDelete


public void serverDelete()
                  throws DominoException
Hits the server to delete the task. If this is a repeating task, all instances are deleted.

serverUpdate


public void serverUpdate()
                  throws DominoException
Hits the server to update any changed properties. If PropertyKey.DUE_STATE is not updated then it is set according to the values given with PropertyKey.START_DATE_TIME, PropertyKey.DUE_DATE_TIME and PropertyKey.COMPLETED_DATE_TIME if available.
Overrides:
serverUpdate in class Memo
See Also:
PropertyKey.DUE_STATE, PropertyKey.START_DATE_TIME, PropertyKey.DUE_DATE_TIME, PropertyKey.COMPLETED_DATE_TIME

serverDelete


public void serverDelete(int iUpdateRule)
                  throws DominoException
Hits the server to delete the task.
Parameters:
iUpdateRule - the update rule (see RepeatPattern.UPDATE_ constants)
See Also:
PropertyKey.REPEATS, PropertyKey.START_DATE_TIME, PropertyKey.END_DATE_TIME

serverCompleted


public void serverCompleted(boolean bComplete)
                     throws DominoException
Hits the server and mark the task completed.
Parameters:
bComplete - true if mark complete false if mark incomplete

Compoze Software, Inc.

Copyright ©1999-2003 Compoze Software, Inc. All rights reserved.