Sun Java System Portal Server 7.2 Technical Reference

Chapter 81 Discussion Provider

This chapter describes about the Discussion Provider. The sections available in this chapter are:

Overview of Customizing the Discussion Provider

The DiscussionProvider is JSPProvider based and hence customizable. It uses the Desktop themes. It retrieves data from the back end Search service using search taglibs and API. The discussions and comments are stored as separate Resource Descriptors (RDs) in the discussion database.

The DiscussionProvider includes features such as discussion threads, starting discussions based on documents or new topics, searching discussions, and rating discussions. By default, the Discussions channel is available on the sample portal for anonymous users. However, an anonymous user cannot subscribe to a discussion or edit the Discussion channel.

The DiscussionProvider supports a full view (through the Discussions channel) and a lite view (through the DiscussionLite channel.) It has the following main functions:

A Discussion Lite view retrieves main posts sorted by last-modified date and has pagination so users can access older discussions. View discussion displays each discussion subtree. The main item is displayed in detail and the subtree is displayed below the main item.

View discussion includes:

Expansion threshold helps to control displayed items in the subtree. The users can choose to expand only highly rated documents, or expand all or collapse all. Default value is collapse all. Expand all will expand all the filtered comments. It will also show a description of the discussion, provide a menu for rating the discussion, and allow the user to post a reply.

Discussion Service Channels

The DiscussionLite channel and the Discussions channel are based on the DiscussionProvider.

DiscussionLite Channel

The DiscussionLite channel displays the top twenty discussion titles (which can be reconfigured) and the date. The discussions are sorted by creation date (last modified) and the newest discussion is displayed first. The DiscussionLite channel view has links to view each discussion, view all discussions, and start a new discussion. All these links target the Discussions channel which gets displayed in the JSPDynamicSingleContainer.

Properties for this channel can be configured from the administration console. By default, there are no user editable properties for this channel.

Discussions Channel

The Discussions channel includes a full view that:

Customizing the Discussion Channels

ProcedureTo Display Additional Fields in the List View of Discussions

  1. Change directories to PortalServer-DataDir/portals/portal-ID/desktop/default/DiscussionProvider.

  2. Modify query.jsp file and add xxx field to viewAttributes.

    For example, add content-length as follows:


    <search:setViewAttributes viewAttributes= "url,title,description,rd-rating,author,last-modified,rd-last-changed,rd-reference-id, rd-num-rating,rd-sum-rating,rd-peak-rating,rd-reference-url,htmldesc,content-length"/>
  3. Add the new fields in fullDiscussionDisplay.jsp file wherever appropriate.

    For example:


    <search:getValue soifAttribute="content-length"/>

ProcedureTo Modify the Sort Order in List All Discussions Page

  1. By default, discussions are sorted by the last-modified date/time. That is, discussions are displayed in a descending order with the latest or most recent discussion shown first.

    To modify the sort order in list All Discussions page, modify the viewOrder property in fullDiscussion.jsp file. For example, you can reset the value below to author or rd-last-changed:


    <jx:set var="viewOrder" value="-last-modified"/>

ProcedureTo Inherit Classification and readACL

If you have classified only the parent discussion manually or modified the access control for the parent discussion, you may want to inherit those values in discussion replies as follows:

  1. Change directories to PortalServer-DataDir/portals/portal-ID/desktop/default/DiscussionProvider.

  2. Edit feedbackProcess.jsp file and modify the values of inheritClassification and inheritReadACL.

    By default, these are set to false. Reset them to true if you want comments to inherit the parent’s classification field and readACL field. Note that comments are automatically protected in this case.

  3. Save the file.

  4. Run the touch command.

    For example, type touch *.jsp.

ProcedureTo Control Access to Discussions

This can be accomplished by one of the following two ways:

  1. Modify the dbname property in the display profile for Discussions channel for each role to point to a different database.

    In this case users in one role cannot view discussions created by users in a different role.

ProcedureTo Access Discussions Channel Directly

  1. Type the following URL in your browser:


    http://server:port/portal/dt?provider=JSPDynamicSingleContainer&JSPDynamicSingleContainer.selectedChannel=Discussions&last=false&action=content