Customizing Profiles in IBM Connections 3.0.1

Extending Profiles

This article guides you through the steps of customizing your IBM Profiles implementation, including an overview of how to customize and administer the IBM Connections 3.0.1 Profiles feature.

Share:

Luis A. Guirigay (lguirigay@psclistens.com), Senior IT Architect, PSC Group, LLC

Luis Guirigay photoLuis Guirigay is a senior IT architect focused on administration, high availability/disaster recovery, performance tuning, and support. He has been working with IBM products for more than 14 years and is an IBM Certified Administrator for virtually all versions of IBM Connections, WebSphere Portal, Domino, Sametime, and Quickr as well as an IBM Certified Developer in Domino and IBM Lotus Workflow. He has deep experience with WebSphere Application Server, DB2, Tivoli, and ILWWCM. Luis has published multiple IBM Redbooks related to Domino, Workplace, DB2, and System i, and his speaking engagements include IamLug and Midwest Lotus User Group conferences, Lotusphere, Chicago Lotus User Group, and multiple IBM PoT and IBM workshops in the United States. You can follow Luis on Twitter @Lguiriga.



28 August 2012

Also available in Chinese Russian

IBM Connections Profiles comes with a default set of attributes that you can use to find other users in your organization. These attributes allow users to enter information relevant to their positions, geographical location, background, and more.

Some organizations might find this core set of attributes sufficient. Others will need to provide additional attributes so that users can include information relevant to the them and the organization.

Adding new extension attributes

In this article, you learn how to add two new attributes to store Twitter and LinkedIn accounts so that other employees can follow and connect with each other on those sites.

IBM Connections and WebSphere Cells

When checking out configuration files, you should know the name of the IBM WebSphere Cell in which IBM Connections has been implemented. If you don't have this information, you can get it dynamically using the AdminControl.getCell()—for example:

ProfilesConfigService.checkOutConfig("d:/temp", AdminControl.getCell())

When working with IBM Connections, the first step is to start the IBM WebSphere® administrative scripting tool (wsadmin) client and check out the required configuration files. Doing so allows you to validate all configuration changes before they go into production. Perform the following steps:

  1. Start the wsadmin client from the following directory of the system on which you installed Deployment Manager:
    D:\<WAS_ROOT>\profiles\Dmgr01\bin>wsadmin.bat -lang jython -user wasadmin
    -password yourpassword
  2. Start the Profiles Jython script interpreter:
    wsadmin>execfile("profilesAdmin.py")
  3. Check out the Profiles configuration file:
    wsadmin> ProfilesConfigService.checkOutConfig("d:/temp", "CONNECT02Cell01")
  4. Create a security copy of the Profiles configuration file, profiles-config.xml, as shown in Figure 1, and keep it handy in case you cannot check the modified files back in.
    Figure 1. Checked-out Profiles configuration files
    Image showing checked-out Profiles configuration files

    Click to see larger image

    Figure 1. Checked-out Profiles configuration files

    Image showing checked-out Profiles configuration files
  5. Open profile-config.xml, and add the following lines at end of the profileExtensionAttributes section.

    These lines declare the new extension attributes and their length.

    Click to see code listing

    <profileExtensionAttributes>
    	...
    	<simpleAttribute extensionId="twitterid" length="40"<simpleAttribute extensionId="linkedinid" length="40"
    </profileExtensionAttributes>
  6. Add the following lines inside the contactInformation section.

    This addition defines where the new extension attributes will be shown.

    <profileLayout profileType="default">
    <jobInformation>
    	...
    	</jobInformation>
    	<contactInformation>
    	...
    	<extensionAttribute showLabel="false" editable="true" 
    		extensionIdRef="twitterid"<extensionAttribute showLabel="false" editable="true" 
    		extensionIdRef="linkedinid" 	...
    	</contactInformation>
    	...	
    </layoutConfiguration>
  7. Save and close the file and check it back in:
    wsadmin>ProfilesConfigService.checkInConfig()

    If the changes you made to the profiles-config.xml file were correct, you should see something like this:

    Using configuration arguments :
            workingDirectory: d:/temp
            cellName: CONNECT02Cell01
            nodeName: None
            serverName: None
    Loading schema file for validation: /d:/temp/profiles-config.xsd
    d:/temp/profiles-config.xml is valid
    Profiles configuration file successfully checked in
  8. Exit from the wsadmin client (optional):
    wsadmin>exit
  9. Restart the Profiles application (see Figure 2):
    1. Open the WebSphere Integrated Solutions Console (ISC).
    2. Click Applications > Application Types > WebSphere enterprise applications.
    3. Select Profiles, then stop and start the application.
    Figure 2. Restarting the Profiles application
    Image showing how to restart the Profiles application

    Click to see larger image

    Figure 2. Restarting the Profiles application

    Image showing how to restart the Profiles application

As shown in Figure 3, you should now see the two new extension attributes being added to the Profiles page.

Figure 3. New extension attributes
Image showing new extension attributes

Click to see larger image

Figure 3. New extension attributes

Image showing new extension attributes

Adding custom labels

With the new custom attributes in place, you need to define the label that appears next to the attribute. To do so, perform the following steps:

  1. Start the wsadmin client from the following directory of the system on which you installed the Deployment Manager:
    D:\<WAS_ROOT>\profiles\Dmgr01\bin>wsadmin.bat -lang jython -user wasadmin
    -password yourpassword
  2. Start the Profiles Jython script interpreter:
    wsadmin>execfile("profilesAdmin.py")
  3. Check out the Profiles configuration file:
    wsadmin> ProfilesConfigService.checkOutConfig("d:/temp", "CONNECT02Cell01")
  4. Open profiles-config.xml, and change showLabel to True and the labelKey property:
    <extensionAttribute showLabel="true" editable="true" 
    	labelKey="label.custom.twitterid" 
    	extensionIdRef="twitterid" bundleIdRef="custom" /> 
    <extensionAttribute showLabel="true" editable="true" 
    	labelKey="label.custom.linkedinid" 
    	extensionIdRef="linkedinid" bundleIdRef="custom" />
  5. Save profiles-config.xml, and check the file in:
    wsadmin>ProfilesConfigService.checkInConfig()

Now, add the resource bundle to the IBM Connections configuration file. You must also check out the IBM Connections configuration file, LotusConnection-config.xml:

  1. Start the IBM Connections Jython script interpreter:
    wsadmin>execfile("connectionsConfig.py")
  2. Check out the IBM Connections configuration file:
    wsadmin>LCConfigService.checkOutConfig("d:/temp","CONNECT02Cell01")
  3. Open LotusConnections-config.xml and add the following line (shown in bold):
    <config buildlevel="LC3.0.1_20110317_1228" id="LotusConnections"...
    ...
    <resources>
    	<widgetBundle prefix="custom" name="label.custom.resources"/>
    </resources>
    <config>
  4. Check LotusConnections-config.xml in:
    wsadmin>LCConfigService.checkInConfig()
  5. Create a file named label.custom.resources.properties under the customization\strings directory, and add the following lines:
    label.custom.twitterid=Twitter
    label.custom.linkedinid=LinkedIn URL
  6. Restart the IBM Connections server.

You should now be able to see the right label next to the extension attributes, as shown in Figure 4.

Figure 4. Custom labels
Image showing custom labels

Finding the path to the customization directory

If you don't know the path to the customization directory, open the WebSphere ISC and click Environment > WebSphere variables. Look for CONNECTIONS_CUSTOMIZATION_PATH.

When adding extension attributes, there are additional properties you can use (shown in Table 1) that will allow you to achieve a higher level of customization. For more information about these properties and how to make an extension attribute required during validation, see Resources.

Table 1. Attribute properties
PropertyDetails
editableSpecifies whether users can edit the extension attribute. This attribute takes a Boolean value.
showLabelSpecifies whether to display a label for the extension attribute in the user interface (UI). The attribute takes a Boolean value.
hideIfEmptySpecifies whether to hide the attribute if it does not have a value. This attribute takes a Boolean value.
linkThis attribute takes a Boolean value.
prependHtmlSpecifies the HTML code prefixed to the value. This attribute takes a string value.
appendHtmlSpecifies the HTML code appended to the value. This attribute takes a string value.

Now that you have added your extension attributes, make them searchable. This process allows users to perform searches against new attributes. You can add or remove attributes based on how often they're used, regardless of whether the information stored in them is relevant. Figure 5 shows the default Profiles Search page.

Figure 5. Default search page
Image showing the default search page

Click to see larger image

Figure 5. Default search page

Image showing the default search page

In this section, you make the following changes:

  • Include the Twitter Id attribute you added earlier.
  • Remove the City, State, Country, and Phone Number attributes.

To make these changes, perform the following steps:

  1. Start the wsadmin client from the following directory of the system on which you installed the Deployment Manager:
    D:\<WAS_ROOT>\profiles\Dmgr01\bin>wsadmin.bat -lang jython -user wasadmin
    -password yourpassword
  2. Start the Profiles Jython script interpreter:
    wsadmin>execfile("profilesAdmin.py")
  3. Check out the Profiles configuration file:
    wsadmin> ProfilesConfigService.checkOutConfig("d:/temp", "CONNECT02Cell01")
  4. Open profiles-config.xml and locate the searchLayout section. Add the changes shown in bold:
    <searchLayout>
        	<attribute showLabel="true">displayName</attribute>
        	<attribute showLabel="false">preferredFirstName</attribute>
        	<attribute showLabel="false">preferredLastName</attribute>
        	<attribute showLabel="true">profileTags</attribute>
        	<attribute showLabel="true">jobResp</attribute>
        	<attribute showLabel="false">experience</attribute>
        	<attribute showLabel="false">background</attribute>
        	<attribute showLabel="true">organizationTitle</attribute>
    	<extensionAttribute showLabel="true" 
    		labelKey="label.custom.twitterid" bundleIdRef="custom" 
    		extensionIdRef=" twitterid" />
          	<!--<attribute showLabel="false">workLocation.city</attribute> -->
        	<!--<attribute showLabel="false">workLocation.state</attribute> -->
        	<!--<attribute showLabel="false">countryDisplayValue</attribute> -->
        	<attribute showLabel="false">email</attribute>
        	<!--<attribute showLabel="false">telephoneNumber</attribute> -->
    </searchLayout>
  5. Save and check in the profiles-config.xml configuration file.
    wsadmin>LCConfigService.checkInConfig()
  6. Restart the Profiles application.

Figure 6 shows the search page with the final changes.

Figure 6. Default search page after changes
Image showing the default search page after changes

Postcustomization recommended steps

IBM recommends caching static design elements, such as cascading style sheet files and scripts, to improve performance. So, you must update the version stamp of your IBM Connections deployment after making changes related to the UI. Not performing this step requires users to delete their browser cache, which might be painful for some organizations.

Cache design elements any time you change colors and themes, change labels, or add or remove extension attributes. The caching process is quite easy: You simply check out the LotusConnections.xml configuration file and update the time stamp:

  1. Start the wsadmin client from the following directory of the system on which you installed the Deployment Manager:
    D:\<WAS_ROOT>\profiles\Dmgr01\bin>wsadmin.bat -lang jython -user wasadmin
    -password yourpassword
  2. Start the IBM Connections Jython script interpreter:
    wsadmin>execfile("connectionsConfig.py")
  3. Check out the IBM Connections configuration file:
    wsadmin>LCConfigService.checkOutConfig("d:/temp","CONNECT02Cell01")
  4. Update the value of the versionStamp property:
    LCConfigService.updateConfig("versionStamp","")
  5. Check in LotusConnections-config.xml:
    wsadmin>LCConfigService.checkInConfig()

Updating the date and time on the system

Using an empty string updates the file to the latest date and time on the system. If you want to enter this information manually, you must do it in the format yyyyMMdd.HHmmss (time must be specified in GMT).


Conclusion

At this point, you should be ready to start making to your Profiles implementation. This article guided you through all the necessary steps to extend your Profiles deployment and include (or remove) all attributes that will make your environment more useful and adapted to your organization. It also covered the process to customize the Profiles Search page, which will help your users fully utilize the new extension attributes. Last but not least, you learned what is also required to refresh the UI on all users' machines without user intervention.

Resources

Learn

Get products and technologies

Discuss

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into IBM collaboration and social software on developerWorks


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Lotus
ArticleID=828240
ArticleTitle=Customizing Profiles in IBM Connections 3.0.1
publish-date=08282012