Skip Headers
Oracle® Fusion Middleware Developer's Guide for Oracle WebCenter
11g Release 1 (11.1.1)
E10148-02
  Go To Documentation Library
Library
Go To Product List
Product
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
 
Next
Next
 

12 Integrating the Announcements Service

This chapter explains how to integrate the Announcements service into a custom WebCenter application.

This chapter includes the following sections:

12.1 Introduction to Announcements

The Announcements service lets you create and expose announcements on your application pages. Access to announcements boosts community participation, problem resolution, and knowledge sharing.

Announcements can show either forum-level announcements or global announcements (that is, announcements not specific to a forum).

12.1.1 Understanding the Announcements Service

With the Announcements service, you can do the following:

  • Create an announcement by clicking the Create icon, and then send it to a distribution list.

  • Edit an existing announcement by clicking the Edit icon next to the announcement.

  • Delete an existing announcement by clicking the Delete icon next to the announcement.

  • See the latest announcement data by clicking the Refresh icon on the Anouncement view.

  • Personalize the Announcements view. You can select to display announcements sent today, this week, this month, or all announcements. A Show list provides options for displaying announcements created within the selected time range.

  • Manage announcements, such as publishing announcements on a later date and specifying auto-expire on certain dates.

The Announcements service is integrated with many WebCenter Web 2.0 services, such as the RSS, Search (to search announcement text), Instant Messaging and Presence (IMP), and Recent Activities services. Use the Links service to link announcements to other services, such as Discussions.

Figure 12-1 shows a sample announcement.

Figure 12-1 Sample Announcement From the Task Flow

Description of Figure 12-1 follows
Description of "Figure 12-1 Sample Announcement From the Task Flow"

For more information about the service at runtime, see Oracle Fusion Middleware User's Guide for Oracle WebCenter.


Note:

You can see the Announcements service in action in the sample application, as described in Chapter 2, "Introduction to the WebCenter Sample Application."

12.1.2 Requirements for Announcements

The Announcements service requires a discussions server. You must install and configure the discussions server that comes with Oracle Fusion Middleware.

For information on installing the discussions server, see Oracle Fusion Middleware Installation Guide for Oracle WebCenter.

12.2 Basic Configuration for the Announcements Service

This section describes required steps for adding this service to your application. It contains the following subsections:

12.2.1 Setting Up a Connection for Announcements

To take advantage of the Announcements service, you must first create a connection to the discussions server from your custom WebCenter application. To do so, ensure that you have the connection information for the discussions server.

12.2.1.1 Announcements Connections

The Announcements service requires a WebCenter Discussion connection to the discussions server. When you create a WebCenter Discussion connection or set a connection as active, both the Announcements and Discussions services will use this same connection. If you already have an existing connection, then you can skip this section and see Section 12.2.2, "Adding the Announcements Service at Design Time."

If you do not have an existing connection, then you must create a new WebCenter Discussion connection.


Note:

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

12.2.1.2 How to Set Up Connections for Announcements

To set up the Announcements connection:

  1. In Oracle JDeveloper, open the application in which you plan to consume Announcements.


    Note:

    If you already created a WebCenter Discussion connection for the Discussions service, then that will be used by default for the Announcements service. No extra configuration is required.

  2. In the Resource Palette, click the New icon and select New Connection, WebCenter Discussion Connection.

  3. On the Name page, select to create the connection in Application Resources. (A connection in Application Resources will be available only for that application, while a connection in IDE Connections will be available for all applications you create. If you plan to use the connection in other applications, then select IDE Connections so you do not need to re-create it.)

  4. For Connection Name, enter a meaningful name; for example, MyDiscussions.

  5. Select the Set as default connection checkbox. You can have more than one connection, but only one can be active (default). If you have different discussions servers (for example, for each page in a space), then do not select the checkbox, but the service requires that one connection be marked as the active connection (Figure 12-2).


    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 default connection, you must create a new connection and mark that as the default connection.

    Figure 12-2 Create Discussion Connections, Step 1

    Description of Figure 12-2 follows
    Description of "Figure 12-2 Create Discussion Connections, Step 1"

  6. Click Next.

  7. On the General page, enter values for the required parameters:

    • forum.url: The URL for your discussions server instance. For example: http://discussions.example.com:8888/owc_discussions.

    • admin.user: The user name of your discussions server administrator; for example, admin. This account is used by the Discussions and Announcement services to perform administrative operations on behalf of WebCenter users.

  8. Optionally, enter values for the other parameters:

    • connection.time.out: The time (in seconds) the service should wait for the server to respond while making the connection. If the discussions server does not respond in the given time, then it will abort the connection and report an error.

    • forum.connection.secure: Whether the connection should be secured. If it should be secured, then additional configuration about WS-Security is required on the next page. The accepted value for this parameter is true or false.

  9. Figure 12-3 Create Discussions Connection, Step 2

    Description of Figure 12-3 follows
    Description of "Figure 12-3 Create Discussions Connection, Step 2"

  10. Click Test Connection, and if it is successful, then click Next.

  11. On the Create Discussion Connection - Step 3 of 3 page, you can enable client-side WS-Security (Figure 12-4).

    First obtain the client-side certificate and store it in a local directory. Then click the Add Secured Property button to add each of the following additional parameters in your WebCenter Discussion connection to secure WS-Service calls:

    • keystore.location: The certificate file path in your local directory.

    • keystore.password: The keystore password.

    • keystore.type: The keystore type associated with the certificate, for example, JKS.

    • encryption.key.alias: The key alias to be used for encryption.

    • encryption.key.password: The password for accessing the encryption key.

    Make sure your property key and value are the same as in the certificate.


    Note:

    If values should be secured, then add them by clicking the Add Secured Property button.

    Figure 12-4 Create Discussions Connection, Step 3

    Description of Figure 12-4 follows
    Description of "Figure 12-4 Create Discussions Connection, Step 3"

  12. Click Finish. Your connection should now appear as a node under Application Resources - Connections.

12.2.2 Adding the Announcements Service at Design Time

This section explains a basic incorporation of the Announcement service.

12.2.2.1 Announcements Task Flows

The announcement task flows let you add a main view or a sidebar view of announcements to your page.

Table 12-1 Announcement Task Flows

Task Flow Required Parameters Description

Announcements

parentId

This task flow displays a view with that allows the user to see all current announcements and perform operations based on their privileges.

For a Moderator, all command buttons are shown, but for a Reader, only the refresh and personalization options are shown. The personalization option lets users select the number of days to display announcements.

The parentId parameter is the forum ID in the discussions server under which announcements are maintained. If this parameter is not specified, then global announcements will be shown.

Announcements - Sidebar View

parentId

This task flow displays a view that shows various categories of quick links to announcements.

The parentId parameter is the forum ID in the discussions server under which announcements are maintained. If this parameter is not specified, then global announcements in the discussions server will be shown.

The look and feel of this view changes with the optional parameter values given for rendering the task flow region.

For information on how to add this task flow, see Section 12.3.1, "How to Add the Announcements - Sidebar View Task Flow."


12.2.2.2 How to Add Announcements to Your Application

The Announcements task flow provides a complete view of your announcements. To add the Announcements task flow to your custom WebCenter application:

  1. Follow the steps described in Chapter 3, "Preparing Your Development Environment" to implement security and create a new ustomizable page in your application.

  2. Open the page on which you want to add the service.

  3. In the Resource Palette, expand IDE Connections, File System, webcenter_services_root, Announcements, and ADF Task Flows.

  4. Drag Announcements from the Resource Palette and drop it onto the page inside of the af:form begin and end tags.

  5. When prompted, select Region as the way to create the task flow (and confirm with Add Library). This operation may take a moment to complete.

  6. In the Edit Task Flow Binding dialog, you can enter a value for the parentId parameter.

    • If global announcements are required, then do not specify a value for parentId.

    • If announcements from a specific forum are required (for example, when a forum is reserved for each group), then enter a value for parentId; for example, ${2}.

  7. Click OK.


    Note:

    If you created a connection in IDE and not in the application, then the connection must be added to the application. For example, in the Resource Palette under IDE Connections, right-click the connection and select Add to Application.

  8. Save and run your page.

    Figure 12-5 shows the Announcements view at runtime. The runtime view is based on the value that was provided for the parentId parameter.

    Figure 12-5 Announcements View at Runtime

    Description of Figure 12-5 follows
    Description of "Figure 12-5 Announcements View at Runtime"


    Note:

    All instances of the Announcements task flow in an application run against the active discussions server, and it serves no purpose to add more than one Announcements task flow instance. This is true for all service task flows that require connections to back-end servers, such as task flows from the Discussions and Mail services.

12.2.3 Setting Security for Announcements

In a non-secured custom WebCenter application, identity propagation cannot happen. A user will be a guest (or anonymous) user who can view only public categories and forums. In a non-secured application, the parentId (forum ID) from which announcements are fetched should be a public forum. If the forum is not public, then an error is reported. If the parentId parameter is not specified, then WebCenter cannot fetch global announcements (that is, announcements not scoped to a forum): global announcements are not available for public users.

In an ADF-secured custom WebCenter application, identity propagation is enabled. Based on the identity, appropriate permissions are matched and corresponding actions are enabled.

The user name that you use to log in to the application will be used to log in to the discussions server. The recommended approach is to have the discussions server and the custom WebCenter application point to the same identity store. To simplify the login process for your custom WebCenter application, you should use the same login credentials for the application as you do for the discussions server. This way, your users can log into the application once and automatically connect to the discussions server.


Note:

The Announcements services requires that the identity store be LDAP-based; that is, not file-based with jazn-data.xml.

For information about configuring ADF security, see Section 3.5, "Implementing Security in Your Application."

12.3 Advanced Information for the Announcements Service

This section describes optional features available with this service.

12.3.1 How to Add the Announcements - Sidebar View Task Flow

The Announcements - Sidebar View is similar to the Announcements view in that it displays announcements and provides tools to create, edit, and delete announcements. It also provides controls for determining when an announcement is published and when it expires. After you create an announcement, you can select the Mail icon next to the announcement to mail the announcement to anyone you choose.

The Announcements - Sidebar View task flow lets you present announcements to end users where manage controls are not needed. Based on the content, it can render in a default view or a custom view.

To add the Announcements - Sidebar View to your custom WebCenter application, follow the same instructions that you did for the Announcements task flow in Section 12.2.2, "Adding the Announcements Service at Design Time," but drag and drop Announcements - Sidebar View onto the page.

Figure 12-6 Edit Task Flow Binding Dialog for Announcements - Sidebar View

Description of Figure 12-6 follows
Description of "Figure 12-6 Edit Task Flow Binding Dialog for Announcements - Sidebar View"

Table 12-2 describes the Announcements - Sidebar View parameters. The look and feel of the Announcements - Sidebar View changes with the values provided for these parameters. For more information, see Section 12.3.2, "Customizing Announcements Views."

Table 12-2 Announcements - Sidebar View Task Flow Parameters

Parameter Description

parentId

The forum ID in the discussions server under which announcement objects are maintained. For example, ${2}.

If this parameter is not specified, then announcements default to global announcements.

freeFlowView

A Boolean value representing whether to remove the announcement title (subject) and show the announcement body as is.

The default value is ${false}, which means that the announcement list displays the title and body in plain text and is controlled by the truncateAt and expandedAnnouncements parameters.

Enter ${true} to remove the announcement title and ignore the values for truncateAt and expandedAnnouncements.

expandedAnnouncements

The number of announcements to display announcement details in plain text (that is, the body of the announcement). Users can click the title to display the full announcement content in rich text mode.

The value you enter for expandedAnnouncements is ignored if freeFlowView is set to true.

truncateAt

For announcements that display announcement body in plain text, this value specifies how many characters to display for each announcement.

Enter an Expression Language (EL) expression. For example, when the value is set to the EL expression ${50}, following their titles, announcements display no more than 50 characters. Users can click announcement titles to display the full announcement.

If no value is specified, then it will display 200 characters. If a non-valid positive integer value is specified, then it will display all characters in plain text.

This parameter takes effect in conjunction with expandedAnnouncements. The value you enter for truncateAt is ignored if freeFlowView is set to true.


12.3.2 Customizing Announcements Views

You can change the look and feel of the Announcements - Sidebar View with the parameter values. This section shows two examples of this.

Figure 12-7 shows the Announcements - Sidebar View at runtime with the freeFlowView parameter set to ${true}.

Figure 12-7 Announcements - Sidebar View with freeFlowView Parameter

Description of Figure 12-7 follows
Description of "Figure 12-7 Announcements - Sidebar View with freeFlowView Parameter"

Figure 12-8 shows the Announcements - Sidebar View at runtime with the freeFlowView parameter set to false (or empty), the expandedAnnouncements parameter set to 2, and the truncateAt parameter set to 20.

Figure 12-8 Announcements - Sidebar View with Optional Parameters

Description of Figure 12-8 follows
Description of "Figure 12-8 Announcements - Sidebar View with Optional Parameters"