../E63259-01.epub /> ../E63259-01.mobi />
This chapter explains how to integrate events functionality into a WebCenter Framework application at design time.
This chapter includes the following sections
For information about managing and including events, see:
the "Managing Calendar Events" chapter in Oracle Fusion Middleware Administering Oracle WebCenter Portal.
the "Working with Events" chapter in Oracle Fusion Middleware Using Oracle WebCenter Portal.
In Portal Framework applications, events provide access to your personal Microsoft Exchange calendar.
This section includes to following subsections:
With events, users can:
Display their Microsoft Exchange calendars in the 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
Events is integrated with many WebCenter Portal tools and components, such as links, mail, and search.
Figure 48-1 shows an example of a personal calendar in a Framework application.
Events 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 Prerequisites for Personal Events" in the Oracle Fusion Middleware Administering Oracle WebCenter Portal.
At runtime, users can view events from their Microsoft Exchange calendars.
For more information about events at runtime, see the chapter "Working with Events" in the Oracle Fusion Middleware Using Oracle WebCenter Portal.
Note:
Oracle Fusion Middleware Using Oracle WebCenter Portal discusses both personal events and portal events. Only the information on personal events applies to Portal Framework applications.This section includes the following subsections:
The flow chart (Figure 48-2) and table (Table 48-1) in this section provide an overview of the prerequisites and tasks required to get events working in Framework applications.
Figure 48-2 Configuring Events for Portal Framework Applications
Table 48-1 Configuring Events for Portal Framework Applications
Actor | Task | Sub-task | Notes |
---|---|---|---|
Administrator |
1. Install WebCenter Portal and Microsoft Exchange Server |
MS Exchange Server is the back-end server for personal calendars |
|
1.a Download and install WebCenter Portal's Personal Events Web Service Plug-in |
|||
Developer |
2. Integrate events in your application |
2.a Configure a connection to the events server 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 |
Click Login to Personal Calendar on the Events task flow and enter your MS Exchange login credentials |
To take advantage of events functionality, 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 events, 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 Administering Oracle WebCenter Portal.To set up a connection for events:
In JDeveloper, open the application in which you plan to consume events.
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.
In the Create Events Connection dialog, in the Connection Name field, enter a meaningful name, for example ExchangeServerForEvents
(Figure 48-3).
Figure 48-3 Create Events Connection Dialog
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
From the Service Adapter dropdown list, select the version of the Microsoft Exchange server to connect to:
MSExchange2003
MSExchange2007
Select Default Connection to use this connection for events. 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.Click Test Connection, and if it is successful, then click OK.
If the test is not successful, check the settings and try again.
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 48-4). An external application connection is also created to store the user names and passwords of users who connect to the Exchange server.
Figure 48-4 Application Resources - Personal Event Connection
This section includes the following subsections:
Events task flows enable you to add a main view or quick view of events to a page.
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). |
To add an Events task flow to your application:
Follow the steps described in Section 4.2, "Preparing Your Framework Application for Tools and Services," to implement security and create a new customizable page in your application.
Open the page on which you want to add the task flow.
In the Resource Palette, expand My Catalogs, WebCenter Portal - Services Catalog, and Task Flows.
Drag Calendar Main View or Calendar Mini View and drop it onto the page, inside the af:form
tags.
When prompted, select Region as the way to create the task flow.
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.
Click OK.
Save and run your page.
Figure 48-5 shows the Calendar Main View task flow at runtime.
Figure 48-6 shows the Calendar Mini View task flow at runtime.
When you create the connection to the Microsoft Exchange Server for events, 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 48.2.2, "Setting Up a Connection for Events."
WebCenter Portal provides a REST API to support events. Use the REST API to create your own interface for providing access to portal events.
Note:
The Events REST API is available for portal events only. You cannot use the REST API to work with personal events.This section describes the REST API methods associated with events. It includes the following subsections:
The entry point for events can be reached only through a portal. First you need to navigate to the appropriate portal 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 events.
For more information about the Resource Index, see Section 53.5.1, "Using the Resource Index."
For more information about resource types, see Section 53.5.2.1, "Resource Type."
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 48.3.4, "Events Resource Types."
The taxonomy for events is:
urn:oracle:webcenter:events:gsEvents urn:oracle:webcenter:events:gsEvent urn:oracle:webcenter:events:gsCategories
There are no specific security considerations for events. For general security considerations, see Section 53.8, "Security Considerations for WebCenter Portal REST APIs."
This section provides you with all the information you need to know about each resource type. It includes the following subsections:
Use this resource to identify the URI to use to retrieve (GET
) and create (POST
) portal events. The response from a GET
operation includes each portal 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.
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: <gsCategory>, 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 portal events
endDate
—the date at which to stop listing portal 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 48-3 lists the resource types that the client can link to from this resource.
Use this resource type to identify the URI to use to read (GET
), update (PUT
), or delete (DELETE
) a specific portal 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.
resourceIndex spaces gsEvents 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
Table 48-4 lists the writable elements for this resource.
Table 48-4 Writable Elements for gsEvent
Element | Type | Required | Constraints | Description |
---|---|---|---|---|
|
String |
No |
The name of an event category defined for the portal |
The category to which the event belongs. Note: If the category does not exist, the default is used if the event is being created. However, an error will occur if the event is being modified. |
|
String |
No |
1 or more characters |
Additional details about the event |
|
Date |
Yes |
YYYY-MM-DDTHH:MM:SS
|
The date and time at which the event ends |
|
String |
No |
1 or more characters |
The location at which the event takes place |
|
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 |
|
Date |
Yes |
YYYY-MM-DDTHH:MM:SS |
The date and time at which the event starts |
|
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 48-5 lists the read-only elements for this resource.
Table 48-5 Read-only Elements for gsEvent
Element | Type | Description |
---|---|---|
|
personReference |
User who created the event |
|
Date |
Date on which the event was created |
|
String |
The length (in minutes) of the event |
|
groupSpaceReference |
The portal to which the event belongs |
|
String |
Unique ID of the event |
|
Boolean |
Indicates whether the event takes place over an entire day |
|
Date |
Date on which the event was last updated |
|
personReference |
User who last updated the event |
Resource Types Linked to from gsEvent
Table 48-6 lists the resource types that the client can link to from this resource.
Use this resource to identify the URI to use to retrieve (GET
) and create (POST
) portal 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: category
response - body: 0 or more categories
POST
request - body: category
response - body: category
Resource Types Linked to From gsCategories
Table 48-7 lists the resource types that the client can link to from this resource.
This section provides information to assist you in troubleshooting problems you may encounter while using events.
Error message displayed in calendar taskflow:
Personal Events is not configured properly. Rectify the configuration and then click Try Again.
Confirm that you have created a Personal Event Connection. For more information, see Section 48.2.2, "Setting Up a Connection for Events."
After logging into the calendar with the right credentials, you continue to see the Login to Personal Calendar link rather than your events.
Confirm that the page on which calendar taskflow is added is a secured page. Anonymous users cannot log into the Personal Event Calendar server.