|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.nitido.nimx.nuggets.wcap.Alarm
public class Alarm
The Alarm object encapsulate the information for a reminder alarm. The current implementation supports the reminder notification through email only. As a result, the Alarm object contains only two fields: time and email.
The iPlanet Calendar's implementation of Alarm component (i.e. reminder) follows the framework of RFC 2445. The section 4.6.6 and 4.8.6 of RFC 2445 contains more information on the Alarm component.
This object is used by Event or ToDo ojbects for indicating the reminder information.
The JavaDoc description of the default constructor contains more information of the fields.
Field Summary | |
---|---|
static Alarm |
NO_ALARM
This object is used for removing the alarm notificaiton from an existing event/todo. |
Constructor Summary | |
---|---|
Alarm(java.util.Date time,
Duration duration,
java.util.Vector emails)
Duration based constructor. |
|
Alarm(java.util.Date time,
java.util.Vector emails)
Time based constructor. |
|
Alarm(Duration duration,
java.util.Vector emails)
Duration based constructor. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object inObj)
Override the default java.lang.Object's equal command. |
Duration |
getDuration()
Get the duration field. |
java.util.Vector |
getEmails()
Get the emails field. |
java.util.Date |
getTime()
Get the time field. |
void |
setDuration(Duration duration)
Set the duration field. |
void |
setEmails(java.util.Vector emails)
Set the emails field. |
void |
setTime(java.util.Date time)
Set the time field. |
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 dfFull)
Convert the component into a string that is used for constructing a WCAP query. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Alarm NO_ALARM
In WCAP, if we don't specify a value, the server will regard it as no change. Therefore, there is no way to remove an alarm.
Therefore, we have a special instance of NO_ALARM, that can be used to turn off the alarm signals. This special instance of Alarm will tell the server to do an "alarm pop up" in 1970. (i.e. set it to an alarm that will never happens).
Constructor Detail |
---|
public Alarm(java.util.Date time, java.util.Vector emails) throws InvalidParameterException
If you don't have any values for emails field, you should not create an Alarm object at all. You just don't have any valid reminder alarm. You may simply set the alarm field of your Event or ToDo to be null object to indicate there is no alarm setting.
If you don't have any valid value for the time field, but you have the duration value, you should use the duration based constructor instead of this constructor.
time
- The GMT date-time for the reminder alarm to be triggered.
Note: although it is supposed to be earlier than the actual occurrence
of the event/todo, the server never check that. The application should
check for this error itself.
emails
- A Vector of String that contains the Strings of the email addresses
to be notified when the reminder triggers. This Vector must contains
at least one email. (Note: if you don't have any email address, you
shouldn't create an Alarm object at all. You may just pass "null" to
the corresponding field of Event and ToDo)
InvalidParameterException
public Alarm(Duration duration, java.util.Vector emails) throws InvalidParameterException
If you don't have any values for emails field, you should not create an Alarm object at all. You just don't have any valid reminder alarm. You may simply set the alarm field of your Event or ToDo to be null object to indicate there is no alarm setting.
If you don't have any valid value for the duration field, but you have the time value, you should use the time based constructor instead of this constructor.
duration
- The Duration object that specify when to send the alarm in the
format of the time before the event/todo happens.
Please note that this duration is referencing the start time of the corresponding event or todo. If you want to trigger the alarm before the event or todo happens, this Duration object's isPositive boolean flag MUST be set to "false". Otherwise, your alarm triger will happen after the event or todo has happened.
emails
- A Vector of String that contains the Strings of the email addresses
to be notified when the reminder triggers. This Vector must contains
at least one email. (Note: if you don't have any email address, you
shouldn't create an Alarm object at all. You may just pass "null" to
the corresponding field of Event and ToDo)
InvalidParameterException
public Alarm(java.util.Date time, Duration duration, java.util.Vector emails) throws InvalidParameterException
If you don't have any values for emails field, you should not create an Alarm object at all. You just don't have any valid reminder alarm. You may simply set the alarm field of your Event or ToDo to be null object to indicate there is no alarm setting.
The time and duration parameters cannot be null at the same time. One of them must be valid. If both parameters are not null objects, the time parameter will be used while the duration parameter will be ignored.
time
- The GMT date-time for the reminder alarm to be triggered.
Note: although it is supposed to be earlier than the actual occurrence
of the event/todo, the server never check that. The application should
check for this error itself.duration
- The Duration object that specify when to send the alarm in the
format of the time before the event/todo happens.
Please note that this duration is referencing the start time of the corresponding event or todo. If you want to trigger the alarm before the event or todo happens, this Duration object's isPositive boolean flag MUST be set to "false". Otherwise, your alarm triger will happen after the event or todo has happened.
emails
- A Vector of String that contains the Strings of the email addresses
to be notified when the reminder triggers. This Vector must contains
at least one email. (Note: if you don't have any email address, you
shouldn't create an Alarm object at all. You may just pass "null" to
the corresponding field of Event and ToDo)
InvalidParameterException
Method Detail |
---|
public void setTime(java.util.Date time) throws InvalidParameterException
time
- The GMT date-time for the reminder alarm to be triggered.
Note: although it is supposed to be earlier than the actual occurrence
of the event/todo, the server never check that. The application should
check for this error itself.
InvalidParameterException
public java.util.Date getTime()
public void setDuration(Duration duration) throws InvalidParameterException
duration
- The Duration object that specify when to send the alarm in the
format of the time before the event/todo happens.
Please note that this duration is referencing the start time of the corresponding event or todo. If you want to trigger the alarm before the event or todo happens, this Duration object's isPositive boolean flag MUST be set to "false". Otherwise, your alarm triger will happen after the event or todo has happened.
InvalidParameterException
public Duration getDuration()
public void setEmails(java.util.Vector emails) throws InvalidParameterException
emails
- A Vector of String that contains the Strings of the email addresses
to be notified when the reminder triggers. This Vector must contains
at least one email. (Note: if you don't have any email address, you
shouldn't create an Alarm object at all. You may just pass "null" to
the corresponding field of Event and ToDo)
InvalidParameterException
public java.util.Vector getEmails()
public java.lang.String toWcapQuery(WcapNugget nugget, java.text.DateFormat dfFull) throws WcapException
WcapException
public boolean equals(java.lang.Object inObj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
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.