Nitido Inc.

com.nitido.nimx.nuggets.wcap
Class RecurDate

java.lang.Object
  extended by com.nitido.nimx.nuggets.wcap.RecurDate

public class RecurDate
extends java.lang.Object

The data object for recurrence/exclusion date.

This data object contains mainly two pieces of information. The "dayOnly" field indicates whether the "date" field contains only a day's information or an exact time in GMT. A "dayOnly" value of true implies the "date" field only contains day information and the recurrence/exclusion will occur on the same time of the event/todo that creates the recurrence. Otherwise, the recurrence/exclusion will occur on the time specified by the "date" field.


Constructor Summary
RecurDate(boolean dayOnly, java.util.Date date)
          Default constructor.
 
Method Summary
static RecurDate convertFromString(java.lang.String dateStr, java.text.DateFormat dfDay, java.text.DateFormat dfFull)
          Convert a ISO 8601 date only string or an ISO 8601 Zulu date/time string into a RecurDate object.
 boolean equals(java.lang.Object inObj)
          Override the default java.lang.Object's equal command.
 java.util.Date getDate()
          Retrieves the date field.
 boolean getDayOnly()
          Retrieves the dayOnly field.
 void setDate(java.util.Date date)
          Sets the date field.
 void setDayOnly(boolean dayOnly)
          Sets the dayOnly field.
 java.lang.String toString()
          Display the object as a string.
 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
 

Constructor Detail

RecurDate

public RecurDate(boolean dayOnly,
                 java.util.Date date)
          throws InvalidParameterException
Default constructor.

Parameters:
dayOnly - Indicates whether the date parameter stores

date - The Date object that represent the date and/or time of the recurrence or exclusion.
Throws:
InvalidParameterException
Method Detail

setDayOnly

public void setDayOnly(boolean dayOnly)
Sets the dayOnly field.


getDayOnly

public boolean getDayOnly()
Retrieves the dayOnly field.


setDate

public void setDate(java.util.Date date)
             throws InvalidParameterException
Sets the date field. This field must be a valid Date object.

Throws:
InvalidParameterException

getDate

public java.util.Date getDate()
Retrieves the date field.


toWcapQuery

public java.lang.String toWcapQuery(WcapNugget nugget,
                                    java.text.DateFormat dfDay,
                                    java.text.DateFormat dfFull)
                             throws WcapException
Convert the component into a string that is used for constructing a WCAP query. This method is designed for internal use by the WcapNugget only. It will return a String that is ready to be incorporated into a WCAP query. the return string is an URLEncoded string of the recurrence/exclusion date.

Parameters:
dfDay - A DateFormat object that can format a Date object into ISO 8601 day string. i.e. yyyyMMdd (yyyy=year, MM=month, dd=day).

dfFull - A DateFormat object that can format a Date object into ISO 8601 Z string. i.e. yyyyMMddThhmmssZ (yyyy=year, MM=month, dd=day, hh=hour, mm=minute, ss=second, T and Z are the actual text to appear in the string).
Throws:
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

convertFromString

public static RecurDate convertFromString(java.lang.String dateStr,
                                          java.text.DateFormat dfDay,
                                          java.text.DateFormat dfFull)
Convert a ISO 8601 date only string or an ISO 8601 Zulu date/time string into a RecurDate object.

Parameters:
dateStr - The date string.

dfDay - A DateFormat object of ISO 8601 date only format. i.e. "yyyyMMdd". The invoker must ensure that dfDay is not used by other threads at the same time.

dfFull - A DateFormat object of ISO 8601 date only format. i.e. "yyyyMMdd'T'HHmmss'Z'". The invoker must ensure that dfFull is not used by other threads at the same time.

toString

public java.lang.String toString()
Display the object as a string. This method is mainly used for debugging.

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.