Adding Predefined Calendars

A new administrative function has been added to the calendar portlet that will allow administrative users to add pre-defined calendars via the portlet.

Mapping Portal Roles

In order to use the administrative features available in the calendar portlet, you will need to map a uPortal group to the "calendarAdmin" portlet role. In the example below, the portlet maps this administrative role to the "Portal Administrator" role in uPortal. One could also map the role to a specially configured calendar administration role or to a PAGS group.

Example Role Mapping in src/main/webapp/WEB-INF/portlet.xml
    <portlet>
        <portlet-name>calendar</portlet-name>

        . . . 

        <!--
            Administrative role mapping.  This mapping is required if you
            want to use the administrative features.
        -->
        <security-role-ref>
            <role-name>calendarAdmin</role-name>
            <role-link>Portal Administrators</role-link>
        </security-role-ref>
        <!-- 
            Additional roles for assigning default calendars.  Any roles
            you wish to use must be assigned keys here. 
        -->
        <security-role-ref>
            <role-name>everyone</role-name>
            <role-link>Everyone</role-link>
        </security-role-ref>
        <security-role-ref>
            <role-name>student</role-name>
            <role-link>Students</role-link>
        </security-role-ref>
        <security-role-ref>
            <role-name>faculty</role-name>
            <role-link>Faculty</role-link>
        </security-role-ref>
        <security-role-ref>
            <role-name>staff</role-name>
            <role-link>Staff</role-link>
        </security-role-ref>
    </portlet>

Adding calendars

Currently, adding a predefined calendar requires you to know the bean ID of the calendar adapter (generally the same as the class name) and the name of any required parameters. You can find and edit the list of defined adapters in src/main/webapp/WEB-INF/context/calendarContext.xml.

To add a pre-defined calendar, navigate to the administrative editing interface by clicking the "Calendar Administration" link in the main view of the portlet. If you don't see this link, your calendar administration role may not be defined correctly, or you may not be a member of the configured group. This link will take you to an editing interface where you may add, edit, and delete pre-defined calendars.

Administrative editing interface

To add a new calendar, click the "add a calendar" link. This link will open a new form, allowing you to specify the type of calendar to be added, as well as details about that calendar. Currently, adding a predefined calendar requires you to know the bean ID of the calendar adapter (generally the same as the class name) and the name of any required parameters. You can find and edit the list of defined adapters in src/main/webapp/WEB-INF/context/calendarContext.xml.

As an example, we could add Apple's "US Holidays" calendar as a basic HTTP iCal feed. This bean's ID is "httpIcalAdapter", and it requires one parameter of "url", which for this feed is http://ical.mac.com/ical/US32Holidays.ics. In the screenshot below, we've configured the feed to be available to the user group "everyone".

Adding a new pre-defined calendar