Oracle® Fusion Middleware Developer's Guide for Oracle WebCenter Portal (Oracle Fusion Applications Edition) 11g Release 1 (11.1.1.6.2) Part Number E25595-01 |
|
|
PDF · Mobi · ePub |
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:
"Managing the Events Service" in the Oracle Fusion Middleware Administrator's Guide for Oracle WebCenter Portal.
"Working with the Events Service" in the Oracle Fusion Middleware User's Guide for Oracle WebCenter Portal: Spaces.
In Framework applications, the Events service provides access to your personal Microsoft Exchange calendar.
This section includes to following subsections:
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 52-1 shows an example of a personal calendar in a Framework application.
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.
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.
This section includes the following subsections:
Section 52.2.1, "Configuration Roadmap for the Events Service"
Section 52.2.2, "Setting Up a Connection for the Events Service"
The flow chart (Figure 52-2) and table (Table 52-1) in this section provide an overview of the prerequisites and tasks required to get the Events service working in Framework applications.
Figure 52-2 Configuring the Events Service for WebCenter Portal: Framework Applications
Table 52-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 Download and install WebCenter Portal's Personal Events Web Service Plug-in |
|||
Developer |
2. Integrate the Events service 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 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:
In JDeveloper, open the application in which you plan to consume the Events service.
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 52-3).
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 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.
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 52-4). An external application connection is also created to store the user names and passwords of users who connect to the Exchange server.
Figure 52-4 Application Resources - Personal Event Connection
This section includes the following subsections:
The Events service task flows enable you to add a main view or quick view of events to a page.
Table 52-2 Events Service Task Flows
Task Flow | Description |
---|---|
This task flow displays a calendar of events and provides users with options to view events in day, week, month, or list 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 7.2, "Preparing Your Framework Application to Consume 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 52-5 shows the Calendar Main View task flow at runtime.
Figure 52-6 shows the Calendar Mini View task flow at runtime.
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 52.2.2, "Setting Up a Connection for the Events Service."
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:
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 54.5.1, "The Resource Index."
For more information about resource types, see Section 54.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 52.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
There are no specific security considerations for this service. For general security considerations, see Section 54.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
) 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 52-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 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 52-4 lists the writable elements for this resource.
Table 52-4 Writable Elements for gsEvent
Element | Type | Required | Constraints | Description |
---|---|---|---|---|
|
String |
No |
The name of an event category defined for the space |
The category to which the event belongs |
|
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 52-5 lists the read-only elements for this resource.
Table 52-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 space 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 52-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
) 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 52-7 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 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 52-8 lists the writable elements for the resource.
Table 52-8 Writable Elements for gsCategory
Element | Type | Required | Constraints | Description |
---|---|---|---|---|
|
String |
Yes |
1 or more characters |
The name of the category |
Resource Types Linked to from gsCategory
Table 52-9 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 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 52.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.