public class ERPublishCalendarPage
extends com.webobjects.appserver.WOComponent
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
.
com.webobjects.appserver.WOComponent._EventLoggingEnabler, com.webobjects.appserver.WOComponent.Event
com.webobjects.foundation.NSKeyValueCodingAdditions.DefaultImplementation, com.webobjects.foundation.NSKeyValueCodingAdditions.Utility
com.webobjects.foundation.NSKeyValueCoding._BooleanFieldBinding, com.webobjects.foundation.NSKeyValueCoding._BooleanMethodBinding, com.webobjects.foundation.NSKeyValueCoding._FieldBinding, com.webobjects.foundation.NSKeyValueCoding._ForwardingBinding, com.webobjects.foundation.NSKeyValueCoding._KeyBinding, com.webobjects.foundation.NSKeyValueCoding._KeyBindingCreation, com.webobjects.foundation.NSKeyValueCoding._MethodBinding, com.webobjects.foundation.NSKeyValueCoding._NumberFieldBinding, com.webobjects.foundation.NSKeyValueCoding._NumberMethodBinding, com.webobjects.foundation.NSKeyValueCoding._ReflectionKeyBindingCreation, com.webobjects.foundation.NSKeyValueCoding.ErrorHandling, com.webobjects.foundation.NSKeyValueCoding.MapImplementation, com.webobjects.foundation.NSKeyValueCoding.Null<T>, com.webobjects.foundation.NSKeyValueCoding.UnknownKeyException, com.webobjects.foundation.NSKeyValueCoding.ValueAccessor
com.webobjects.foundation.NSValidation._MethodBinding, com.webobjects.foundation.NSValidation._ValidationBinding, com.webobjects.foundation.NSValidation.DefaultImplementation, com.webobjects.foundation.NSValidation.Utility, com.webobjects.foundation.NSValidation.ValidationException
Modifier and Type | Field and Description |
---|---|
protected String |
calendarName |
protected String |
calendarTimeZone |
protected com.webobjects.foundation.NSTimestampFormatter |
dateFormatter |
protected com.webobjects.foundation.NSTimestampFormatter |
dateTimeFormatter |
ERCalendarEvent |
event |
protected NSMutableArray |
events |
protected com.webobjects.foundation.NSTimestamp |
eventTimestamp |
protected int |
maxLineLength |
static String |
newline |
protected com.webobjects.foundation.NSTimestampFormatter |
timeZoneFormatter |
protected com.webobjects.foundation.NSTimestampFormatter |
utcDateTimeFormatter |
_Extension, _IsEventLoggingEnabled, _keyAssociations
Constructor and Description |
---|
ERPublishCalendarPage(com.webobjects.appserver.WOContext context)
Standard constructor for WOComponent subclasses.
|
Modifier and Type | Method and Description |
---|---|
void |
addEvent(ERCalendarEvent event)
Adds an event to the calendar.
|
void |
addEventsFromArray(NSArray eventsArray)
Adds an array of events to the calendar.
|
void |
appendToResponse(com.webobjects.appserver.WOResponse aResponse,
com.webobjects.appserver.WOContext aContext)
Modifies content encoding to UTF8, and content type to text/calendar.
|
String |
calendarName() |
String |
calendarTimeZone() |
com.webobjects.foundation.NSTimestampFormatter |
dateFormatter() |
com.webobjects.foundation.NSTimestampFormatter |
dateTimeFormatter() |
String |
escapedCalendarName() |
String |
escapedCalendarTimeZone() |
String |
escapedEventStatus() |
String |
escapedEventSummary() |
String |
escapedEventUniqueId() |
protected String |
escapedString(String string) |
String |
eventRepeatDayOfWeekString() |
String |
eventRepeatDaysOfMonthString() |
String |
eventRepeatFrequency() |
Number |
eventRepeatMonth() |
NSMutableArray |
events() |
com.webobjects.foundation.NSTimestamp |
eventTimestamp() |
protected String |
foldLongLinesInString(String content)
Folds lines that are longer than the maximum allowed 75 characters.
|
void |
removeEvent(ERCalendarEvent event)
Removes a previously added event from the calendar.
|
void |
removeEventsInArray(NSArray eventsArray)
Removes an array of previously added events from the calendar.
|
void |
setCalendarName(String value)
Sets the name of the calendar.
|
void |
setCalendarTimeZone(String value)
Sets the name of the time zone for the calendar.
|
com.webobjects.foundation.NSTimestampFormatter |
timeZoneFormatter() |
com.webobjects.foundation.NSTimestampFormatter |
utcDateTimeFormatter() |
__valueForBinding, _associationWithName, _awakeInContext, _childTemplate, _cleanUpStatelessComponent, _componentDefinition, _componentUnroll, _isPage, _setContext, _setIsPage, _setParent, _setSubcomponent, _sleepInContext, _subcomponentForElementWithID, _templateNameForClass, _unroll, application, awake, baseURL, bindingKeys, canAccessFieldsDirectly, canGetValueForBinding, canSetValueForBinding, clone, context, debugString, descriptionForResponse, ensureAwakeInContext, frameworkName, generateResponse, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hasBinding, hasSession, invokeAction, isCachingEnabled, isEventLoggingEnabled, isStateless, logString, name, pageWithName, parent, path, pathURL, performParentAction, pullValuesFromParent, pushValuesToParent, reset, session, set_componentUnroll, set_unroll, setCachingEnabled, setValueForBinding, setVariableValueForName, sleep, synchronizesVariablesWithBindings, takeValueForKey, takeValueForKeyPath, takeValuesFromRequest, template, templateWithHTMLString, templateWithHTMLString, templateWithHTMLString, templateWithName, toString, unableToSetNullForKey, validateTakeValueForKeyPath, validateValueForKey, validationFailedWithException, valueForBinding, valueForBooleanBinding, valueForIntegerBinding, valueForKey, valueForKeyPath, valueForNSArrayBindings, valueForNSDictionaryBindings, valueForNumberBinding, valueForStringBinding, variableValueForName, variableWithName
protected String calendarName
protected String calendarTimeZone
protected final int maxLineLength
public static String newline
protected NSMutableArray events
public ERCalendarEvent event
protected com.webobjects.foundation.NSTimestamp eventTimestamp
protected com.webobjects.foundation.NSTimestampFormatter dateTimeFormatter
protected com.webobjects.foundation.NSTimestampFormatter dateFormatter
protected com.webobjects.foundation.NSTimestampFormatter utcDateTimeFormatter
protected com.webobjects.foundation.NSTimestampFormatter timeZoneFormatter
public ERPublishCalendarPage(com.webobjects.appserver.WOContext context)
context
- context of a transactionWOComponent.pageWithName(String)
,
WOApplication.pageWithName(String, WOContext)
public void appendToResponse(com.webobjects.appserver.WOResponse aResponse, com.webobjects.appserver.WOContext aContext)
appendToResponse
in class com.webobjects.appserver.WOComponent
aResponse
- the HTTP response that an application returns to a Web server to complete a cycle of the request-response loopaContext
- context of a transactionpublic void addEvent(ERCalendarEvent event)
event
- the event to be included in the calendarERCalendarEvent
,
addEventsFromArray(NSArray)
public void addEventsFromArray(NSArray eventsArray)
eventsArray
- the events to be included in the calendarERCalendarEvent
,
addEvent(ERCalendarEvent)
public void removeEvent(ERCalendarEvent event)
event
- the event to be removed from the calendarERCalendarEvent
,
removeEventsInArray(NSArray)
public void removeEventsInArray(NSArray eventsArray)
eventsArray
- the events to be removed from the calendarERCalendarEvent
,
removeEvent(ERCalendarEvent)
public NSMutableArray events()
public String calendarName()
setCalendarName(String)
public String escapedCalendarName()
calendarName
public void setCalendarName(String value)
value
- name of the calendarcalendarName
public String calendarTimeZone()
setCalendarTimeZone
setCalendarTimeZone(String)
public String escapedCalendarTimeZone()
calendarTimeZone
public void setCalendarTimeZone(String value)
value
- name of the time zonecalendarTimeZone
public String escapedEventStatus()
ERCalendarEvent.status()
public String escapedEventSummary()
ERCalendarEvent.summary()
public String escapedEventUniqueId()
ERCalendarEvent.uniqueId()
public com.webobjects.foundation.NSTimestamp eventTimestamp()
public String eventRepeatFrequency()
repeatFrequency
.ERCalendarEvent.repeatFrequency()
public Number eventRepeatMonth()
public String eventRepeatDayOfWeekString()
public String eventRepeatDaysOfMonthString()
public com.webobjects.foundation.NSTimestampFormatter dateTimeFormatter()
public com.webobjects.foundation.NSTimestampFormatter dateFormatter()
public com.webobjects.foundation.NSTimestampFormatter utcDateTimeFormatter()
public com.webobjects.foundation.NSTimestampFormatter timeZoneFormatter()
protected String escapedString(String string)
Copyright © 2002 – 2020 Project Wonder.