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 Feedback page
Contact Us

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

31 Integrating Wikis and Blogs

You can integrate the wiki and blog functionality in your WebCenter Portal: Framework applications to enable your application users to collaborate and share content and ideas.

This chapter describes how to integrate the wiki and blog functionality into your Framework applications. It includes the following sections:

31.1 Introduction to Wikis and Blogs

A wiki is a collection of useful content or information that users can browse, update, and remove, sometimes without the need for registration. This ease of interaction and the variety of operations make wiki an effective tool for collaborative authoring, where multiple people create written content together.

Blogs are typically personal records of an individual user's experience and opinions. They provide a useful tool for discussing and/or evangelizing any type of idea, strategy, or point of view. Blogs may be projected out to a select group of people or to a wider audience. Typically, each blog contains various blog posts, with the most recently added blog post displayed at the top. Blogs invite readers to comment on the overall concepts.

You can integrate wikis and blogs into your Framework applications using the Documents service. There is no limitation on the number of wiki pages or blogs that you can expose in an application.

31.2 Requirements for Wikis and Blogs

To support the wiki and blog functionality, the Documents service relies on Content Server. For wiki and blog functionality to be available in your Framework applications, the following prerequisites must be met:

After completing these requirements, you can use the Documents service to add wikis and blogs to your Framework applications:

If you want to convert wikis and blogs in your Framework applications into PDF, your application administrator must configure the WebCenter Conversion component, as described in "Enabling the Conversion of Wikis and Blogs into PDFs" in Oracle Fusion Middleware Administrator's Guide for Oracle WebCenter Portal.

31.3 Integrating Wikis

This following sections provide the information you need to add wiki documents to your Framework applications:

31.3.1 What You Should Know About the Document Explorer Task Flow

To provide your application users with the ability to add and manage wiki documents at runtime, you need to add the Document Explorer task flow to your Framework application. When you add this task flow at design time, it is built into the application for end users, and enables them to work with wiki documents at runtime.

The Document Explorer task flow has associated parameters. For information, see Section 30.7.2, "Document Explorer Task Flow Parameters."

31.3.2 Adding the Document Explorer Task Flow to Provide the Wiki Functionality

To prepare your Framework application and add the Document Explorer task flow for enabling the wiki functionality:

  1. Ensure that you have completed the requirements listed in Section 31.2, "Requirements for Wikis and Blogs."

    Note:

    While setting up the connection, you must choose an authentication method. If you choose identity propagation, you must implement ADF security in your application and configure secure socket layer (SSL) on Content Server.

    If you choose external application, you must specify the external application you want to use for authenticating users to Content Server.

    For information, see Section 7.2.1.1, "Implementing Security for Services."

  2. Create or open the JSF page in which you want to provide the wiki functionality (see Section 5.3, "Adding Pages to a Portal").

  3. Choose a method for adding the Document Explorer task flow to the page:

    For information about the parameters that you can set for the Document Explorer task flow, see Section 30.7.2, "Document Explorer Task Flow Parameters."

    When you run the page, the Document Explorer task flow displays in your default browser, as shown in Figure 31-1. Application users can create a wiki document by clicking New Wiki Document.

    Figure 31-1 Creating a New Wiki Document

    Creating a New Wiki Document

31.3.3 Modifying Document Explorer Task Flow Parameters

The way you modify parameters of a Document Explorer task flow is the same as any other Documents service task flow. For information, see Section 30.6, "Modifying Content Task Flow Parameters." For information about the specific parameters that you can modify, see Section 30.7.2, "Document Explorer Task Flow Parameters."

31.3.4 What Happens at Runtime

At runtime, an authenticated user can create wiki documents in a Framework application in which the wiki functionality has been exposed. Users can also edit, download, rename, share, and subscribe to a wiki document and view its history and properties.

At runtime, the folder that you exposed through the Document Explorer task flow is shown as the root folder. Application users can create a wiki document by clicking New Wiki Document (Figure 31-4), which opens the Rich Text Editor (RTE) (Figure 31-3), displaying a blank wiki document.

Figure 31-2 Creating a New Wiki Document

Creating a New Wiki Document

Users can add and edit wiki content using the Rich Text Editor (RTE), which is a fully-integrated HTML text editor (Figure 31-3).

Figure 31-3 Rich Text Editor Displaying New Wiki Document

New Wiki Document in Rich Text Editor

By default, all wiki documents are created directly under the root folder (Figure 31-4).

Figure 31-4 Wiki Document Created Using New Wiki Document Action

Wiki Document Created Using New Wiki Document Action

At runtime, users can also choose to display a wiki document using Content Presenter.

The runtime procedures for adding and managing wiki documents in a Framework application are the same as those in a space in WebCenter Portal: Spaces. For generic information, refer to the chapter "Working with Wiki Documents" in Oracle Fusion Middleware User's Guide for Oracle WebCenter Portal: Spaces.

31.3.5 Displaying Wiki Page Links Within Content Presenter

At runtime, when a wiki document is displayed using a Content Presenter display template, by default the links present in the wiki document render in the Document Viewer. You can configure your application to display such links within Content Presenter.

To open the links present in a wiki document within Content Presenter:

  1. Open the adf-config.xml file. This file is located under Descriptors/ADF META-INF in the Application Navigator.

  2. Update the Namespace entry as follows:

    xmlns:wpsC="http://xmlns.oracle.com/webcenter/framework/service" 
    
  3. Update the ResourceActionHandler entry as follows:

    <wpsC:adf-service-config
    xmlns="http://xmlns.oracle.com/webcenter/framework/service">
          <resource-handler
    class="oracle.webcenter.portalframework.sitestructure.handler.NavigationResourceActionHandler"/>
    </wpsC:adf-service-config>
    
  4. Save adf-config.xml.

31.4 Integrating Blogs

When you integrate the blogs functionality into your Framework application, authorized application users can create and manage blog posts. To enable the blog functionality, you need to add the blog task flows.

This following sections provide the information you need to add blogs to a Framework application:

31.4.1 Understanding the Blog Task Flows

If you want to include a blog on a page, along with other page components, you can use the blog task flows to add one or more elements of a blog to a page. Table 31-1 lists and describes the blog task flows:

Table 31-1 Blog Task Flows

Blog Task Flow Description Example as Exposed on a Page

Blog Archives

Displays a composite list of blogs based on dates.

Blog Archives task flow

Blog Banner

Displays a banner for the blog.

Blog Banner task flow

Blog Digest

Displays a blog or blog post.

Blog Viewer task flow

Blog Recent Posts

Displays a list of most recent blog posts.

This element is not included in a default blog.

Blog Recent Posts task flow

Blogs

Displays a blog or blog post with a default design.

The default design does not include Recent Posts.

Blogs View task flow


31.4.2 Adding a Blog to a Page

To add a blog to a page in your Framework application:

  1. Ensure that you have completed the requirements listed in Section 31.2, "Requirements for Wikis and Blogs."

    Note:

    While setting up the connection, you must choose an authentication method. If you choose identity propagation, you must implement ADF security in your application and configure secure socket layer (SSL) on Content Server.

    If you choose external application, you must specify the external application you want to use for authenticating users to Content Server.

    For information, see Section 7.2.1.1, "Implementing Security for Services."

  2. Create or open a page in your application where you want to expose the blog functionality (see Section 5.3, "Adding Pages to a Portal").

  3. Before you add a blog task flow to your page, consider whether or not you want to allow your application users to edit the task flow. To enable runtime editing of the page, see Chapter 19, "Enabling Runtime Editing of Pages Using Composer."

  4. Add a blog to the page using an existing folder to create a default blog page, or by creating a custom blog by selecting individual blog task flows:

31.4.2.1 Adding a Default Blog Using an Existing Folder

If you have an existing folder, perhaps already containing blog posts, you can establish that folder as the source of blog posts for a blog, instead of creating a new "empty" blog (see Section 31.4.2.2, "Adding a Custom Blog to a Page Using the Blog Task Flows"). At runtime, the blog displays the blog posts in that folder.

To expose a selected folder and its contents as a blog on a page:

  1. In the Application Resources panel, navigate to Connections, then Content Repository.

  2. Locate the name of your Content Server connection, then expand it to navigate to the folder that you want to establish as the blog folder.

    Tip:

    You can expose any folder as a blog. To better organize your blogs, you may consider storing each blog folder in a parent folder; for example, a folder named Blogs. You can create a folder using either the Documents service interface or the Content Server console.

    Files stored in the blog folder are identified as blog posts in their metadata Type field, which is set to Blog Post. Uploading an HTML file into a blog folder does not expose it as as blog post, unless you set its Type to Blog Post.

  3. Drag the folder onto the page, and release the mouse button to display a menu listing all available task flows (Figure 31-5).

    Figure 31-5 Menu of Available Task Flows for Selected Folder

    Menu of Available Task Flows for Selected Folder
  4. From the menu, choose Blogs to open the Edit Task Flow Binding dialog (Figure 31-6).

    Figure 31-6 Specifying Parameters for Blogs Task Flow

    Edit Task Flow Binding Dialog
    Description of "Figure 31-6 Specifying Parameters for Blogs Task Flow"

  5. In the Edit Task Flow Binding dialog, the resourceId value is automatically populated with the resource ID of the selected folder. Click OK to accept the default task flow parameters, or modify the parameters as desired. For more information, see Section 31.4.5.5, "Blogs Task Flow Parameters."

  6. Save your page and the page definition file, then run your page to your browser by right-clicking the page (not the page definition file) and choosing Run.

The new blog is given the same name as the selected folder. Existing files under the folder become blog posts if the Type property of the file is set to Blog Post (for more information about file properties in Content Server, see "Info Update Form" in Oracle WebCenter Content User's Guide for Content Server). As posts are added to the blog at runtime, the blog posts are stored in this folder. See Section 31.4.3, "What Happens at Runtime."

31.4.2.2 Adding a Custom Blog to a Page Using the Blog Task Flows

You may want to add an "empty" blog task flow onto your page, either as one component on a page, or as the entire page. For example, in cases where you do not have a content repository connection, or want to use an EL expression as a parameter to dynamically bind to a target item, you may want to use this method instead of the method described in Section 31.4.2.1, "Adding a Default Blog Using an Existing Folder." Additionally, the individual blog task flows enable you to customize the appearance of a blog.

To add a customized blog task flow to a page:

  1. In the Resource Palette, expand the WebCenter Portal - Services Catalog. Under Task Flows, select the blog task flow that you want to add, drag it onto your page, and release the mouse button.

    For information about each of the five blog task flows, see Section 31.4.1, "Understanding the Blog Task Flows."

  2. From the menu that displays, choose Region (Figure 31-7).

    Figure 31-7 Adding Blog Task Flow Using Resource Palette

    Adding Blog Task Flow Using Resource Palette
    Description of "Figure 31-7 Adding Blog Task Flow Using Resource Palette"

  3. In the Edit Task Flow Binding dialog, click OK to accept the default task flow parameters, or modify the parameters as desired. For information, see Section 31.4.5, "Blog Task Flow Parameters."

  4. Repeat these steps for each blog task flow that you want to comprise your blog.

  5. Save your page and the page definition file, then run your page to your browser by right-clicking the page (not the page definition file) and choosing Run.

Internally, the new blog is given the same name as the folder specified by the resourceID; however, the name visible on the page is the value you specify in the Title parameter of the Blog Banner task flow. Existing files under the folder become blog posts if the Type property of the file is set to Blog Post (for more information about file properties in Content Server, see "Info Update Form" in Oracle WebCenter Content User's Guide for Content Server). As posts are added to the blog at runtime, the blog posts are stored in this folder. See Section 31.4.3, "What Happens at Runtime."

31.4.3 What Happens at Runtime

At runtime, the folder specified by the resourceID parameter for the blog task flow is exposed as a blog on the page:

In a Framework application, any authenticated user can create blog posts, and the posts are displayed on the blog page. Users can perform tasks such as edit, download, comment on blog posts, and so on.

On the default blog page (Figure 31-8), and in the Blog Archives task flow, the Archives section provides links to blog posts by year and by month. Clicking a month displays all blog posts created during that month.

Figure 31-8 A Default Blog Page

A Default Blog Page
Description of "Figure 31-8 A Default Blog Page"

A blog displays various details for each blog post. These include the profile photo of the user who added the blog post, the blog post title, the content, date of creation or modification, name of the user who created or last modified the post, and the number of comments on the blog post. Authorized users can click the Edit Post icon to edit a post, and click the Post comments link to enter comments on a blog post.

Clicking a blog post title opens the blog post to occupy the entire the blog page (Figure 31-9), providing controls to manage the blog post.

When public users (not logged in) view a blog post in a WebCenter Portal: Framework application, they will not see the profile photos associated with each blog post because the anonymous-role that is assigned to public users is not granted permission to view profiles by default (see Table 68-2, "Automated Security Grants for WebCenter Portal Services"). Your system administrator can use the grantPermission WLST command (see "grantPermission" in Oracle Containers for J2EE Security Guide) to allow public users to view profile photos for blog posters. For example:

grantPermission(appStripe=<app-name>, 
  principalClass="oracle.security.jps.internal.core.principals.JpsAnonymousRoleI mpl", 
  principalName="anonymous-role",
  permClass="oracle.webcenter.peopleconnections.profile.security.ProfilePermission", 
  permTarget="/oracle/webcenter/peopleconnections/profile/s8bba98ff_4cbb_40b8_beee_296c916a23ed/.*", 
  permActions="view")

The procedures for managing blogs at runtime in a Framework application are the same as those for managing blogs in a space in WebCenter Portal: Spaces. For information, see the "Working with Blogs" chapter in Oracle Fusion Middleware User's Guide for Oracle WebCenter Portal: Spaces.

31.4.4 Modifying Blog Task Flow Parameters

The procedure for modifying the parameters of a Blogs task flow is the same as any other Documents service task flow. For information, see Section 30.6, "Modifying Content Task Flow Parameters." For information about the parameters that you can modify, see Section 31.4.5, "Blog Task Flow Parameters."

31.4.5 Blog Task Flow Parameters

Each blog task flow has its own set of parameters. You can configure these values when you add the task flow to your page, or modify the values at any time .

The following sections describe the parameters for the blog task flows:

31.4.5.1 Blog Archives Task Flow Parameters

The Blog Archives task flow displays a composite list of blogs based on dates.

Parameters that are unique to the Blog Archives task flow are shown in the Edit Task Flow Binding dialog box when you add the task flow to a page. Table 31-2 describes the Blog Archives task flow parameters.

Table 31-2 Blog Archives Task Flow Parameters

Parameter Description

resourceId

The resource ID of the blog folder (see Figure 31-6), which can be specified in the following formats:

  • connection_name/path_to_folder

    Where, connection_name is the name of the Content Server connection, and path_to_folder is the path to the folder on Content Server that you want to expose as a blog.

  • connection_name#dCollectionID:dCollectionId

    Where, connection_name is the name of the Content Server connection, and dCollectionId is the collection ID of the folder on Content Server that you want to expose as a blog.


31.4.5.2 Blog Banner Task Flow Parameters

The Blog Banner task flow task flow displays a banner for the blog.

Parameters that are unique to the Blog Banner task flow are shown in the Edit Task Flow Binding dialog box when you add the task flow to a page. Table 31-3 describes the Blog Banner task flow parameters.

Table 31-3 Blog Banner Task Flow Parameters

Parameter Description

resourceId

The resource ID of the blog folder (see Figure 31-6), which can be specified in the following formats:

  • connection_name/path_to_folder

    Where, connection_name is the name of the Content Server connection, and path_to_folder is the path to the folder on Content Server that you want to expose as a blog.

  • connection_name#dCollectionID:dCollectionId

    Where, connection_name is the name of the Content Server connection, and dCollectionId is the collection ID of the folder on Content Server that you want to expose as a blog.

imageURL

(Optional) The background image to be used in the blog banner. When not specified, the background image will default to an image provided by the current skin.

title

(Optional) The title to be used for the blog banner.

Default: The blog folder name.


31.4.5.3 Blog Digest Task Flow Parameters

The Blog Digest task flow displays a blog or blog post.

Parameters that are unique to the Blog Digest task flow are shown in the Edit Task Flow Binding dialog box when you add the task flow to a page. Table 31-4 describes the Blog Digest task flow parameters.

Table 31-4 Blog Digest Task Flow Parameters

Parameter Description

resourceId

The target blog resource to display. This can be either a folder ID (see Figure 31-6), in which case the blog listing for this folder will display, or a document ID, in which case the blog post will display.

A folder can be specified in the following formats:

  • connection_name/path_to_folder

    Where, connection_name is the name of the Content Server connection, and path_to_folder is the path to the folder on Content Server that you want to expose as a blog.

  • connection_name#dCollectionID:dCollectionId

    Where, connection_name is the name of the Content Server connection, and dCollectionId is the collection ID of the folder on Content Server that you want to expose as a blog.

Note: To allow users to add new blog posts (by clicking New Post in the task flow), the specified folder must have a security group assigned in Content Server.

year

A four-digit number specifying the target year used to filter blog entries.

Example: 2012

month

A number from 1 to 12 specifying the target month used to filter blog entries. For this parameter to take effect, the Filter Year parameter must also be specified.

Example: 10 (October)

hideComments

Specifies whether the Comments feature is exposed:

  • Selected: Hide the Comments link and pane.

  • Cleared (default): Show the Comments link and pane.

pageSize

The number of blog posts displayed in the Blog Digest Viewer before the Next and Previous icons are enabled.

Default: 10


31.4.5.4 Blog Recent Posts Task Flow Parameters

The Blog sw Posts task flow displays a list of most recent blog posts.

Parameters that are unique to the Blog Recent Posts task flow are shown in the Edit Task Flow Binding dialog box when you add the task flow to a page. Table 31-5 describes the Blog Recent Posts task flow parameters.

Table 31-5 Blog Recent Posts Task Flow Parameters

Parameter Description

resourceId

The resource ID of the blog folder (see Figure 31-6), which can be specified in the following formats:

  • connection_name/path_to_folder

    Where, connection_name is the name of the Content Server connection, and path_to_folder is the path to the folder on Content Server that you want to expose as a blog.

  • connection_name#dCollectionID:dCollectionId

    Where, connection_name is the name of the Content Server connection, and dCollectionId is the collection ID of the folder on Content Server that you want to expose as a blog.

recentPostListSize

The number of recent posts to display.

Default: 10


31.4.5.5 Blogs Task Flow Parameters

The Blogs task flow displays a blog or blog post with a default design.

Parameters that are unique to the Blogs task flow are shown in the Edit Task Flow Binding dialog box when you add the task flow to a page. Table 31-6 describes the Blogs task flow task flow parameters.

Table 31-6 Blogs Task Flow Parameters

Parameter Description

resourceId

The target blog resource to display. This can be either a folder ID (see Figure 31-6), in which case the blog listing for this folder will display, or a document ID, in which case the blog post will display.

A folder can be specified in the following formats:

  • connection_name/path_to_folder

    Where, connection_name is the name of the Content Server connection, and path_to_folder is the path to the folder on Content Server that you want to expose as a blog.

  • connection_name#dCollectionID:dCollectionId

    Where, connection_name is the name of the Content Server connection, and dCollectionId is the collection ID of the folder on Content Server that you want to expose as a blog.

Note: To allow users to add new blog posts (by clicking New Post in the task flow), the specified folder must have a security group assigned in Content Server.

hideComments

Specifies whether the Comments feature is exposed:

  • Selected: Hide the Comments link and pane.

  • Cleared (default): Show the Comments link and pane.

pageSize

The number of blog posts displayed in the Blogs task flow before the Next and Previous icons are enabled.

Default: 10