|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.nitido.nimx.nuggets.wcap.Component
com.nitido.nimx.nuggets.wcap.ToDo
public class ToDo
The data object for storing all information of an to-do. The description of the default constructor contains more detail about what kind of information this object has encapsulated.
Field Summary | |
---|---|
protected java.util.Date |
_completed
|
protected java.util.Date |
_due
|
protected Duration |
_duration
|
protected boolean |
_isAllDay
|
protected int |
_percent
|
protected boolean |
_removeCompleted
|
protected java.util.Date |
_start
|
Fields inherited from class com.nitido.nimx.nuggets.wcap.Component |
---|
_alarm, _created, _desc, _exdates, _exrules, _lastMod, _location, _priority, _rdates, _rid, _rrules, _sequence, _status, _timeZoneId, _title, _uid |
Constructor Summary | |
---|---|
ToDo(java.lang.String title,
java.util.Date start)
Convenience constructor. |
|
ToDo(java.lang.String uid,
java.lang.String rid,
java.lang.String title,
java.lang.String desc,
java.lang.String location,
CompStatus status,
java.util.Vector rdates,
java.util.Vector rrules,
java.util.Vector exdates,
java.util.Vector exrules,
Alarm alarm,
boolean isAllDay,
java.util.Date start,
java.util.Date due,
Duration duration)
Proprietary Default Constructor - This constructor does not specify the completed, percent, priority and sequence. |
|
ToDo(java.lang.String uid,
java.lang.String rid,
java.lang.String title,
java.lang.String desc,
java.lang.String location,
CompStatus status,
java.util.Vector rdates,
java.util.Vector rrules,
java.util.Vector exdates,
java.util.Vector exrules,
Alarm alarm,
int priority,
int sequence,
int percent,
java.util.Date completed,
boolean removeCompleted,
boolean isAllDay,
java.util.Date start,
java.util.Date due,
Duration duration)
Constructor for application - This is the constructor one should use when creating/adding a new ToDo. |
|
ToDo(java.lang.String uid,
java.lang.String rid,
java.lang.String title,
java.lang.String desc,
java.lang.String location,
CompStatus status,
java.util.Vector rdates,
java.util.Vector rrules,
java.util.Vector exdates,
java.util.Vector exrules,
Alarm alarm,
int priority,
int sequence,
int percent,
java.util.Date completed,
boolean removeCompleted,
boolean isAllDay,
java.util.Date start,
java.util.Date due,
Duration duration,
java.util.Date created,
java.util.Date lastMod)
Constructor for old version of application - This constructor does not requires the TimeZoneId parameter. |
|
ToDo(java.lang.String uid,
java.lang.String rid,
java.lang.String title,
java.lang.String desc,
java.lang.String location,
CompStatus status,
java.util.Vector rdates,
java.util.Vector rrules,
java.util.Vector exdates,
java.util.Vector exrules,
Alarm alarm,
int priority,
int sequence,
int percent,
java.util.Date completed,
boolean removeCompleted,
boolean isAllDay,
java.util.Date start,
java.util.Date due,
Duration duration,
java.util.Date created,
java.util.Date lastMod,
java.lang.String timeZoneId)
Default Constructor - This constructor takes in parameters for intializing all of the member fields. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object inObj)
Override the default java.lang.Object's equal command. |
java.util.Date |
getCompletionDate()
Get the completion date. |
java.util.Date |
getDueTime()
Get the due date/time of the ToDo. |
Duration |
getDuration()
Get the duration of the ToDo. |
boolean |
getIsAllDay()
Get the flag that indicates whether the ToDo is an all day todo. |
int |
getPercent()
Get the percent (of completion). |
java.util.Date |
getStartTime()
Get the starting date/time of the ToDo. |
boolean |
isCompleted()
Get whether the todo is really completed. |
void |
markAsCompleted(java.util.Date completed)
Mark the todo as completed at the specify date. |
void |
markAsIncomplete()
Mark the todo as incompleted |
void |
setPercent(int percent)
Set the percent (of completion). |
void |
setTime(boolean isAllDay,
java.util.Date start,
java.util.Date due,
Duration duration)
Set the date/time of the ToDo. |
java.lang.String |
toString()
Returns a meaningful message with respect to the content of the object. |
java.lang.String |
toWcapQuery(WcapNugget nugget,
java.text.DateFormat dfDay,
java.text.DateFormat dfFull)
Convert the component into a string that is used for constructing a WCAP query. |
Methods inherited from class com.nitido.nimx.nuggets.wcap.Component |
---|
getAlarm, getCreatedDate, getDescription, getExclusionDates, getExclusionRules, getLastModDate, getLocation, getPriority, getRecurrenceDates, getRecurrenceRules, getRid, getSequence, getStatus, getTimeZoneId, getTitle, getUid, hasRecurRule, setAlarm, setCreatedDate, setDescription, setExclusionDates, setExclusionRules, setLastModDate, setLocation, setPriority, setRecurrenceDates, setRecurrenceRules, setRid, setSequence, setStatus, setTimeZoneId, setTitle, setUid |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected int _percent
protected boolean _removeCompleted
protected java.util.Date _completed
protected boolean _isAllDay
protected java.util.Date _start
protected java.util.Date _due
protected Duration _duration
Constructor Detail |
---|
public ToDo(java.lang.String uid, java.lang.String rid, java.lang.String title, java.lang.String desc, java.lang.String location, CompStatus status, java.util.Vector rdates, java.util.Vector rrules, java.util.Vector exdates, java.util.Vector exrules, Alarm alarm, int priority, int sequence, int percent, java.util.Date completed, boolean removeCompleted, boolean isAllDay, java.util.Date start, java.util.Date due, Duration duration, java.util.Date created, java.util.Date lastMod, java.lang.String timeZoneId) throws InvalidParameterException
It should never be used by the application. It is usually invoked by the WcapNugget or future extended/customized version of the WcapNugget.
In the following parameter list, each parameter starts with a [] tag that indicates the nature of the parameter. The available tags are:
uid
- [SERVER] The unique id of the todo. This parameter is required only
when you are modifying an existing todo. If you are adding a new
todo, you should set this parameter to null and it will be ignored.
rid
- [SERVER] The recurrence id of the todo. This parameter is required
only when you are modifying an existing todo. If you are adding a
new todo this parameter will be ignored. If you are modifying an
todo without recurrence, you may set it to string "0".
title
- [REQUIRED] - The title of the ToDo. It must exists when creating
desc
- [OPTIONAL] - The description. If it is null, the ToDo will
have no description.
location
- [OPTIONAL] - The location of the ToDo. If it is null, the
ToDo will have no location.
status
- [SERVER] - The component status as indicated by the server.
rdates
- [OPTIONAL] - A Vector of RecurDate objects that indicates the
recurrence dates.
rrules
- [OPTIONAL] - A Vector of RecurRule objects that represents the
recurrence rules.
exdates
- [OPTIONAL] - A Vector of RecurDate objects that indicates the dates
to be excluded from recurrence.
exrules
- [OPTIONAL] - A Vector of RecurRule objects that represents the
rules for the time that are excluded from the recurrence.
alarm
- [OPTIONAL] - An Alarm object that represent the reminder trigger.
priority
- [OPTIONAL] - The priority of the ToDo,
It is an integer with value 0=lowest priority and
9=highest priority.
A negative value means the priority is not specified.
sequence
- [OPTIONAL] - The sequence number of the ToDo.
It is an integer with value starting from 0.
A negative value means the sequence is not specified.
percent
- [OPTIONAL] - The percent of the ToDo has been completed.
It is an integer with value from 0 to 100.
completed
- [OPTIONAL] - The Date object for completion time of the ToDo. This
field is the field to indicate whether a ToDo has
actually completed. Setting the "status" field to
CompStatus.COMPLETED is NOT sufficient for the Calendar
server to acknowledge the ToDo is completed.
removeCompleted
- [OPTIONAL] - A boolean flag to indicate if the todo is going to
remove any existing completion date.
isAllDay
- [REQUIRED] - A true value indicates this ToDo lasts all day.
start
- [REQUIRED] - The Date object for starting time of the ToDo.
In the new SunONE Calendar 6.0, the Calendar Express interface always
generates ToDos that have no start time. So, the check for null is
no longer applicable. Moreover, to the WCAP interface, the start
time is required only when creating the ToDo. It is an optional field
when you are modifying the ToDo.
due
- [OPTIONAL] - The Date object for ending time. This parameter is
required if and only if isAllDay parameter is false.
This parameter will be ignored if the todo will
last all day.duration
- [OPTIONAL] - The duration of the event.created
- [OPTIONAL] - The Date object for the creation timelastMod
- [OPTIONAL] - The Date object for the last modification time.timeZoneId
- [OPTIONAL] - The time zone id string for the notification email.
InvalidParameterException
- At least one of the required parameter is missing, or an optional
parameter has invalid value.public ToDo(java.lang.String uid, java.lang.String rid, java.lang.String title, java.lang.String desc, java.lang.String location, CompStatus status, java.util.Vector rdates, java.util.Vector rrules, java.util.Vector exdates, java.util.Vector exrules, Alarm alarm, int priority, int sequence, int percent, java.util.Date completed, boolean removeCompleted, boolean isAllDay, java.util.Date start, java.util.Date due, Duration duration, java.util.Date created, java.util.Date lastMod) throws InvalidParameterException
It should never be used by the application. It is usually invoked by the WcapNugget or future extended/customized version of the WcapNugget.
In the following parameter list, each parameter starts with a [] tag that indicates the nature of the parameter. The available tags are:
uid
- [SERVER] The unique id of the todo. This parameter is required only
when you are modifying an existing todo. If you are adding a new
todo, you should set this parameter to null and it will be ignored.
rid
- [SERVER] The recurrence id of the todo. This parameter is required
only when you are modifying an existing todo. If you are adding a
new todo this parameter will be ignored. If you are modifying an
todo without recurrence, you may set it to string "0".
title
- [REQUIRED] - The title of the ToDo. It must exists when creating
desc
- [OPTIONAL] - The description. If it is null, the ToDo will
have no description.
location
- [OPTIONAL] - The location of the ToDo. If it is null, the
ToDo will have no location.
status
- [SERVER] - The component status as indicated by the server.
rdates
- [OPTIONAL] - A Vector of RecurDate objects that indicates the
recurrence dates.
rrules
- [OPTIONAL] - A Vector of RecurRule objects that represents the
recurrence rules.
exdates
- [OPTIONAL] - A Vector of RecurDate objects that indicates the dates
to be excluded from recurrence.
exrules
- [OPTIONAL] - A Vector of RecurRule objects that represents the
rules for the time that are excluded from the recurrence.
alarm
- [OPTIONAL] - An Alarm object that represent the reminder trigger.
priority
- [OPTIONAL] - The priority of the ToDo,
It is an integer with value 0=lowest priority and
9=highest priority.
A negative value means the priority is not specified.
sequence
- [OPTIONAL] - The sequence number of the ToDo.
It is an integer with value starting from 0.
A negative value means the sequence is not specified.
percent
- [OPTIONAL] - The percent of the ToDo has been completed.
It is an integer with value from 0 to 100.
completed
- [OPTIONAL] - The Date object for completion time of the ToDo. This
field is the field to indicate whether a ToDo has
actually completed. Setting the "status" field to
CompStatus.COMPLETED is NOT sufficient for the Calendar
server to acknowledge the ToDo is completed.
removeCompleted
- [OPTIONAL] - A boolean flag to indicate if the todo is going to
remove any existing completion date.
isAllDay
- [REQUIRED] - A true value indicates this ToDo lasts all day.
start
- [REQUIRED] - The Date object for starting time of the ToDo.
In the new SunONE Calendar 6.0, the Calendar Express interface always
generates ToDos that have no start time. So, the check for null is
no longer applicable. Moreover, to the WCAP interface, the start
time is required only when creating the ToDo. It is an optional field
when you are modifying the ToDo.
due
- [OPTIONAL] - The Date object for ending time. This parameter is
required if and only if isAllDay parameter is false.
This parameter will be ignored if the todo will
last all day.duration
- [OPTIONAL] - The duration of the event.created
- [OPTIONAL] - The Date object for the creation timelastMod
- [OPTIONAL] - The Date object for the last modification time.
InvalidParameterException
- At least one of the required parameter is missing, or an optional
parameter has invalid value.public ToDo(java.lang.String uid, java.lang.String rid, java.lang.String title, java.lang.String desc, java.lang.String location, CompStatus status, java.util.Vector rdates, java.util.Vector rrules, java.util.Vector exdates, java.util.Vector exrules, Alarm alarm, int priority, int sequence, int percent, java.util.Date completed, boolean removeCompleted, boolean isAllDay, java.util.Date start, java.util.Date due, Duration duration) throws InvalidParameterException
In the following parameter list, each parameter starts with a [] tag that indicates the nature of the parameter. The available tags are:
uid
- [SERVER] The unique id of the todo. This parameter is required only
when you are modifying an existing todo. If you are adding a new
todo, you should set this parameter to null and it will be ignored.
rid
- [SERVER] The recurrence id of the todo. This parameter is required
only when you are modifying an existing todo. If you are adding a
new todo this parameter will be ignored. If you are modifying an
todo without recurrence, you may set it to string "0".
title
- [REQUIRED] - The title of the ToDo. It must exists when creating
desc
- [OPTIONAL] - The description. If it is null, the ToDo will
have no description.
location
- [OPTIONAL] - The location of the ToDo. If it is null, the
ToDo will have no location.
status
- [SERVER] - The component status as indicated by the server.
rdates
- [OPTIONAL] - A Vector of RecurDate objects that indicates the
recurrence dates.
rrules
- [OPTIONAL] - A Vector of RecurRule objects that represents the
recurrence rules.
exdates
- [OPTIONAL] - A Vector of RecurDate objects that indicates the dates
to be excluded from recurrence.
exrules
- [OPTIONAL] - A Vector of RecurRule objects that represents the
rules for the time that are excluded from the recurrence.
alarm
- [OPTIONAL] - An Alarm object that represent the reminder trigger.
priority
- [OPTIONAL] - The priority of the ToDo,
It is an integer with value 0=lowest priority and
9=highest priority.
A negative value means the priority is not specified.
sequence
- [OPTIONAL] - The sequence number of the ToDo.
It is an integer with value starting from 0.
A negative value means the sequence is not specified.
percent
- [OPTIONAL] - The percent of the ToDo has been completed.
It is an integer with value from 0 to 100.
completed
- [OPTIONAL] - The Date object for completion time of the ToDo. This
field is the field to indicate whether a ToDo has
actually completed. Setting the "status" field to
CompStatus.COMPLETED is NOT sufficient for the Calendar
server to acknowledge the ToDo is completed.
removeCompleted
- [OPTIONAL] - A boolean flag to indicate if the todo is going to
remove any existing completion date.
isAllDay
- [REQUIRED] - A true value indicates this ToDo lasts all day.
start
- [REQUIRED] - The Date object for starting time of the ToDo.
In the new SunONE Calendar 6.0, the Calendar Express interface always
generates ToDos that have no start time. So, the check for null is
no longer applicable. Moreover, to the WCAP interface, the start
time is required only when creating the ToDo. It is an optional field
when you are modifying the ToDo.
due
- [OPTIONAL] - The Date object for ending time. This parameter is
required if and only if isAllDay parameter is false.
This parameter will be ignored if the todo will
last all day.duration
- [OPTIONAL] - The duration of the event.
InvalidParameterException
- At least one of the required parameter is missing, or an optional
parameter has invalid value.public ToDo(java.lang.String uid, java.lang.String rid, java.lang.String title, java.lang.String desc, java.lang.String location, CompStatus status, java.util.Vector rdates, java.util.Vector rrules, java.util.Vector exdates, java.util.Vector exrules, Alarm alarm, boolean isAllDay, java.util.Date start, java.util.Date due, Duration duration) throws InvalidParameterException
In the following parameter list, each parameter starts with a [] tag that indicates the nature of the parameter. The available tags are:
uid
- [SERVER] The unique id of the todo. This parameter is required only
when you are modifying an existing todo. If you are adding a new
todo, you should set this parameter to null and it will be ignored.
rid
- [SERVER] The recurrence id of the todo. This parameter is required
only when you are modifying an existing todo. If you are adding a
new todo this parameter will be ignored. If you are modifying an
todo without recurrence, you may set it to string "0".
title
- [REQUIRED] - The title of the ToDo. It must exists when creating
desc
- [OPTIONAL] - The description. If it is null, the ToDo will
have no description.
location
- [OPTIONAL] - The location of the ToDo. If it is null, the
ToDo will have no location.
status
- [SERVER] - The component status as indicated by the server.
rdates
- [OPTIONAL] - A Vector of RecurDate objects that indicates the
recurrence dates.
rrules
- [OPTIONAL] - A Vector of RecurRule objects that represents the
recurrence rules.
exdates
- [OPTIONAL] - A Vector of RecurDate objects that indicates the dates
to be excluded from recurrence.
exrules
- [OPTIONAL] - A Vector of RecurRule objects that represents the
rules for the time that are excluded from the recurrence.
alarm
- [OPTIONAL] - An Alarm object that represent the reminder trigger.
isAllDay
- [REQUIRED] - A true value indicates this ToDo lasts all day.
start
- [REQUIRED] - The Date object for starting time of the ToDo.
In the new SunONE Calendar 6.0, the Calendar Express interface always
generates ToDos that have no start time. So, the check for null is
no longer applicable. Moreover, to the WCAP interface, the start
time is required only when creating the ToDo. It is an optional field
when you are modifying the ToDo.
due
- [OPTIONAL] - The Date object for ending time. This parameter is
required if and only if isAllDay parameter is false.
This parameter will be ignored if the todo will
last all day.
InvalidParameterException
- At least one of the required parameter is missing, or an optional
parameter has invalid value.public ToDo(java.lang.String title, java.util.Date start) throws InvalidParameterException
InvalidParameterException
Method Detail |
---|
public int getPercent()
public void setPercent(int percent)
public boolean isCompleted()
public void markAsCompleted(java.util.Date completed)
If you don't want to make any changes to the completed status, you can pass a null object to this method.
public void markAsIncomplete()
public java.util.Date getCompletionDate()
This is the Date object that you set in with markAsCompleted.
public boolean getIsAllDay()
public java.util.Date getStartTime()
public java.util.Date getDueTime()
public Duration getDuration()
public void setTime(boolean isAllDay, java.util.Date start, java.util.Date due, Duration duration) throws InvalidParameterException
isAllDay
- boolean flag to indicate whether the ToDo is an all day todo.
If is set to true, both parameters "end" and "duration" will be
ignored.
start
- [REQUIRED] - The Date object for starting time of the ToDo.
In the new SunONE Calendar 6.0, the Calendar Express interface always
generates ToDos that have no start time. So, the check for null is
no longer applicable. Moreover, to the WCAP interface, the start
time is required only when creating the ToDo. It is an optional field
when you are modifying the ToDo.
due
- Date object to indicate the due date/time. A null value indicates
no due date/time is set. If not null, the parameter "duration" will
be ignored.
duration
- The Duration object that represents the length of the to do.
A null value indicates no duration value is set.
InvalidParameterException
- If the due time specified is before the start time.public java.lang.String toWcapQuery(WcapNugget nugget, java.text.DateFormat dfDay, java.text.DateFormat dfFull) throws InvalidParameterException, WcapException
toWcapQuery
in class Component
InvalidParameterException
WcapException
public boolean equals(java.lang.Object inObj)
equals
in class Component
public java.lang.String toString()
toString
in class Component
|
Nitido NiM 2.5 Java API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1999-2009 Nitido Inc. Proprietary and Confidential. All Rights Reserved.