ERPublishCalendarPage Class Reference

Inherits com::webobjects::appserver::WOComponent.

Collaboration diagram for ERPublishCalendarPage:

Collaboration graph
[legend]

List of all members.

Public Member Functions

void addEvent (ERCalendarEvent event)
void addEventsFromArray (NSArray eventsArray)
void appendToResponse (WOResponse aResponse, WOContext aContext)
String calendarName ()
String calendarTimeZone ()
NSTimestampFormatter dateFormatter ()
NSTimestampFormatter dateTimeFormatter ()
 ERPublishCalendarPage (WOContext context)
String escapedCalendarName ()
String escapedCalendarTimeZone ()
String escapedEventStatus ()
String escapedEventSummary ()
String escapedEventUniqueId ()
String eventRepeatDayOfWeekString ()
String eventRepeatDaysOfMonthString ()
String eventRepeatFrequency ()
Number eventRepeatMonth ()
NSMutableArray events ()
NSTimestamp eventTimestamp ()
void removeEvent (ERCalendarEvent event)
void removeEventsInArray (NSArray eventsArray)
void setCalendarName (String value)
void setCalendarTimeZone (String value)
NSTimestampFormatter timeZoneFormatter ()
NSTimestampFormatter utcDateTimeFormatter ()

Public Attributes

ERCalendarEvent event

Static Public Attributes

static String newline = System.getProperty("line.separator")

Protected Member Functions

String escapedString (String string)
String foldLongLinesInString (String content)

Protected Attributes

String calendarName
String calendarTimeZone
NSTimestampFormatter dateFormatter
NSTimestampFormatter dateTimeFormatter
NSMutableArray events
NSTimestamp eventTimestamp
final int maxLineLength = 75
NSTimestampFormatter timeZoneFormatter
NSTimestampFormatter utcDateTimeFormatter


Detailed Description

ERPublishCalendarPage is a WebObjects component for dynamically generated iCalendar documents.

The response created by ERPublishCalendarPage is an iCalendar document (.ics) containing the events added to ERPublishCalendarPage by the application (see addEvent). An iCalendar-aware application, such as Apple's iCal, can subscribe to such a calendar, provided that the page has a fixed URL (either is the "Main" page, or a direct action serves the page).

Events added to a ERPublishCalendarPage is objects of any class that implements the ERCalendarEvent interface. Existing classes (for example EOCustomObject subclasses), that correspond to calendar events, can easily be modified to implement ERCalendarEvent and thus be added directly to ERPublishCalendarPage. If existing classes does not directly correspond to calendar events, create events from business data (or some algorithm) using either the included ERSimpleEvent class, a subclass of ERSimpleEvent, or any other class implementing the ERCalendarEvent interface.

Author:
Johan Carlberg <johan@oops.se>
Version:
1.0, 2002-09-30

Constructor & Destructor Documentation

ERPublishCalendarPage ( WOContext  context  ) 

Standard constructor for WOComponent subclasses.

Parameters:
context context of a transaction
See also:
WOComponent.pageWithName(String)

WOApplication.pageWithName(String, WOContext)


Member Function Documentation

void addEvent ( ERCalendarEvent  event  ) 

Adds an event to the calendar.

Parameters:
event the event to be included in the calendar
See also:
ERCalendarEvent

addEventsFromArray(NSArray)

void addEventsFromArray ( NSArray  eventsArray  ) 

Adds an array of events to the calendar.

Parameters:
eventsArray the events to be included in the calendar
See also:
ERCalendarEvent

addEvent(ERCalendarEvent)

void appendToResponse ( WOResponse  aResponse,
WOContext  aContext 
)

Modifies content encoding to UTF8, and content type to text/calendar.

Parameters:
aResponse the HTTP response that an application returns to a Web server to complete a cycle of the request-response loop
aContext context of a transaction

Returns:
name of the calendar
See also:
setCalendarName(String)

Returns:
originating time zone for the calendar (name of the system default time zone, if not changed by setCalendarTimeZone
See also:
setCalendarTimeZone(String)

NSTimestampFormatter dateFormatter (  ) 

Returns:
formatter for dates. Will format dates as "20021003", specified in the local time zone.

NSTimestampFormatter dateTimeFormatter (  ) 

Returns:
formatter for date/time. Will format date/times as "20021003T191234", specified in the local time zone.

String escapedCalendarName (  ) 

Returns:
name of the calendar, backslash escaped for inclusion in iCalendar document.
See also:
calendarName

String escapedCalendarTimeZone (  ) 

Returns:
time zone name of the calendar, backslash escaped for inclusion in iCalendar document.
See also:
calendarTimeZone

String escapedEventStatus (  ) 

Returns:
status of the current event, backslash escaped for inclusion in iCalendar document.
See also:
ERCalendarEvent.status

String escapedEventSummary (  ) 

Returns:
summary of the current event, backslash escaped for inclusion in iCalendar document.
See also:
ERCalendarEvent.summary

String escapedEventUniqueId (  ) 

Returns:
unique id of the current event, backslash escaped for inclusion in iCalendar document.
See also:
ERCalendarEvent.uniqueId

String escapedString ( String  string  )  [protected]

Returns:
backslash escaped text string, with special characters replaced with its backslash escaped equivalent.

String eventRepeatDayOfWeekString (  ) 

Returns:
day of week of a repeating event for use in the "BYDAY" parameter.

String eventRepeatDaysOfMonthString (  ) 

Returns:
days of month of a repeating event for use in the "BYMONTHDAY" parameter.

String eventRepeatFrequency (  ) 

Returns:
the recurring rule frequency, as one of "YEARLY", "MONTHLY", "WEEKLY", "DAILY", "HOURLY", "MINUTELY", "SECONDLY" depending on the value returned by repeatFrequency.
See also:
ERCalendarEvent.repeatFrequency

Number eventRepeatMonth (  ) 

Returns:
month number of a repeating event for use in the "BYMONTH" parameter.

NSTimestamp eventTimestamp (  ) 

Returns:
timestamp of the current event. This will always be the current time, as this is the time the event is converted to an iCalendar event.

String foldLongLinesInString ( String  content  )  [protected]

Folds lines that are longer than the maximum allowed 75 characters.

Parameters:
content unfolded iCalendar content
Returns:
folded content, with no line longer than 75 characters

void removeEvent ( ERCalendarEvent  event  ) 

Removes a previously added event from the calendar.

Parameters:
event the event to be removed from the calendar
See also:
ERCalendarEvent

removeEventsInArray(NSArray)

void removeEventsInArray ( NSArray  eventsArray  ) 

Removes an array of previously added events from the calendar.

Parameters:
eventsArray the events to be removed from the calendar
See also:
ERCalendarEvent

removeEvent(ERCalendarEvent)

void setCalendarName ( String  value  ) 

Sets the name of the calendar.

Parameters:
value name of the calendar
See also:
calendarName

void setCalendarTimeZone ( String  value  ) 

Sets the name of the time zone for the calendar.

Parameters:
value name of the time zone
See also:
calendarTimeZone

NSTimestampFormatter timeZoneFormatter (  ) 

Returns:
formatter for time zone. Will format date/times as only the name of the local time zone.

NSTimestampFormatter utcDateTimeFormatter (  ) 

Returns:
formatter for date/time stamps. Will format date/times as "20021003T171234Z", specified in UTC (GMT).


Member Data Documentation

String calendarName [protected]

String calendarTimeZone [protected]

NSTimestampFormatter dateFormatter [protected]

NSTimestampFormatter dateTimeFormatter [protected]

NSMutableArray events [protected]

NSTimestamp eventTimestamp [protected]

final int maxLineLength = 75 [protected]

String newline = System.getProperty("line.separator") [static]

NSTimestampFormatter timeZoneFormatter [protected]

NSTimestampFormatter utcDateTimeFormatter [protected]


The documentation for this class was generated from the following file:

Generated on Sat May 26 06:42:45 2012 for Project Wonder by  doxygen 1.5.8