Skip Headers
Oracle® Fusion Middleware Developer's Guide for Oracle WebCenter Portal
11g Release 1 (11.1.1.7.0)

Part Number E10148-20
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

51 Integrating the Events Service

This chapter explains how to integrate the Events service into a WebCenter Portal: Framework application at design time.

This chapter includes the following sections

For information about managing and including events, see:

51.1 Introduction to the Events Service

In Framework applications, the Events service provides access to your personal Microsoft Exchange calendar.

This section includes to following subsections:

51.1.1 Understanding the Events Service

With the Events service, users can:

  • Display their Microsoft Exchange calendars in the Framework application.

  • Create, edit, and delete events in their Exchange calendars.

  • Change the view of the Events task flow to view calendar events by month, week, or day, or as a list.

  • Personalize the Events task flow to display events based on the start time, secondary time zone, list type, and list count

The Events service is integrated with many WebCenter Portal services, such as Links, Mail, and Search.

Figure 51-1 shows an example of a personal calendar in a Framework application.

Figure 51-1 Personal Calendar

A personal calendar

51.1.2 Requirements for the Events Service

The Events service integrates with Microsoft Exchange Server to provide access to personal calendars. You must install and configure the appropriate server.

For information about installing and configuring Exchange Server, see "Events Service Prerequisites" in the Oracle Fusion Middleware Administrator's Guide for Oracle WebCenter Portal.

51.1.3 What Happens at Runtime

At runtime, users can view events from their Microsoft Exchange calendars.

For more information about the service at runtime, see the chapter "Working with the Events Service" in the Oracle Fusion Middleware User's Guide for Oracle WebCenter Portal: Spaces.

Note:

Oracle Fusion Middleware User's Guide for Oracle WebCenter Portal: Spaces discusses both personal events and space events. Only the information on personal events applies to Framework applications.

51.2 Basic Configuration for the Events Service

This section includes the following subsections:

51.2.1 Configuration Roadmap for the Events Service

The flow chart (Figure 51-2) and table (Table 51-1) in this section provide an overview of the prerequisites and tasks required to get the Events service working in Framework applications.

Figure 51-2 Configuring the Events Service for WebCenter Portal: Framework Applications

Description of Figure 51-2 follows Use MS Exchange Server 2007 Use MS Exchange Server 2003 Configure MS Exchange Server 2007 Edit security settings (Optional) Enable SSL Download and install WebCenter Portal's Personal Events Web Service Plug-in Configure MS Exchange 2003 Configure a connection to the Events server in JDeveloper Add an Events task flow to a page in JDeveloper Use JDeveloper Use Fusion Middleware Control Use WLST Use WLS Admin Console Use JDeveloper, then redeploy the application Use Fusion Middleware Control Use WLST Access personal calendar Default
Description of "Figure 51-2 Configuring the Events Service for WebCenter Portal: Framework Applications"

Table 51-1 Configuring the Events Service for WebCenter Portal: Framework Applications

Actor Task Sub-task Notes

Administrator

1. Install WebCenter Portal and Microsoft Exchange Server

 

MS Exchange Server is the back-end component for personal calendars

 

1.a Configure MS Exchange Server 2007

1.b Edit security settings

1.c (Optional) Enable SSL

 
 

1.a Download and install WebCenter Portal's Personal Events Web Service Plug-in

1.b Configure MS Exchange Server 2003

1.c (Optional) Enable SSL

 

Developer

2. Integrate the Events service in your application

2.a Configure a connection to the events server in JDeveloper

2.b Add an Events task flow to a page in JDeveloper

 

Developer/

Administrator

3. Deploy the application using one of the following tools:

   

Developer/

Administrator

4. Add/modify connection parameters using one of the following tools:

   

End User

5. Access personal calendar

 

Click Login to Personal Calendar on the Events task flow and enter your MS Exchange login credentials


51.2.2 Setting Up a Connection for the Events Service

To take advantage of the Events service, you must first create a connection to the Exchange server from your Framework application. To do this, ensure that you have the connection information for the server.

You can register several server connections for the Events service, but only one connection is active at a time.

Note:

While you can set up the connections to back-end servers at design time in JDeveloper, you can later add, delete, or modify connections in your deployed environment using Enterprise Manager Fusion Middleware Control. For more information, see the section "Registering Events Servers Using Fusion Middleware Control" in the Oracle Fusion Middleware Administrator's Guide for Oracle WebCenter Portal.

To set up a connection for the Events service:

  1. In JDeveloper, open the application in which you plan to consume the Events service.

  2. To create a connection that is available to all applications, in the Resource Palette, click the New icon and choose New Connection and then WebCenter Personal Event Connection.

    To create a connection that is available to the current application only, in the Application Resources panel of the Application Navigator, right-click Connections and choose New Connection and then WebCenter Personal Event Connection.

  3. In the Create Events Connection dialog, in the Connection Name field, enter a meaningful name, for example ExchangeServerForEvents (Figure 51-3).

    Figure 51-3 Create Events Connection Dialog

    This graphic shows the Create Events Connection dialog.
  4. In the Web Service URL field, enter the URL of the web service exposing the event application. Use the format:

    protocol://host:port/appWebServiceInterface/WSName
    

    For example:

    http://myexchange.com:80/ExchangeWS/PersonalEventsWebService.asmx
    http://myexchange.com:80/EWS/Services.wsdl
    
  5. From the Service Adapter dropdown list, select the version of the Microsoft Exchange server to connect to:

    • MSExchange2003

    • MSExchange2007

  6. Select Default Connection to use this connection for the Events service. You can have multiple connections, but only one can be active (default).

    Note:

    After you create a connection as the active connection, you cannot edit it so that it is not the default. To use a different active connection, you must create a new connection and mark that as the default connection.

  7. Click Test Connection, and if it is successful, then click OK.

    If the test is not successful, check the settings and try again.

  8. If you created the connection in the Resource Palette, you must add it to the application.

    In the Resource Palette, under IDE Connections, right-click the connection and choose Add to Application.

    The connection is listed in the Application Resources panel of the Application Navigator (Figure 51-4). An external application connection is also created to store the user names and passwords of users who connect to the Exchange server.

    Figure 51-4 Application Resources - Personal Event Connection

    Description of Figure 51-4 follows
    Description of "Figure 51-4 Application Resources - Personal Event Connection"

51.2.3 Adding the Events Service at Design Time

This section includes the following subsections:

51.2.3.1 Events Task Flows

The Events service task flows enable you to add a main view or quick view of events to a page.

Table 51-2 Events Service Task Flows

Task Flow Description

Calendar Main View

This task flow displays a calendar of events and provides users with options to view events in day, week, month, or list view.

Calendar Mini View

This task flow displays a calendar, similar to Calendar Main View, however, it requires less space. Only users with permission to edit the page and task flow can configure the event view (available in day or list view).


51.2.3.2 How to Add the Events Service to Your Application

To add an Events task flow to your application:

  1. Follow the steps described in Section 7.2, "Preparing Your Framework Application to Consume Services," to implement security and create a new customizable page in your application.

  2. Open the page on which you want to add the task flow.

  3. In the Resource Palette, expand My Catalogs, WebCenter Portal - Services Catalog, and Task Flows.

  4. Drag Calendar Main View or Calendar Mini View and drop it onto the page, inside the af:form tags.

  5. When prompted, select Region as the way to create the task flow.

  6. The Events task flows are contained within the event-view.jar library, so click Add Library to add the library to your project. This operation may take a moment to complete.

  7. Click OK.

  8. Save and run your page.

    Figure 51-5 shows the Calendar Main View task flow at runtime.

    Figure 51-5 Calendar Main View Task Flow

    This graphic shows the Calendar Main View task flow.

    Figure 51-6 shows the Calendar Mini View task flow at runtime.

    Figure 51-6 Calendar Mini View Task Flow

    This graphic shows the Calendar Mini View task flow.

51.2.4 Setting Security for the Events Service

When you create the connection to the Microsoft Exchange Server for the Events service, an external application connection is also created. This external application connection is created to store the user name and password of users in the Microsoft Exchange Server. For more information, see Section 51.2.2, "Setting Up a Connection for the Events Service."

51.3 Using the Events Service REST APIs

WebCenter Portal provides REST APIs to support the Events service. Use the Events service REST APIs to create your own interface for providing access to space events.

Note:

The Events service REST APIs are available for space events only. You cannot use REST APIs to work with personal events.

This section describes the REST APIs associated with the Events service. It includes the following subsections:

51.3.1 Events Entry Point

The entry point for the Events service can be reached only through a space. First you need to navigate to the appropriate space and then find the link element with a resourceType of:

urn:oracle:webcenter:events:gsEvents

The corresponding href or template element provides the URI entry point. The client sends HTTP requests to this entry point to work with the Events service.

For more information about the Resource Index, see Section 53.5.1, "The Resource Index."

For more information about resource types, see Section 53.5.2.1, "Resource Type."

51.3.2 Events Resource Type Taxonomy

When the client has identified the entry point, it can then navigate through the resource type taxonomy to perform the required operations. For more information about the individual resources types, see the appropriate section in Section 51.3.4, "Events Resource Types."

The taxonomy for the Events service is:

urn:oracle:webcenter:events:gsEvents
  urn:oracle:webcenter:events:gsEvent
urn:oracle:webcenter:events:gsCategories
  urn:oracle:webcenter:events:gsCategory

51.3.3 Security Considerations

There are no specific security considerations for this service. For general security considerations, see Section 53.8, "Security Considerations for WebCenter Portal REST APIs."

51.3.4 Events Resource Types

This section provides you with all the information you need to know about each resource type. It includes the following subsections:

51.3.4.1 urn:oracle:webcenter:events:gsEvents

Use this resource to identify the URI to use to retrieve (GET) and create (POST) space events. The response from a GET operation includes each space event in this collection of events, and each event includes links used to operate on that event. The response from a POST operation includes the event that was created in this collection of events and a link to operate on that event.

Navigation Paths to gsEvents

This section shows how the client can navigate through the hypermedia to access this resource:

resourceIndex
   spaces
      gsEvents

Supported Methods for gsEvents

The following methods are supported by this resource:

  • GET

    • request - body: none, Parameters: startIndex, itemsPerPage, utoken

      For information about these common parameters, see "Common Request Query Parameters".

      The following additional parameters are available:

      • startDate—the date from which to start listing space events

      • endDate—the date at which to stop listing space events

      For the start and end dates, use the format YYYY-MM-DD, for example 2011-09-01. You can also specify a time (for example, 2011-09-01T09:00:00) and a timezone sign (for example, for UTC, 2011-09-01T09:00:00Z).

    • response - body: 0 or more events

  • POST

    • request - body: event

    • response - body: event

Resource Types Linked to From gsEvents

Table 51-3 lists the resource types that the client can link to from this resource.

Table 51-3 Related Resource Types for gsEvents

rel resourceType

self

urn:oracle:webcenter:events:gsEvents


51.3.4.2 urn:oracle:webcenter:events:gsEvent

Use this resource type to identify the URI to use to read (GET), update (PUT), or delete (DELETE) a specific space event. The response from a GET operation includes the specific event identified by the URI. The response from a PUT operation includes the modified version of the event identified by the URI. The response from a DELETE operation is a 204.

Navigation Paths to gsEvent

resourceIndex
   spaces
      gsEvents
         gsEvent

Supported Methods for gsEvent

The following methods are supported by this resource:

  • GET

    • request - body: none

    • response - body: event

  • PUT

    • request - body: event

    • response - body: event

  • DELETE

    • request - body: none

    • response - body: none

Writable Elements for gsEvent

Table 51-4 lists the writable elements for this resource.

Table 51-4 Writable Elements for gsEvent

Element Type Required Constraints Description

category

String

No

The name of an event category defined for the space

The category to which the event belongs

details

String

No

1 or more characters

Additional details about the event

endTime

Date

Yes

YYYY-MM-DDTHH:MM:SS

endTime must be greater than or equal to startTime

The date and time at which the event ends

location

String

No

1 or more characters

The location at which the event takes place

priority

String?

No

1 - Highest

2 - High

3 - Normal

4 - Low

5 - Lowest

The priority of the event, which determines where it appears when events clash

startTime

Date

Yes

YYYY-MM-DDTHH:MM:SS

The date and time at which the event starts

summary

String

Yes

1 or more characters

A brief description of the event to serve as the title of the event


Read-only Elements for gsEvent

Table 51-5 lists the read-only elements for this resource.

Table 51-5 Read-only Elements for gsEvent

Element Type Description

author

personReference

User who created the event

created

Date

Date on which the event was created

duration

String

The length (in minutes) of the event

groupSpace

groupSpaceReference

The space to which the event belongs

id

String

Unique ID of the event

isAllDayEvent

Boolean

Indicates whether the event takes place over an entire day

modified

Date

Date on which the event was last updated

modifiedByUser

personReference

User who last updated the event


Resource Types Linked to from gsEvent

Table 51-6 lists the resource types that the client can link to from this resource.

Table 51-6 Related Resource Types for gsEvent

rel resourceType

self

urn:oracle:webcenter:events:gsEvent


51.3.4.3 urn:oracle:webcenter:events:gsCategories

Use this resource to identify the URI to use to retrieve (GET) and create (POST) space event categories. The response from a GET operation includes each category in this collection of categories, and each category includes links used to operate on that category. The response from a POST operation includes the category that was created in this collection of categories and a link to operate on that category.

Navigation Paths to gsCategories

This section shows how the client can navigate through the hypermedia to access this resource:

resourceIndex
   spaces
      gsCategories

Supported Methods for gsCategories

The following methods are supported by this resource:

  • GET

    • request - body: none

    • response - body: 0 or more categories

  • POST

    • request - body: category

    • response - body: category

Resource Types Linked to From gsCategories

Table 51-7 lists the resource types that the client can link to from this resource.

Table 51-7 Related Resource Types for gsCategories

rel resourceType

self

urn:oracle:webcenter:events:gsCategories


51.3.4.4 urn:oracle:webcenter:events:gsCategory

Use this resource type to identify the URI to use to read (GET), update (PUT), or delete (DELETE) a specific space event category. The response from a GET operation includes the specific category identified by the URI. The response from a PUT operation includes the modified version of the category identified by the URI. The response from a DELETE operation is a 204.

Navigation Paths to gsCategory

This section shows how the client can navigate through the hypermedia to access the gsCategory resource:

resourceIndex
   spaces
      gsCategories
         gsCategory

Supported Methods for gsCategory

The following methods are supported by this resource type:

  • GET

    • request - body: none

    • response - body: category

  • PUT

    • request - body: none

    • response - body: category

  • DELETE

    • request - body: none

    • response - body: none

Writable Elements for gsCategory

Table 51-8 lists the writable elements for the resource.

Table 51-8 Writable Elements for gsCategory

Element Type Required Constraints Description

name

String

Yes

1 or more characters

The name of the category


Resource Types Linked to from gsCategory

Table 51-9 lists the resource types that the client can link to from this resource.

Table 51-9 Related Resource Types for gsCategory

rel resourceType

self

urn:oracle:webcenter:events:gsCategory


51.4 Troubleshooting the Events Service

This section provides information to assist you in troubleshooting problems you may encounter while using the Events service.

Problem

Error message displayed in calendar taskflow:

Personal Event Service is not configured properly. Rectify the service configuration and then click Try Again.

Solution

Confirm that you have created a Personal Event Connection. For more information, see Section 51.2.2, "Setting Up a Connection for the Events Service."

Problem

After logging into the calendar with the right credentials, you continue to see the Login to Personal Calendar link rather than your events.

Solution

Confirm that the page on which calendar taskflow is added is a secured page. Anonymous users cannot log into the Personal Event Calendar server.