|
Compoze Software, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.compoze.todo.ToDo
This class represents a to do.
To add and search for to dos, see the ToDos
collection
class. Once the list is obtained, its
accessor methods may be called to
set and get properties. The update()
method
must be called to store any changes to the server.
A ToDo conforms to the vCalendar specification (RFC #2445). To
generate a vCalendar compliant representation of a
todo, use toVcalendarString()
.
The following table contains the mappings from To Do properties to their corresponding Java methods:
Field Summary | |
static java.lang.String |
DEFAULT_VCALENDAR_VERSION
The default vCalendar version. |
Constructor Summary | |
ToDo()
Constructor. |
Method Summary | |
void |
addCategory(Category category)
Adds the specified category to the list of categories. |
void |
clearDateRecurrence()
Clears the date recurrence for the to do. |
void |
clearFlag()
Clears the flag on this to do. |
void |
delete()
Deletes the to do. |
void |
flag(Flag flag)
Flags this to do with the specified flag. |
AccessManager |
getAccessManager()
Gets the access manager for this to do. |
java.lang.String |
getBillingInformation()
Gets the billing information of the to do. |
Categories |
getCategories()
Gets the list of categories. |
java.util.Date |
getCompleteDate()
Gets the complete date. |
java.lang.String |
getCompleteDateString(java.text.DateFormat dateFormat)
Gets the complete date formatted string. |
long |
getCustomNum1()
Gets the custom number1 field of the to do. |
long |
getCustomNum2()
Gets the custom number2 field of the to do. |
long |
getCustomNum3()
Gets the custom number3 field of the to do. |
long |
getCustomNum4()
Gets the custom number4 field of the to do. |
java.lang.String |
getCustomStr1()
Gets the custom string1 field of the to do. |
java.lang.String |
getCustomStr2()
Gets the custom string2 field of the to do. |
java.lang.String |
getCustomStr3()
Gets the custom string3 field of the to do. |
java.lang.String |
getCustomStr4()
Gets the custom string4 field of the to do. |
java.util.Date |
getDateCreated()
Gets the date the to do was created. |
java.util.Date |
getDateLastModified()
Gets the date the to do was last modified. |
DateRecurrence |
getDateRecurrence()
Gets the date recurrence for the to do. |
java.lang.String |
getDescription()
Gets the description of the to do. |
java.util.Date |
getDueDate()
Gets the due date. |
java.lang.String |
getDueDateString(java.text.DateFormat dateFormat)
Gets the due date formatted string. |
Flag |
getFlag()
Gets the flag of the to do. |
long |
getID()
Gets the unique identifier (id) of the to do. |
java.lang.String |
getLocation()
Gets the location of the to do. |
java.lang.String |
getMileage()
Gets the mileage of the to do. |
java.lang.String |
getOrganizer()
Gets the name of the organizer. |
ToDo |
getParent()
Gets the parent to do of this to do. |
long |
getParentToDoID()
Gets the parent to do id of this to do. |
int |
getPercent()
Gets the percent complete. |
Priority |
getPriority()
Gets the priority of the to do. |
java.util.Date |
getStartDate()
Gets the start date. |
java.lang.String |
getStartDateString(java.text.DateFormat dateFormat)
Gets the start date formatted string. |
Status |
getStatus()
Gets the status of the to do. |
java.lang.String |
getSummary()
Gets the summary of the to do. |
java.lang.String |
getSummary(int iLength)
Gets the summary of the to do. |
java.lang.String |
getSummary(int iLength,
java.util.Locale locale)
Gets the summary of the to do. |
java.lang.String |
getSummary(java.util.Locale locale)
Gets the summary of the to do. |
ToDos |
getToDos()
Gets the sub-tos of this to do. |
boolean |
isComplete()
Checks if the to do is complete. |
boolean |
isHighPriority()
Checks if the to do is high priority. |
boolean |
isRecurring()
Checks if this to do is a recurring to do (its date recurrence is not null ). |
void |
markComplete()
Marks the to do as completed and sets the complete date. |
void |
removeCategories()
Removes all categories from the list of categories. |
void |
removeCategory(Category category)
Removes the specified category from the list of categories. |
void |
setBillingInformation(java.lang.String sBillingInformation)
Sets the billing information of the to do. |
void |
setCompleteDate(java.util.Date completeDate)
Sets the complete date. |
void |
setCustomNum1(long lCustomNum1)
Sets the custom number1 field of the to do. |
void |
setCustomNum2(long lCustomNum2)
Sets the custom number2 field of the to do. |
void |
setCustomNum3(long lCustomNum3)
Sets the custom number3 field of the to do. |
void |
setCustomNum4(long lCustomNum4)
Sets the custom number4 field of the to do. |
void |
setCustomStr1(java.lang.String sCustomStr1)
Sets the custom string1 field of the to do. |
void |
setCustomStr2(java.lang.String sCustomStr2)
Sets the custom string2 field of the to do. |
void |
setCustomStr3(java.lang.String sCustomStr3)
Sets the custom string3 field of the to do. |
void |
setCustomStr4(java.lang.String sCustomStr4)
Sets the custom string4 field of the to do. |
void |
setDateRecurrence(DateRecurrence recurrence)
Sets the date recurrence that defines a recurring to do. |
void |
setDescription(java.lang.String sDescription)
Sets the description of the to do. |
void |
setDueDate(java.util.Date dueDate)
Sets the due date. |
void |
setLocation(java.lang.String sLocation)
Sets the location of the to do. |
void |
setMileage(java.lang.String sMileage)
Sets the mileage of the to do. |
void |
setPercent(int iPercent)
Sets the percent complete. |
void |
setPriority(Priority priority)
Sets the priority of the to do. |
void |
setStartDate(java.util.Date startDate)
Sets the start date. |
void |
setStatus(Status status)
Sets the status of the to do. |
void |
setSummary(java.lang.String sSummary)
Sets the summary of the to do. |
java.lang.String |
toString()
Returns a string representation of the object. |
java.lang.String |
toVcalendarString()
Creates a string that contains the vCalendar compliant (RFC #2445) representation of the to do. |
java.lang.String |
toVcalendarString(java.lang.String sVersion)
Creates a string that contains the vCalendar compliant (RFC #2445) representation of the to do. |
boolean |
update()
Updates the to do (saves the to do entry). |
boolean |
update(boolean bForce)
Updates the to do (saves the to do entry). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String DEFAULT_VCALENDAR_VERSION
toVcalendarString()
Constructor Detail |
public ToDo()
ToDos.add()
to
create a to do.Method Detail |
public long getID()
public void setDateRecurrence(DateRecurrence recurrence)
To clear the date recurrence, use clearDateRecurrence()
.
If recurrence is set on a to do, once the to do
is marked completed markComplete()
, the next
to do in the recurrence is created.
recurrence
- the date recurrence (may not be null
)public DateRecurrence getDateRecurrence()
isRecurring()
method.null
if it is not setpublic void clearDateRecurrence()
public boolean isRecurring()
null
).true
if this to do is a recurring to do; false
otherwisepublic java.lang.String getOrganizer()
public java.lang.String getSummary()
todo.summary
from
todo_resources.properties
is returned. This will prevent an
empty string from being returned. If you wish to return the empty string,
set todo.summary
to blank. The default
locale is used.getSummary(java.util.Locale)
public java.lang.String getSummary(java.util.Locale locale)
If the summary is an empty string, the setting todo.summary
from
todo_resources.properties
is returned. This will prevent an
empty string from being returned. If you wish to return the empty string,
set todo.summary
to blank.
locale
- the locale to usepublic java.lang.String getSummary(int iLength, java.util.Locale locale)
iLength
- the maximum length of the result (string plus "...")locale
- the locale to usepublic java.lang.String getSummary(int iLength)
iLength
- the maximum length of the result (string plus "...")public void setSummary(java.lang.String sSummary)
sSummary
- the summary of to dopublic java.lang.String getLocation()
public void setLocation(java.lang.String sLocation)
sLocation
- the location of to dopublic java.lang.String getBillingInformation()
public void setBillingInformation(java.lang.String sBillingInformation)
sBillingInformation
- the billing information of to dopublic java.lang.String getMileage()
public void setMileage(java.lang.String sMileage)
sMileage
- the mileage of to dopublic java.lang.String getDescription()
public void setDescription(java.lang.String sDescription)
sDescription
- the description of to dopublic void markComplete()
Status.COMPLETED
,
setStatus(Status)
,
getCompleteDate()
,
isRecurring()
public void setStatus(Status status)
status
- the status to set the to do (may not be null
)public Status getStatus()
public boolean isComplete()
true
if the to do is complete; false
otherwiseStatus.COMPLETED
public void setPriority(Priority priority)
priority
- the priority to set the to do (may not be null
)public Priority getPriority()
public boolean isHighPriority()
true
if the to do is high priority; false
otherwisePriority.HIGH
public Flag getFlag()
null
for nonepublic void flag(Flag flag)
flag
- the flagpublic void clearFlag()
public int getPercent()
public void setPercent(int iPercent)
iPercent
- the percentage of the to do that is complete (must be between 0 and 100, inclusive)java.lang.IllegalArgumentException
- if the specified percentage is not between 0 and 100, inclusivesetPercent(int)
public java.util.Date getDueDate()
null
if not setpublic void setDueDate(java.util.Date dueDate)
dueDate
- the due date or null
to not setpublic java.lang.String getDueDateString(java.text.DateFormat dateFormat)
If the due date is not set (null
), the setting todo.due_date
from
todo_resources.properties
is returned. This will prevent an
empty string from being returned. If you wish to return the empty string,
set todo.due_date
to blank.
public java.util.Date getStartDate()
null
if not setpublic java.lang.String getStartDateString(java.text.DateFormat dateFormat)
If the start date is not set (null
), the setting todo.start_date
from
todo_resources.properties
is returned. This will prevent an
empty string from being returned. If you wish to return the empty string,
set todo.start_date
to blank.
public void setStartDate(java.util.Date startDate)
startDate
- the start date or null
to not setpublic void setCompleteDate(java.util.Date completeDate)
completeDate
- the complete date or null
to not setpublic java.util.Date getCompleteDate()
null
if not setpublic java.lang.String getCompleteDateString(java.text.DateFormat dateFormat)
If the complete date is not set (null
), the setting todo.complete_date
from
todo_resources.properties
is returned. This will prevent an
empty string from being returned. If you wish to return the empty string,
set todo.complete_date
to blank.
public Categories getCategories()
addCategory(Category)
and removeCategory(Category)
.null
if no categories are setCategory
,
addCategory(Category)
,
removeCategory(Category)
public void addCategory(Category category)
category
- the category to add (may not be null
)getCategories()
,
removeCategory(Category)
public void removeCategories()
getCategories()
,
addCategory(Category)
,
removeCategory(Category)
public void removeCategory(Category category)
category
- the category to remove (may not be null
)getCategories()
,
addCategory(Category)
public java.util.Date getDateCreated()
public java.util.Date getDateLastModified()
public long getCustomNum1()
null
if the custom number1 field is not setpublic void setCustomNum1(long lCustomNum1)
lCustomNum1
- the custom number1 field of the to dopublic long getCustomNum2()
null
if the custom number2 field is not setpublic void setCustomNum2(long lCustomNum2)
lCustomNum2
- the custom number2 field of the to dopublic long getCustomNum3()
null
if the custom number3 field is not setpublic void setCustomNum3(long lCustomNum3)
lCustomNum3
- the custom number3 field of the to dopublic long getCustomNum4()
null
if the custom number4 field is not setpublic void setCustomNum4(long lCustomNum4)
lCustomNum4
- the custom number4 field of the to dopublic java.lang.String getCustomStr1()
null
if the custom string1 field is not setpublic void setCustomStr1(java.lang.String sCustomStr1)
sCustomStr1
- the custom string1 field of the to dopublic java.lang.String getCustomStr2()
null
if the custom string2 field is not setpublic void setCustomStr2(java.lang.String sCustomStr2)
sCustomStr2
- the custom string2 field of the to dopublic java.lang.String getCustomStr3()
null
if the custom string3 field is not setpublic void setCustomStr3(java.lang.String sCustomStr3)
sCustomStr3
- the custom string3 field of the to dopublic java.lang.String getCustomStr4()
null
if the custom string4 field is not setpublic void setCustomStr4(java.lang.String sCustomStr4)
sCustomStr4
- the custom string4 field of the to dopublic AccessManager getAccessManager() throws AccessManagerException
AccessManagerException
- an error occurs retrieving the access managerToDoPermission
public long getParentToDoID()
public ToDo getParent()
null
if there is no parent)public ToDos getToDos()
public boolean update() throws java.security.AccessControlException
true
if the update is successful; false
otherwisejava.security.AccessControlException
- occurs if the user does not have permission to edit the to dopublic boolean update(boolean bForce) throws java.security.AccessControlException
bForce
- true
to force the update; false
otherwise (currently ignored)true
if the update is successful; false
otherwisejava.security.AccessControlException
- occurs if the user does not have permission to edit the to dopublic void delete() throws java.security.AccessControlException
java.security.AccessControlException
- occurs if the user does not have permission to delete the to dopublic java.lang.String toVcalendarString()
DEFAULT_VCALENDAR_VERSION
public java.lang.String toVcalendarString(java.lang.String sVersion)
sVersion
- the vCalendar version to presentpublic java.lang.String toString()
toString
in class java.lang.Object
|
Compoze Software, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |