Current Portal Yale OPA Calendar
- The Calendar portlet currently access the Yale OPA Sun1 calendar directly by making a call to http://events.yale.edu/opa/events?action=Search with appropriate search parameters. This url is hard coded in theedu.yale.its.tp.portlets.calendar.yaleopa.YaleEventCalendarAdapter.java.
- An ical xml file is returned, and converted into ical4j objects that are ultimately displayed in the portal. See below for a sample event output:<iCalendar xsi:schemaLocation="http://www.yale.edu/its/calendar/yale-xCal http://events.yale.edu/opa/schema/yale-xCal.xsd">
<vcalendar>
<method>PUBLISH</method>
<prodid>-//Yale University /ITS Calendar//EN</prodid>
<version>2.0</version>
<x-yale-xcal-version>1.0</x-yale-xcal-version>
<x-yale-xcal-query-date>20090626T100640Z</x-yale-xcal-query-date>
<vevent>
<uid>4a005aef00004b9900001070000005c8</uid>
<recurrence-id>20090626T140000Z</recurrence-id>
<dtstamp>20090626T100640Z</dtstamp>
<summary>
"Time Will Tell: Ethics and Choices in Conservation"
</summary>
<dtstart>20090626T100000Z</dtstart>
<dtend>20090626T170000Z</dtend>
<created>20090505T112700Z</created>
<last-modified>20090506T153110Z</last-modified>
<description>
Exhibit offers an opportunity to explore the process of fine arts conservation, uncovering the relationship between curators and conservators and the objects entrusted to their care. Each of the works in the exhibition, which includes Asian ceramics, African ritual objects, ancient statues and mosaics, and American and European paintings and decorative arts from the gallery's collection, illustrates a different conservation dilemma. "Time Will Tell" examines the evolving science of conservation and the questions that arise in preserving works of art while staying faithful to the artists' intentions. On view May 22-Sept. 6
</description>
<organizer>YUAG</organizer>
<categories>Exhibitions</categories>
<status>CONFIRMED</status>
<rrule>
FREQ=WEEKLY;UNTIL=20090906T235959;INTERVAL=1;BYDAY=WE,FR,TU,SA,TH
</rrule>
<x-yale-approval-status>CONFIRMED</x-yale-approval-status>
<x-yale-category>Exhibitions</x-yale-category>
<x-yale-event-url>artgallery.yale.edu</x-yale-event-url>
<x-yale-admission>Free</x-yale-admission>
<x-yale-open-to>General Public</x-yale-open-to>
<x-yale-location-address>1111 Chapel St.</x-yale-location-address>
<x-yale-location-building>YUAG (Yale University Art Gallery)</x-yale-location-building>
<x-yale-location-misc>at York Street</x-yale-location-misc>
<x-yale-wheelchair-accessible>Yes</x-yale-wheelchair-accessible>
<x-yale-sponsors>YUAG</x-yale-sponsors>
<x-yale-organizer-phone>(203) 432-0600</x-yale-organizer-phone>
</vevent>
</vcalendar>
</iCalendar>* - The CalendarPortlet implements caching, and will first look to the cache to see if the information already exists.
- The CalendarPortal implements the Yale OPA Calendar in 2 forms:
- Yale Events portlet, which displays the current day's events with no filtering on category or date range, displayed on guest page.
- My Calendar which displays the Yale OPA Calendar allowing for filtering by date range (1 day, 2 days, 1 week, 2 weeks) and category. Filter categories are defined in the calendar.xml configuration file. Users may also add custom calendars that produce an ical feed.
Impact of Bedework Replacement
- On August 3, 2009, the current Yale Sun1 calendar will be replaced by Bedework calendar
- The Yale Events portlet and the Yale OPA Calendar portion of My Calendar will cease to work.
Proposed Modifications to CalendarPortlet
- Bedework Calendar Capabilities
- The Bedework calendar installation will include a Feed Url restful web service utility that will return ical data, based on requested search criteria. This utility will be available for use by the portal. See notes below: -->Link (note, this server will go away sometime in the next couple weeks - I can send you a new link later):
http://sci-calsbxappdb-01.its.yale.internal:8080/feeds/builder/opa Description:
The resulting Feed URL has the following components:
1) Suite Name (opa, beinecke, yuag) - always "opa" for the portlet
2) Feed type (rss, json, ical) - always "ical" for the portlet
3) Date range - start date through end date (both start date and end date can be an alias or an ISO 8601 formatted date)
4) N number of meta-field filters
Some examples:
http://sci-calsbxappdb-01.its.yale.internal:8080/feeds/feed/opa/rss/today/7days/tag=arts,science/sponsor=YEC/\\
This is an RSS feed from today for the next 7 days with the query: (tag=arts OR tag=science) AND sponsor=YEC
http://sci-calsbxappdb-01.its.yale.internal:8080/feeds/feed/opa/rss/yesterday/3months/\\
RSS feed from yesterday for the next 3 months with no additional filtering.
http://sci-calsbxappdb-01.its.yale.internal:8080/feeds/feed/opa/json/today/1days/\\
iCal feed for today only with no filtering.
- The Bedework calendar installation will include a Feed Url restful web service utility that will return ical data, based on requested search criteria. This utility will be available for use by the portal. See notes below: -->Link (note, this server will go away sometime in the next couple weeks - I can send you a new link later):
http://calendar-dev.yale.edu/feeds/feed/opa/ical/today/1days
iCal feed for today's events only with no filtering.
Overall
- Create YaleEventCalendarBedeworkAdapter similar to YaleEventCalendarAdapter but with following differences
- replace logic in the createUrl method to construct a url in the format needed by the Bedework feed url utility.
- replace the build method with the ical4j bulder to return the calendar events
- base url should come from portlet preferences
- applicationContext.xml
- Add YaleEventCalendarBedeworkAdapter bean definition injecting the calendarBaseUrl for the bedework calendar with an ant variable
My Calendar
- calendar.xml
- Add new entry-key for YaleEventCalendarBedeworkAdapter in the editCalendarController predefinedEditActions map pointing to the editYaleCalendarofEvents view
- Add new entry-key for editing the new bedework calendar to the edit mappings of the portletModeParameterHandlerMappingWithInterceptor.
- Add new bean definition editYaleBedeworkCalendarController for the EditYaleEventsCalendarController with the tags for the Bedework calendar and the new edit view name
- To use Bedework calendar, add new calendar in the calendar_store pointing to the YaleEventCalendarBedeworkAdapter class
- Create new view editYaleCalendarOfEvents.jsp. This will present the categories for the Bedework calendar.
- Need way to determine which Yale calendar to use ... hopefully through the portlet definition through the ui - identifying which calendar to omit???
Yale Events
-
- viewYaleEvents.jsp
- change hard-coded url to calendar to variable controlled by portlet preferences
- Modify ViewYaleEventsController
- Pull calendar adapter class from calendar store for specific calendar
- Need way to identify which calendar to use... hopefully through the portlet definition through the ui - identifying which calendar to omit???
- viewYaleEvents.jsp
-
- Modify events.xml
- Add the base url for the Feed URL utility
- Modify events.xml
Database Script:
- Add new Yale Calendar entry to Calendar_store - using YaleEventCalendarBedeworkAdapter
- For each entry in Calendar_Configuration for calendar_id 3, insert a new row for the new Yale Calendar calendar_id.
- For each entry in Calendar_Preference for the configuration_id associated with Calendar_id 3, insert a new row for the Yale Calendar configuration id in step 2 converting the selected categories to the Bedework tags.
Notes:
- The subscribe id (from the UP_PORTLET_PREF_VALUES table) is passed from the portal to the portlet for the individual portlet instance.
Deploying the modified Calendar Portlet
<!-- /* Font Definitions */ @font-face
1. There is a script \src\main\config\scripts\ yaleBedeworkCalendarConversion-oracle.sql which should add the needed information to the database2. Changes to the portlet registration: a. My Calendar: to mark one of the Yale calendars as inactive (but not both), you need to add the following: inactiveYaleAdapterClass edu.yale.its.tp.portlets.calendar.yaleopa.YaleEventCalendarAdapter (inactivates the current Yale OPA Calendar) inactiveYaleAdapterClass edu.yale.its.tp.portlets.calendar.yaleopa.YaleEventBedeworkCalendarAdapter (inactivates the current Yale Bedework Calendar) b. Yale Events: identify the adapter to use... adapterClass edu.yale.its.tp.portlets.calendar.yaleopa.YaleEventBedeworkCalendarAdapter (for bedework calendar) adapterClass edu.yale.its.tp.portlets.calendar.yaleopa.YaleEventCalendarAdapter (for OPA calendar - currently the default)
days - number of days forward to pull - defaults to 2