Nitido Inc.

com.nitido.nimx.nuggets.wcap
Class Component

java.lang.Object
  extended by com.nitido.nimx.nuggets.wcap.Component
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
Event, ToDo

public abstract class Component
extends java.lang.Object
implements java.io.Serializable

The parent class of Event and ToDo. This abstract class composed of the basic information common to both Event and ToDo. For more details of the meaning of each field, please refer to the JavaDoc of the default constructors for Event and ToDo.

(Note: although RFC 2445 indicates a component can be event, todo AND journal, this package only implements Event and ToDo only. It is because iCS doesn't support the idea of Journal yet.)

See Also:
Serialized Form

Field Summary
protected  Alarm _alarm
           
protected  java.util.Date _created
           
protected  java.lang.String _desc
           
protected  java.util.Vector _exdates
           
protected  java.util.Vector _exrules
           
protected  java.util.Date _lastMod
           
protected  java.lang.String _location
           
protected  int _priority
           
protected  java.util.Vector _rdates
           
protected  java.lang.String _rid
           
protected  java.util.Vector _rrules
           
protected  int _sequence
           
protected  CompStatus _status
           
protected  java.lang.String _timeZoneId
           
protected  java.lang.String _title
           
protected  java.lang.String _uid
           
 
Constructor Summary
Component(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, java.util.Date created, java.util.Date lastMod, java.lang.String timeZoneId)
          Default constructor.
 
Method Summary
 boolean equals(java.lang.Object inObj)
          Override the default java.lang.Object's equal command.
 Alarm getAlarm()
          Get the alarm field.
 java.util.Date getCreatedDate()
          Get the Date object that represents the component's creation time.
 java.lang.String getDescription()
          Get the description.
 java.util.Vector getExclusionDates()
          Get the exclusion dates.
 java.util.Vector getExclusionRules()
          Get the exclusion rules.
 java.util.Date getLastModDate()
          Get the Date object that represents the component's last modified time.
 java.lang.String getLocation()
          Get the location.
 int getPriority()
          Get the priority.
 java.util.Vector getRecurrenceDates()
          Get the recurrence dates.
 java.util.Vector getRecurrenceRules()
          Get the recurrence rules.
 java.lang.String getRid()
          Get the recurrence id.
 int getSequence()
          Get the sequence number.
 CompStatus getStatus()
          Get the status of the Event/ToDo.
 java.lang.String getTimeZoneId()
          Get the time zone ID string that will be used in the notification email.
 java.lang.String getTitle()
          Get the title.
 java.lang.String getUid()
          Get the unique id.
 boolean hasRecurRule()
          A convenience method to check if the component "REALLY" has a recurrence rule.
 void setAlarm(Alarm alarm)
          Set the alarm field.
 void setCreatedDate(java.util.Date created)
          Set the Date object that represents the component's creation time.
 void setDescription(java.lang.String desc)
          Set the description.
 void setExclusionDates(java.util.Vector exdates)
          Set the exclusion dates.
 void setExclusionRules(java.util.Vector exrules)
          Set the exclusion rules.
 void setLastModDate(java.util.Date lastMod)
          Set the Date object that represents the component's last modified time.
 void setLocation(java.lang.String location)
          Set the location.
 void setPriority(int priority)
          Set the priority.
 void setRecurrenceDates(java.util.Vector rdates)
          Set the recurrence rules.
 void setRecurrenceRules(java.util.Vector rrules)
          Set the recurrence rules.
 void setRid(java.lang.String rid)
          Set the recurrence id.
 void setSequence(int sequence)
          Set the sequence number.
 void setStatus(CompStatus status)
          Set the status of the Event/ToDo.
 void setTimeZoneId(java.lang.String timeZoneId)
          Set the time zone ID string that will be used in the notification email.
 void setTitle(java.lang.String title)
          Set the title.
 void setUid(java.lang.String uid)
          Get the unique id.
 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 java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_uid

protected java.lang.String _uid

_rid

protected java.lang.String _rid

_title

protected java.lang.String _title

_desc

protected java.lang.String _desc

_location

protected java.lang.String _location

_status

protected CompStatus _status

_rdates

protected java.util.Vector _rdates

_rrules

protected java.util.Vector _rrules

_exdates

protected java.util.Vector _exdates

_exrules

protected java.util.Vector _exrules

_alarm

protected Alarm _alarm

_priority

protected int _priority

_sequence

protected int _sequence

_created

protected java.util.Date _created

_lastMod

protected java.util.Date _lastMod

_timeZoneId

protected java.lang.String _timeZoneId
Constructor Detail

Component

public Component(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,
                 java.util.Date created,
                 java.util.Date lastMod,
                 java.lang.String timeZoneId)
Default constructor. You should refer to the implementor for the detail information on the parameters.

See Also:
ToDo, Event
Method Detail

getUid

public java.lang.String getUid()
Get the unique id. If it is a new Event/ToDo, this field would be null. A non-null UID implies that it is an existing Event/ToDo.


setUid

public void setUid(java.lang.String uid)
Get the unique id. If it is a new Event/ToDo, this field would be null. A non-null UID implies that it is an existing Event/ToDo.


getRid

public java.lang.String getRid()
Get the recurrence id.

A new Event/ToDo does not have any rid created, and thus, one can leave this field null. However, once it's created, you should get the rid from the server as you fetch the Event/ToDo. According to iCS Programmer's Reference, the rid will be "0" for all Events/ToDos that donot have recurring instances. Otherwise, it would be the same string as the ISO8601 Zulu timestamp of the instance of Event/ToDo.


setRid

public void setRid(java.lang.String rid)
Set the recurrence id.

A new Event/ToDo does not have any rid created, and thus, one can leave this field null. However, once it's created, you should get the rid from the server as you fetch the Event/ToDo. According to iCS Programmer's Reference, the rid will be "0" for all Events/ToDos that donot have recurring instances. Otherwise, it would be the same string as the ISO8601 Zulu timestamp of the instance of Event/ToDo.


getTitle

public java.lang.String getTitle()
Get the title. This is also known as the summary of the Event/Todo.


setTitle

public void setTitle(java.lang.String title)
Set the title. This is also known as the summary of the Event/ToDo.


getDescription

public java.lang.String getDescription()
Get the description.


setDescription

public void setDescription(java.lang.String desc)
Set the description.


getLocation

public java.lang.String getLocation()
Get the location.


setLocation

public void setLocation(java.lang.String location)
Set the location.


getStatus

public CompStatus getStatus()
Get the status of the Event/ToDo.


setStatus

public void setStatus(CompStatus status)
Set the status of the Event/ToDo.


getRecurrenceDates

public java.util.Vector getRecurrenceDates()
Get the recurrence dates.


setRecurrenceDates

public void setRecurrenceDates(java.util.Vector rdates)
Set the recurrence rules.


getRecurrenceRules

public java.util.Vector getRecurrenceRules()
Get the recurrence rules.


setRecurrenceRules

public void setRecurrenceRules(java.util.Vector rrules)
Set the recurrence rules.


getExclusionDates

public java.util.Vector getExclusionDates()
Get the exclusion dates.


setExclusionDates

public void setExclusionDates(java.util.Vector exdates)
Set the exclusion dates.


getExclusionRules

public java.util.Vector getExclusionRules()
Get the exclusion rules.


setExclusionRules

public void setExclusionRules(java.util.Vector exrules)
Set the exclusion rules.


getAlarm

public Alarm getAlarm()
Get the alarm field.


setAlarm

public void setAlarm(Alarm alarm)
Set the alarm field.


getPriority

public int getPriority()
Get the priority.

The priority value is an integer from 0 to 9, where 0 is the lowest priority and 9 is the highest priority. A negative value means this value has not been specified yet.


setPriority

public void setPriority(int priority)
Set the priority.

The priority value is an integer from 0 to 9, where 0 is the lowest priority and 9 is the highest priority. A negative value means this value has not been specified.


getSequence

public int getSequence()
Get the sequence number.

The sequence number is an integer value. A negative value means this value has not been specified.


setSequence

public void setSequence(int sequence)
Set the sequence number.

The sequence number is an integer value. A negative value means this value has not been specified.


getCreatedDate

public java.util.Date getCreatedDate()
Get the Date object that represents the component's creation time.

This is a standard Date object.


setCreatedDate

public void setCreatedDate(java.util.Date created)
Set the Date object that represents the component's creation time.

The sequence number is an integer value. A negative value means this value has not been specified.


getLastModDate

public java.util.Date getLastModDate()
Get the Date object that represents the component's last modified time.

This is a standard Date object.


setLastModDate

public void setLastModDate(java.util.Date lastMod)
Set the Date object that represents the component's last modified time.

The sequence number is an integer value. A negative value means this value has not been specified.


getTimeZoneId

public java.lang.String getTimeZoneId()
Get the time zone ID string that will be used in the notification email.

This is a string object in the format of America/New_York, Europe/London


setTimeZoneId

public void setTimeZoneId(java.lang.String timeZoneId)
Set the time zone ID string that will be used in the notification email.

This is a string object in the format of America/New_York, Europe/London


hasRecurRule

public boolean hasRecurRule()
A convenience method to check if the component "REALLY" has a recurrence rule.

A component is regarded as having recurrence if:

  1. It has at least one recurrence rule, AND,
  2. At least one of the defined recurrence rule has a count greater than 1.

Returns:
true only if both of the mentioned conditions are satisfied.

toWcapQuery

public java.lang.String toWcapQuery(WcapNugget nugget,
                                    java.text.DateFormat dfDay,
                                    java.text.DateFormat dfFull)
                             throws InvalidParameterException,
                                    WcapException
Convert the component into a string that is used for constructing a WCAP query. This method is mainly for internal use by the Nugget only.

Throws:
InvalidParameterException
WcapException

equals

public boolean equals(java.lang.Object inObj)
Override the default java.lang.Object's equal command. This will compares the content of the fields. In case of a vector or array field, it will compare the content of the field.

Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Returns a meaningful message with respect to the content of the object. This is mainly used for debugging purpose.

Overrides:
toString in class java.lang.Object

Nitido NiM 2.5 Java API

These JavaDoc pages are generated for release/nim_2_5-2.5.44

Copyright © 1999-2009 Nitido Inc.    Proprietary and Confidential.    All Rights Reserved.