The Blog portlet allows portal users to manage weblog posts from a
portal page. Users can create, edit, and delete weblog entries. Additionally, this portlet provides
a simplified interface for creating weblogs and weblog user accounts.
The Blog portlet is a client of an existing weblog server and
it is not a weblog server or service itself. Specifically, it requires
Roller Weblogger version 3.1. The Portal Server software installer does not install Roller. See
Installing Roller for installation information.
The Blog portlet utilizes the Atom Publishing Protocol (APP) for managing weblog posts. APP is
the only standard protocol for weblog post management. Support for weblog servers
other than Roller is not planned for this release of the Blog portlet.
Blog portlet also includes limited management of weblog server resources. The portlet allows
users to create weblog server user accounts and weblogs, utilizing the Atom Admin Publishing Protocol (AAPP).
You should already be familiar with weblogs, the APP and AAPP protocols, Roller,
and Sun Java System Portal Server software. It is assumed that you understand
these concepts and technologies.
The Blog portlet creates Roller weblogs and users in a flat space.
Such weblog server resources are not name-spaced by the Portal ID or any
other identifier. The desired deployment is therefore one Roller server instance per portal.
Figure 1: One Roller Server Instance per Portal
You can use a single Roller server instance for multiple portals.
Figure 2: One Roller Server Instance for Multiple Portals
In this situation, users in Portal A and B are not allowed
to have like-named weblogs. In a community context, users are unable to
have the community Blog service in like-named communities because the Blog portlet names
the per-community weblog according to the community name.
Roller Installation
Download Roller from the Roller project download page and refer to the Roller
Weblogger project page for the detailed steps of installing and configuring Roller. Support files can be found
at the Roller java.net support project download page. As part of Roller installation, you
must configure a relational database and deploy a web application.
To test them, use the authget.sh, authpost.sh, authput.sh, and authdelete.sh scripts available from
the Blogapps Examples java.net project page. These scripts are command line utilities to do HTTP GET,
POST, PUT, and DELETE operations with HTTP basic authentication. Since the APP and AAPP
protocols are XML over HTTP web services that use the standard HTTP operations,
you can fully interact with them.
Example 1 Validate APP Endpoint
To validate that the APP endpoint is enabled, do an HTTP GET on
the endpoint URLs as shown in the following example.
The Portal Server software deploys the Blog portlet, but you must manually configure
because the Blog portlet requires a properly configured Roller server instance. Until the
Roller server is running, the Blog portlet cannot be used.
Configuring the Portlet Preferences for the Blog Portlet
Depending on the desired use case (see Use Cases) for Blog portlet, some
or all of the portlet preferences must be set. See Portlet Preferences for a
description of the portlet preferences. You can configure these preferences at the provider or
channel level.
To configure:
At the provider level, download the top level display profile, edit the XML directly, and then upload the display profile. Alternatively, you can create a display profile document that contains only the required changes and then run the psadmin modify-display-profile command with the --combine option to insert the modifications.
For example, to set the AAPP user name and password preferences:
Note - If you plan to configure the Blog community service, you must configure the Blog portlet's preferences at the provider level.
At the channel level, create a Blog portlet channel first. You can then edit the preferences from either the Portal Server management console or by using the psadmin command-line utility.
Blog portlet can now be used outside of a community context. You
can create channels based on this portlet using the psadmin command-line utility or from
the Portal Server management console.
When used in conjunction with Portal Server's Community Sample, the Blog portlet provides
for a per community weblog. Only community members can post to the weblog.
If the Roller server user interface is left directly accessible, then all weblogs,
including community weblogs, are visible to any user with access to the Roller
server. Set up the Roller server in a headless configuration that only exposes
the APP and AAPP endpoints. Refer to documentation in the Roller project page fore
more information.
The Blog community service is not enabled by default (see Enabling Blog Community Service for more
information on how to enable the Blog community service). When you create a
new community that contains the Blog community service, Blog provisioning occurs.
Blog provisioning prepares a weblog for use within a newly created community. It
performs the following steps automatically when a new community is created.
Creates a community-specific, shared weblog user account.
Creates a community-specific weblog.
Adds the user account as a member of the weblog.
Sets various portlet preferences according to the weblog and weblog user account created in steps 1 and 2.
Note - If the community-specific weblog already exists, it is used as is. If the
shared weblog user account already exists, it's properties are reset to those expected
by the Blog community service.
The community weblog's handle (its unique identifier) is equal to the community name.
A weblog also has a description and various other properties. These are all
set to generic default values when the weblog is created by provisioning. The
values can be changed later by accessing the Roller server directly.
The APP entries URL, and the user name and password of the
shared user, are set into the preferences of the community display profile.
Therefore, all community users get these preferences and the community blog service accesses the
community weblog with the credentials of the shared user account. The author of
new weblog posts is the shared user.
If community users wish to access the weblog with a personalized (nonshared) weblog
user account, they can do so by editing the Blog portlet. When
editing the Blog portlet, the user can either create a new weblog user
account or specify an existing one and add the user to the community
weblog as a member. Once users personalize their weblog user account settings, they
cannot revert to the shared user account.
By default, when personalized by a community owner, the weblog user account is
added as a member of the community weblog with the administrator role. When
personalized by a community member, the user account is added with the
author role. This behavior is controlled by the memberPermission portlet preference
(see Portlet Preferences for more information).
If community users wish to customize the community weblog properties such as description
and locale, they can do so by accessing the Roller weblog server directly.
The default access URL for the Roller server is http://<server>[:<port>]/roller. The
authenticating user must have the admin role in a weblog to modify
weblog properties.
Portal community users can access the Roller weblog server directly (if it is
configured to allow it). From there, they can post and otherwise manage the
weblog entries of the Portal community weblogs (of which they are a member).
Enabling Blog Community Service
Make sure that the Blog portlet's preferences in the display profile provider definition
are correctly configured to talk to the Roller server. To test this, create
a channel based on the Blog portlet. Without customizing the portlet channel's preferences,
you must be able to use the channel to access weblogs on the
server.
The portlet preferences you configure in Blog portlet's display profile provider definition will
be used by the Blog service in all communities. For example, the Roller
AAPP URL and AAPP password is used by the Blog community service in
every community.
The Blog community service is not enabled by default. The process for doing
so varies depending on whether the Portal Server 7.1 update 1 software instance
is a new install or upgraded from Portal Server 7.1 software. To enable
the Blog community service, ensure that the Blog community service is added to
a community template.
To Enable Blog Community Service for a New Install
For the community template with an ID of blogwiki, edit the community template
role display profiles for the member (member.xml) and owner (owner.xml) roles and
remove the XML comment blocks around the following Blog portlet elements.
The DP channel entry for the Blog channel in both member.xml and owner.xml files.
The community container's available and select channel lists in member.xml file.
The search service's availableDatabases property in member.xml file.
To Enable Blog Community Service for an Upgraded Install
To enable Blog community service for an upgraded install, add the Blog community
service to the existing community templates by following the steps in this section.
Select a template in which to add the Blog community service and add
the following Blog channel definition to the community template member role display profile.
With these changes, newly created communities based on the modified template contain the
Blog community service. You must log out and log in to force the
community templates to be reloaded.
The Blog portlet has the following use cases. These use cases are
accomplished through a combination of the portlet's edit mode and the configMode portlet preference.
Admin configured
The portlet is configured by the portal administrator and can not be configured by the user. The admin configured mode expects that the portal administrator has configured the portlet for a group of portal users. For example, a portal administrator can add and configure the Blog portlet in an Access Manager role, giving all users with that role access to post to a shared weblog. No provisioning is performed. The portal administrator must ensure that the weblog server resources (weblog and weblog user account) exist.
This mode is configured by disabling the portlet's edit mode. If the portlet cannot be edited, the user cannot personalize the portlet in any way. By default, Blog portlet's deployment descriptor enables edit mode. To turn it off, set the value of the isEditableByMimeType property to false for Blog portlet's display profile provider.
All of the other configuration modes assume that the portlet is editable.
Manual configured
The portlet is configured directly by the user. The user can point to an existing weblog with an existing weblog account. No provisioning occurs. The manual configured mode allows the user to enter the weblog APP entries URL and their weblog user account credentials into a simple form. The user can personalize the Blog portlet to point to any weblog they wish.
This mode is configured by making the portlet editable and by setting the configMode preference (see Portlet Preferences) to manual.
Wizard configured
The portlet is configured by the user, walking them through a wizard to gather the various parameters. The purpose is to allow them to choose an existing weblog user account or create one, and choose an existing weblog or create one. The weblog is provisioned based on the user's input. As opposed to the manual configuration mode, the wizard configured mode allows the user to enter a weblog handle only and not the weblog APP entries URL. The implication is that in wizard configured mode, users cannot vary the weblog server, only the weblog handle within the administrator configured weblog server.
This mode is configured by setting the configMode preference to wizard. This mode assumes that the portal administrator has configured valid APP and AAPP URLs into the portlet. Both are required. If not set, this mode is not accessible and defaults back to manual.
Wizard-user-only configured
The wizard-user-only configured mode is the same as wizard configured mode, but the user is only allowed to provision a weblog user, not a weblog. The wizard-user-only configured mode is the same as wizard configured mode, except that the weblog-related steps in the wizard are skipped. The user can only enter an existing weblog user account, or create a new one. They cannot change the weblog handle, or create a new weblog.
This mode is configured by setting the configMode preference to wizard-user-only. When used in conjunction with Portal Server software's community feature, Blog portlet must be set up in wizard-user-only configured mode.
Configuring Search
Weblog entries that are posted or modified by the Blog portlet are
indexed into Portal Server's search server and Roller's embedded search engine (Lucene). Posts
that are made or modified directly on the Roller server are not
indexed into Portal Server's search engine. They are only indexed into Roller's embedded search
engine. Portal Server's search server can be made to crawl the Roller server,
but the indexes are not protected and segregated per community. You can disable
search functionality by resetting the searchUrl portlet preference. See Portlet Preferences for more information.
Enabling the APP and AAPP endpoints in Roller should be carefully considered. Communication
with these endpoints requires an unencrypted user name and password to be passed
over the network (for HTTP basic authentication).
The AAPP endpoint allows removal or modification of any weblog or user account
on the server. The APP endpoint allows removal or modification of any weblog
entry or resource for which the authenticating user has access. If unencrypted credentials
are a concern, consider running SSL on the Roller APP and AAPP endpoints.
Password Storage
APP and AAPP passwords are stored in Blog portlet's preferences. These passwords can
either be stored in plain or DES 56-bit encrypted strings. If the portlet
preference encryptedPasswords is set to true, then the portlet assumes that
passwords are encrypted, otherwise it assumes plain passwords. The default setting is
plain passwords, encryptedPasswords=false.
If encrypted passwords are enabled, the value for the APP user password is
encrypted automatically as it is submitted by the user from the portlet's user
interface. If passwords are entered directly, then they must be manually encrypted. Passwords
can be entered directly by editing the portlet preferences in the Portal Server
management console, or by editing the preferences in the community template role display
profile.
To encrypt a plain password, use the supplied command line utility class:
com.sun.portal.app.blog.password.Password. For example, to encrypt a password:
The resulting string printed to standard out can be used as aappUserPassword
and appUserPassword preference values.
Note - If the path for the passwords.key file is set, navigate to the directory
where the blog portlet is deployed (such as, /space/appserver/domains/domain1/applications/j2ee-modules/blogportlet if the application server
is installed in /space), and then, run the java command.
Portlet Preferences
This section describes Blog portlet's portlet preferences.
appUrl
Set this to the APP endpoint of the Roller server instance. If not set, the portlet assumes manual configuration mode, regardless of the configMode preference value. To set this, specify the HTTP or HTTPS URL, or the empty string. By default, this is set to http://localhost:8080/roller/roller-services/app.
appEntriesUrl
Set this to the APP entries URL of the weblog that the portlet should manage. This preference can either be configured by the portal administrator for a group of users (per organization, per role), entered directly by the user (in manual configuration mode), or derived from the appUrl and handle preferences (in wizard configuration modes). Blog provisioning sets this preference to point to the community weblog. To set this, specify the HTTP or HTTPS URL. By default, this is set to http://localhost:8080/roller/roller-services/app/entries/junkyard.
appUserName
Set this to a Roller user name that has author privileges on the weblog pointed to by the preference appEntriesUrl. This preference can either be configured by the portal administrator for a group of users (per organization, per role), entered directly by the user (in manual configuration mode), or gathered from the user (in wizard configuration modes). Blog provisioning sets this preference to point to the shared weblog user account for the community. To set this, specify the Roller user name. By default, this is set to jtb.
appUserPassword
Set this to the password of the user account pointed to by the preference appUserName. This preference can either be configured by the portal administrator for a group of users (per organization, per role), entered directly by the user (in manual configuration mode), or gathered from the user (in wizard configuration modes). Blog provisioning sets this preference to the generated, random password of the shared community weblog user account. The password can be plain or encrypted depending on the value of the encryptedPasswords preference. To set this, specify the Roller user password. By default, this is set to iplanet.
aappUrl
Set this to the AAPP endpoint of a Roller server instance. If not set, the portlet assumes manual configuration mode regardless of the configMode preference value. To set this, specify the HTTP or HTTPS URL, or the empty string. By default, this is set to http://localhost:8080/roller/roller-services/aapp.
aappUserName
Set this to a Roller user account name that has the admin role in Roller. By default, this is set to jtb.
aappUserPassword
Set this to a password that matches the user account set in the aappUserName preference. The password should either be plain or encrypted depending on the value of the encryptedPasswords preference. To set this, specify the Roller user password for the user specified in the aappUserName preference. By default, this is set to iplanet.
handle
Set this to the weblog handle of the weblog pointed to by the appEntriesUrl preference. This preference is only relevant when the portlet is in wizard or wizard-user-only configuration mode. It can otherwise be left blank. To set this, specify the Roller weblog handle. By default, this is set to junkyard.
configMode
Set this according to the desired configuration mode. This preference is set to wizard-user-only mode in the community templates. Values can be manual, wizard, or wizard-user-only. For more information, see Use Cases. By default, this is set to manual.
memberPermission
Set this to the role that should be given when user accounts are added as members to weblogs in wizard or wizard-user-only configuration modes. This preference is set to ADMIN in the community templates for the owner, and AUTHOR in community templates of the members. Values can be ADMIN, AUTHOR, or VISITOR. By default, this is set to AUTHOR.
userUrl
Set this to the user access URL of a Roller server instance. This preference is used to give end users a link to the Roller server instance. To set this, specify the HTTP or HTTPS URL By default, this is set to http://localhost:8080/roller.
searchUrl
Set this the URL of a Portal search server instance. If not set, the portlet will not index weblog posts. In the community template, the value of this preference is a token that is replaced when the community is created. To set this, specify the HTTP or HTTPS URL. By default, this is set to http://localhost/search1/search.
searchDatabase
Set this to the name of the search database to use to index blog entries. In the community template, the value of this preference is a token that is replaced when the community is created. Values for this must be a string. By default, this is set to blog.
encryptedPassswords
Set this to true to assume encrypted password storage, or false for plain password storage. See Configuring Security for more information. To set this, specify the boolean value of true or false. By default, this is set to false.
pageSize
Set this to the number of weblog entries to display per page. The value is an integer. By default, this is set to 8.
refreshInterval
Set this to the number of seconds to delay weblog content refresh. A value of 0 refreshes weblog content on every page refresh. A value of -1 means never refresh. When the user modifies weblog content through the portlet (post, edit, delete), the content is refreshed regardless of the refresh interval. The value is an integer. By default, it is set to 1200.