Project Wonder 5.0

er.calendar
Class ERSimpleEvent

java.lang.Object
  extended by er.calendar.ERSimpleEvent
All Implemented Interfaces:
ERCalendarEvent

public class ERSimpleEvent
extends java.lang.Object
implements ERCalendarEvent

ERSimpleEvent is an simple implementation of an event class, implementing the ERCalendarEvent interface, for use by the ERPublishCalendarPage component.

ERSimpleEvent objects can be created corresponding to your events and added to ERPublishCalendarPage to create a calendar.

Subclass ERSimpleEvent if more advanced features are needed.

Version:
1.0, 2002-09-30
Author:
Johan Carlberg

Field Summary
protected  com.webobjects.foundation.NSTimestamp endTime
           
protected  com.webobjects.foundation.NSTimestamp startTime
           
protected  java.lang.String status
           
protected  java.lang.String summary
           
protected  java.lang.String uniqueId
           
protected  boolean wholeDay
           
 
Constructor Summary
ERSimpleEvent(com.webobjects.foundation.NSTimestamp aStartTime, com.webobjects.foundation.NSTimestamp anEndTime, java.lang.String aSummary, java.lang.String aUniqueId)
           
 
Method Summary
 com.webobjects.foundation.NSTimestamp endTime()
          Return the end time of this event.
 int repeatCount()
          Return the number of occurences of a repeating event.
 int repeatDayOfWeek()
          Return the day of week of a repeating event, or 0 for unspecified day of week.
 int repeatDayOfWeekInMonth()
          Return the ordinal number of day of the week within a month at which the event repeats.
 com.webobjects.foundation.NSArray repeatDaysOfMonth()
          Return an array of Integer indicating the days within a month, at which the event repeats, or null for not restricting repeating to certain days.
 int repeatFrequency()
          Return the frequency of a repeating event, or 0 for a one time event.
 int sequence()
          Return the change counter of this event.
 com.webobjects.foundation.NSTimestamp startTime()
          Return the start time of this event.
 java.lang.String status()
          Return the status of this event.
 java.lang.String summary()
          Return a summary or textual description of this event.
 java.lang.String uniqueId()
          Return a persistent, globally unique identifier for this event.
 boolean wholeDay()
          Return false if this event have specified start and ending times.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

endTime

protected com.webobjects.foundation.NSTimestamp endTime

startTime

protected com.webobjects.foundation.NSTimestamp startTime

status

protected java.lang.String status

summary

protected java.lang.String summary

uniqueId

protected java.lang.String uniqueId

wholeDay

protected boolean wholeDay
Constructor Detail

ERSimpleEvent

public ERSimpleEvent(com.webobjects.foundation.NSTimestamp aStartTime,
                     com.webobjects.foundation.NSTimestamp anEndTime,
                     java.lang.String aSummary,
                     java.lang.String aUniqueId)
Parameters:
aStartTime - start time of this event
anEndTime - end time of this event
aSummary - summary or textual description of this event
aUniqueId - a persistent, globally unique identifier for this event
See Also:
ERCalendarEvent#startTime, ERCalendarEvent#endTime, ERCalendarEvent#summary, ERCalendarEvent#uniqueId
Method Detail

wholeDay

public boolean wholeDay()
Description copied from interface: ERCalendarEvent
Return false if this event have specified start and ending times. true if this event is a whole-day event without a specific starting and ending hour and minute.

Specified by:
wholeDay in interface ERCalendarEvent
Returns:
always returns false. ERSimpleEvent doesn't support whole-day events.
See Also:
ERCalendarEvent#wholeDay

startTime

public com.webobjects.foundation.NSTimestamp startTime()
Description copied from interface: ERCalendarEvent
Return the start time of this event. For whole-day events, the time part of the NSTimestamp is ignored.

Specified by:
startTime in interface ERCalendarEvent
Returns:
the start time of this event as specified in the constructor
See Also:
ERCalendarEvent#startTime

endTime

public com.webobjects.foundation.NSTimestamp endTime()
Description copied from interface: ERCalendarEvent
Return the end time of this event. For whole-day events, this should be a time on the day following the last day of this event (the time part of the NSTimestamp is ignored, and the iCalendar standard requires that the end time of an event is later than the start time.

Specified by:
endTime in interface ERCalendarEvent
Returns:
the end time of this event as specified in the constructor
See Also:
ERCalendarEvent#endTime

sequence

public int sequence()
Description copied from interface: ERCalendarEvent
Return the change counter of this event. The sequence of a calendar event is supposed to increase every time any information in the event is modified, so that updates to events can be ordered.

Specified by:
sequence in interface ERCalendarEvent
Returns:
the change counter of this event. Computed from the current time, and will increase every ten seconds.
See Also:
ERCalendarEvent#sequence

status

public java.lang.String status()
Description copied from interface: ERCalendarEvent
Return the status of this event. Values defined by the iCalendar standard are: "TENTATIVE", "CONFIRMED", "CANCELLED". Return null if event status is unspecified.

Specified by:
status in interface ERCalendarEvent
Returns:
null since ERSimpleEvent doesn't support event status.
See Also:
ERCalendarEvent#status

summary

public java.lang.String summary()
Description copied from interface: ERCalendarEvent
Return a summary or textual description of this event.

Specified by:
summary in interface ERCalendarEvent
Returns:
the summary of this event as specified in the constructor
See Also:
ERCalendarEvent#summary

uniqueId

public java.lang.String uniqueId()
Description copied from interface: ERCalendarEvent
Return a persistent, globally unique identifier for this event. The unique identifier must be a globally unique identifier. The generator of the identifier must guarantee that the identifier is unique. There are several algorithms that can be used to accomplish this. The identifier is recommended to be the identical syntax to the RFC 822 addr-spec. A good method to assure uniqueness is to put the domain name or a domain literal IP address of the host on which the identifier was created on the right hand side of the "@", and on the left hand side, put a combination of the current calendar date and time of day (that is, formatted in as a date-time value) along with some other currently unique (perhaps sequential) identifier available on the system (for example, a process id number). Using a date/time value on the left hand side and a domain name or domain literal on the right hand side makes it possible to guarantee uniqueness since no two hosts should be using the same domain name or IP address at the same time. Though other algorithms will work, it is recommended that the right hand side contain some domain identifier (either of the host itself or otherwise) such that the generator of the message identifier can guarantee the uniqueness of the left hand side within the scope of that domain.

Specified by:
uniqueId in interface ERCalendarEvent
Returns:
the unique id of this event as specified in the constructor
See Also:
ERCalendarEvent#uniqueId

repeatFrequency

public int repeatFrequency()
Description copied from interface: ERCalendarEvent
Return the frequency of a repeating event, or 0 for a one time event. Can be specified as one of the java.util.Calendar field numbers YEAR, MONTH, WEEK_OF_YEAR, DAY_OF_MONTH, HOUR_OF_DAY, MINUTE or SECOND.

Specified by:
repeatFrequency in interface ERCalendarEvent
Returns:
0 indicating a non-repeating event. ERSimpleEvent doesn't support repeating events.
See Also:
ERCalendarEvent.repeatCount()

repeatCount

public int repeatCount()
Description copied from interface: ERCalendarEvent
Return the number of occurences of a repeating event. Ignored if ERCalendarEvent.repeatFrequency() returns 0.

Specified by:
repeatCount in interface ERCalendarEvent
Returns:
1 indicating a one-time event (although this method is never called since repeatFrequency() always return 0).
See Also:
repeatFrequency()

repeatDayOfWeek

public int repeatDayOfWeek()
Description copied from interface: ERCalendarEvent
Return the day of week of a repeating event, or 0 for unspecified day of week. Can be specified as one of the java.util.Calendar DAY_OF_WEEK field values SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY or as the value 0. Ignored if ERCalendarEvent.repeatFrequency() returns 0.

Specified by:
repeatDayOfWeek in interface ERCalendarEvent
Returns:
0 indicating unspecified day of week (although this method is never called since repeatFrequency() always returns 0).
See Also:
repeatFrequency()

repeatDayOfWeekInMonth

public int repeatDayOfWeekInMonth()
Description copied from interface: ERCalendarEvent
Return the ordinal number of day of the week within a month at which the event repeats. Together with ERCalendarEvent.repeatDayOfWeek() it uniquely specifies a day within the month. Ignored if ERCalendarEvent.repeatFrequency() returns 0.

Specified by:
repeatDayOfWeekInMonth in interface ERCalendarEvent
Returns:
0 indicating unspecified day of week in month (although this method is never called since repeatFrequency() always returns 0).
See Also:
repeatFrequency()

repeatDaysOfMonth

public com.webobjects.foundation.NSArray repeatDaysOfMonth()
Description copied from interface: ERCalendarEvent
Return an array of Integer indicating the days within a month, at which the event repeats, or null for not restricting repeating to certain days. Together with ERCalendarEvent.repeatDayOfWeek() it uniquely specifies a day within the month (Keep in mind that iCal 1.0 does not properly handle this). Ignored if ERCalendarEvent.repeatFrequency() returns 0.

Specified by:
repeatDaysOfMonth in interface ERCalendarEvent
Returns:
null indicating unspecified days within a month (although this method is never called since repeatFrequency() always returns 0.
See Also:
repeatFrequency()

Last updated: Tue, Feb 21, 2017 • 05:45 PM CET

Copyright © 2002 – 2007 Project Wonder.