com.sun.webui.jsf.model
Class ScheduledEvent

java.lang.Object
  extended by com.sun.webui.jsf.model.ScheduledEvent
All Implemented Interfaces:
java.io.Serializable

public class ScheduledEvent
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Constructor Summary
ScheduledEvent()
           
 
Method Summary
 boolean equals(java.lang.Object object)
           
 java.util.Iterator getDates(java.util.Calendar untilDate)
          Returns an iterator of dates which mark the start of scheduled event.
 java.util.Iterator getDates(java.util.Calendar fromDate, java.util.Calendar untilDate)
           
 java.lang.Integer getDuration()
          Get the number of units (see DurationUnit) for the duration interval of the event.
 RepeatUnit getDurationUnit()
          Get the unit (hours, weeks, days, etc) for the duration interval of the event.
 java.util.Date getEndTime()
          The end time, as a java.util.Date
 RepeatInterval getRepeatInterval()
          Get the repeat frequency.
 java.util.Date getStartTime()
          Retrieves the start time, as a java.util.Date
 boolean isRepeatingEvent()
          If true, indicates that this is a repeating event
 void setDuration(java.lang.Integer duration)
          Set the number of units (see DurationUnit) for the duration interval of the event.
 void setDurationUnit(RepeatUnit durationUnit)
          Set the unit (hours, weeks, days, etc) for the duration interval of the event.
 void setEndTime(java.util.Date endTime)
          Setter for The end time, as a java.util.Date
 void setRepeatingEvent(boolean repeatingEvent)
          Invoke this method with the value true to indicate that the event is repeating, false if it is not repeating
 void setRepeatInterval(RepeatInterval frequency)
          Setter for the repeat frequency.
 void setStartTime(java.util.Date startTime)
          Sets the start time
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ScheduledEvent

public ScheduledEvent()
Method Detail

getStartTime

public java.util.Date getStartTime()
Retrieves the start time, as a java.util.Date

Returns:
The start time, as a java.util.Date

setStartTime

public void setStartTime(java.util.Date startTime)
Sets the start time

Parameters:
startTime - The start time, as a java.util.Date

getEndTime

public java.util.Date getEndTime()
The end time, as a java.util.Date

Returns:
The end time, as a java.util.Date

setEndTime

public void setEndTime(java.util.Date endTime)
Setter for The end time, as a java.util.Date

Parameters:
endTime - The end time, as a java.util.Date

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

isRepeatingEvent

public boolean isRepeatingEvent()
If true, indicates that this is a repeating event

Returns:
true it this is a repeating event, false otherwise

setRepeatingEvent

public void setRepeatingEvent(boolean repeatingEvent)
Invoke this method with the value true to indicate that the event is repeating, false if it is not repeating

Parameters:
repeatingEvent - whether the event is repeating

getRepeatInterval

public RepeatInterval getRepeatInterval()

Get the repeat frequency. The value must be the Integer value of a calendar field identifier (Calendar.HOUR_OF_DAY, etc). See java.util.Calendar for details.

To specify that the event repeats weekely...

Returns:
Value of property frequency.

setRepeatInterval

public void setRepeatInterval(RepeatInterval frequency)

Setter for the repeat frequency. The new value must be the Integer value of a calendar field identifier (Calendar.HOUR_OF_DAY, etc). See java.util.Calendar for details.

To specify that the event repeats weekly...

Parameters:
frequency - New value of property frequency.

getDurationUnit

public RepeatUnit getDurationUnit()

Get the unit (hours, weeks, days, etc) for the duration interval of the event. The value must be the Integer value of a calendar field identifier (Calendar.HOUR_OF_DAY, etc). See java.util.Calendar for details.

To specify that the event repeats for three months...

Returns:
Value of property durationUnit.

setDurationUnit

public void setDurationUnit(RepeatUnit durationUnit)

Set the unit (hours, weeks, days, etc) for the duration interval of the event. The value must be the Integer value of a calendar field identifier (Calendar.HOUR_OF_DAY, etc). See java.util.Calendar for details.

To specify that the event repeats for three months...

Parameters:
durationUnit - New value of property durationUnit.

getDuration

public java.lang.Integer getDuration()

Get the number of units (see DurationUnit) for the duration interval of the event. The value must be the Integer value of a calendar field identifier (Calendar.HOUR_OF_DAY, etc). See java.util.Calendar for details.

To specify that the event repeats for three months...

Returns:
Value of property duration.

setDuration

public void setDuration(java.lang.Integer duration)

Set the number of units (see DurationUnit) for the duration interval of the event. The value must be the Integer value of a calendar field identifier (Calendar.HOUR_OF_DAY, etc). See java.util.Calendar for details.

To specify that the event repeats weekely...

Parameters:
duration - New value of property duration.

equals

public boolean equals(java.lang.Object object)
Overrides:
equals in class java.lang.Object

getDates

public java.util.Iterator getDates(java.util.Calendar untilDate)
Returns an iterator of dates which mark the start of scheduled event. If no time has been set, an empty iterator is returned. If a time has been set and the event is not repeating, an iterator with a single date corresponding to the start time is returned provided it is before the date specified in untilDate. If the event is repeating, all start times before untilDate are returned.

Returns:
a java.util.Iterator whose items are java.util.Calendar

getDates

public java.util.Iterator getDates(java.util.Calendar fromDate,
                                   java.util.Calendar untilDate)


Copyright © 2008 Sun Microsystems, Inc. All Rights Reserved.