Sun Java System Portal Server 7.1 Community Sample Guide

Chapter 4 Installing and Configuring the Shared Tasks Portlet

This chapter includes instructions for installing and configuring the shared Tasks portlet on the Community Sample portal.

Installing and Configuring the SharedTasks Portlet

ProcedureTo Install and Configure the SharedTasks Portlet

Before You Begin

Configure the back-end services and gather the required information as described in Chapter 2, Configuring Back-end Services.

  1. Create the portlet WAR file.

    To create the WAR file:

    1. Edit the tokens.properties file to specify customizable parameters for the portlet you are deploying.

      See Appendix C, Tokens for Shared Tasks Portlet for more information.

    2. Type /usr/sfw/bin/ant customize.

      After Portal Server software has been installed, the Shared Tasks application will be under the PortalServer-base/portletapps/sharedtasks directory. If Portal Server has been configured, the shared tasks application will be in PortalServer-DataDir/portletapps/sharedtasks directory.

  2. Load SSO Adapter Template.

    Change directories to PortalServer-DataDir/portletapps/sharedtasks/build/conf directory and type ant -f config.xml to load the SSO Adapter configuration.

  3. Deploy the Portlets.

    1. Create a file containing the password of the amadmin user. For example, type, echo mypassword >/tmp/ampasswd.

    2. Type /opt/SUNWportal/bin/psadmin deploy-portlet -u amadmin -f /tmp/ampassword -p myPortal -i myInstance -g --userinfofile FULL-PATH-TO-userInfoMapping.properties FULL-PATH-TO-sharedtasks.war-FILE.

    3. Restart the container.

  4. Add the Display Profile data to the templates.

    The Shared Tasks portlet must be added to the Community templates to show up in new communities (created after the application has been installed). The template files are located at PortalServer-DataDir/portals/portal-ID/communitytemplates/ by default. Add the DP to the member.xml file in the template's directory.

    For Shared Tasks, do the following:

    1. Add your new channel to the available ones.

      <Available>
      ....
      <Reference value="%COMMUNITY_CONTAINER%/Sharedtasks"/>
      </Available>
    2. Add your new channel to the selected ones.

      <Selected>
      ....
      <Reference value="%COMMUNITY_CONTAINER%/Sharedtasks"/>
      </Selected>
    3. Add the channel definition.

      <Channels>
      ....
      <Channel name="Sharedtasks" provider="_Portlet__sharedtasks.sharedtasks">
      	<Properties>
      		<String name="title" value="Community Calendar Tasks"/>
      		<String name="description" value="Community Tasks Portlet"/>
      		<String name="width" value="thick"/>
      		<String name="__Portlet__ps.communityId" value="|DUMMY"/>
      		<String name="__Portlet__community.calendar.config" value="|DUMMY"/>
      		<Collection name="__Portlet__PreferenceProperties">
      			<Collection name="default">
      				<String name="ps.communityId" value="|DUMMY"/>
      				<String name="community.calendar.config" value="|DUMMY"/>
      			</Collection>
      			<Collection name="isReadOnly">
      				<Boolean name="ps.communityId" value="false"/>
      				<Boolean name="community.calendar.config" value="false"/>
      			</Collection>
      		</Collection>
      		<Collection  name="userInfoDescriptions">
      			<Collection name="timezone">
      				<String name="en-US" value="Preferred User Time Zone"/>
      			</Collection>
      		</Collection>
      	</Properties>
      </Channel>
      </Channels>
  5. Restart the web container.

  6. Login and verify that the service channel is displayed on your desktop.

    1. Go to http://HOST:PORT/portal/dt and select Community Sample.

    2. Log in as test/test and create a new community. Then log out.

    3. Re-log in to the Community Sample portal as test/test.

      The Shared Tasks portlet will be displayed.