Skip to main content link. Accesskey S
  • Anonymous
  • Log on
  • Help
  • IBM logo
  • IBM Connections wiki
  • All Wikis
  • Home
  • Community Articles
  • Product Documentation
  • Learning Center


Search

Advanced Search
IBM Translated Product Documentation...

 IBM Connections 3.0.1 documentation

 IBM Connections 3.0.1 Javadoc
 IBM Translated Product Documentation

Tag Cloud

  • 1.0
  • 1.0.x
  • 2.0
  • 2.0.1
  • 2.0.1.1
  • 2.0_media
  • 2.5
  • 2.5_deployment
  • 2.5_media
  • 2.5_performance
  • 3
  • 3.0
  • 3.0.1
  • 3.0.1_media
  • 3.0_media
  • 3_deployment
  • 8.1.1
  • 8.2
  • activities
  • administrators
  • api
  • best_practices
  • blogs
  • bookmarks
  • business_card
  • cluster
  • communities
  • community
  • community_manager
  • connections
  • connections_3
  • connections_301
  • customization
  • customize
  • customizing
  • demos
  • deploying
  • deployment
  • deployments
  • developers
  • dogear
  • Domino
  • Edge server
  • education
  • error messages
  • files
  • forums
  • getting_started
  • Help
  • home
  • home_page
  • homepage
  • how-to
  • HTTP server
  • ibm
  • index
  • installation
  • integration
  • iOS
  • ipad
  • iWidget
  • J2EE
  • javadoc
  • lc3.0
  • learning
  • lotus-connections
  • mml
  • mobile
  • Notes
  • performance
  • person_card
  • Portal
  • portlet
  • portlet_factory
  • profiles
  • proxy server
  • quickr
  • Redbooks
  • rest
  • reverse proxy server
  • Sametime
  • scenarios
  • search
  • security
  • self-paced
  • SSO
  • tags
  • test_infrastructure
  • troubleshooting
  • tuning
  • video
  • VideoFest
  • videos
  • WAI
  • WAS
  • web_seminar
  • WebAppIntegrator
  • WebSphere
  • widgets
  • wikis
InformationInformation
You are currently viewing machine translated content. IBM translation might be available. Click IBM Translated Product Documentation to see what is available.X


Home > IBM Connections 3.0.1 documentation > Enabling custom extension attributes for Profiles
Rate this article 1 starRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars
(Current editable edition)
Original noneditable edition
Current editable edition
(Original noneditable edition)

Enabling custom extension attributes for Profiles 

expanded Abstract
collapsed Abstract
Extend the Profiles application by adding custom extension attributes.



Extend the Profiles application by adding custom extension attributes.

Before you begin

To edit configuration files, you must use the wsadmin client. See Starting the wsadmin client for information about how to start the wsadmin command-line tool.

About this task

In addition to different attribute layouts, Profiles supports extension attributes for every profile type. Because all profiles share one schema, an extension attribute, such as customers, has the same semantic meaning for all profile types. However, you can choose to associate a particular attribute with a profile based on profile type. The user interface configuration, including display characteristics and whether an attribute can be edited, is also configurable for extension attributes based on profile type.

You can enable custom extension attributes by adding them to the My Profile page. The attributes that display on the My Profile page are specified using the profiles-config.xml file located in the <was_profile_root>config/cells<cell_name>/nodes/<node-name>/LotusConnections-config directory. Although changes to profiles-config.xml should generally be made using wsadmin client scripting, there are no wsadmin commands to modify the profilesDataModel, so you can make changes to the profilesDataModel using a text editor.

There are three child elements under the profileDataModel element that correspond to the three sections in the My Profile page in Profiles: jobInformation, contactInformation, and associatedInformation. The order in which the attributes display in the file reflects the order in which they display in the form. This correspondence means that you can easily reorder the attributes without needing to modify any JSP files.

The extension attributes that you define are always included as links in the output of the Profiles API unless you specify otherwise in the profiles-config.xml file, as described in step 7 below. For more information about retrieving Profiles extensions through the API, see Retrieving profile extension data.

Procedure

To add a custom extension attribute to the My Profile page, perform the following steps.
  1. Start the wsadmin client from the following directory of the system on which you installed the Deployment Manager:
    • app_server_root\profiles\<dm_profile_root>\bin

      where <app_server_root> is the WebSphere® Application Server installation directory and <dm_profile_root> is the Deployment Manager profile directory, typically dmgr01.

      You must start the client from this directory or subsequent commands that you enter do not execute correctly.
  2. Start the Profiles Jython script interpreter.
    1. Enter the following command to access the Profiles configuration files:
      • execfile("profilesAdmin.py") If prompted to specify a service to connect to, type 1 to pick the first node in the list. Most commands can run on any node. If the command writes or reads information to or from a file using a local file path, you must pick the node where the file is stored.
    2. Enter the following command to check out the Profiles configuration files:
      • ProfilesConfigService.checkOutConfig("<working_directory>", "<cell_name>")where:
        • <working_directory> is the temporary working directory to which the configuration XML and XSD files are copied and are stored while you make changes to them. Use forward slashes (/) to separate directories in the file path, even if you are using the Microsoft Windows operating system.
          • Note: AIX and Linux only: The directory must grant write permissions or the command does not complete successfully.
        • <cell_name> is the name of the WebSphere Application Server cell hosting the Profiles application. This argument is required. It is also case-sensitive, so type it with care. If you do not know the cell name, you can determine it by typing the following command in the wsadmin command processor: print AdminControl.getCell()
        For example:
        • AIX or Linux:
          • ProfilesConfigService.checkOutConfig("/opt/prof/temp","foo01Cell01")

        • Microsoft Windows:
          • ProfilesConfigService.checkOutConfig("c:/prof/temp","foo01Cell01")

  3. Save a copy of the profiles-config.xml file.
  4. Open the file in a text editor.
  5. To define the extension attribute, add it to the <profileExtensionAttributes> element under <profileDataModels> as follows:
    • <profileDataModels>	
        <profileExtensionAttributes>
          <simpleAttribute extensionId="property1" length="64"/>
          <simpleAttribute extensionId="property2" length="64"/>
          <simpleAttribute extensionId="property3" length="64"/>
        </profileExtensionAttributes>
       
        <profileDataModel>
      ...
        </profileDataModel>
      ...
      </profileDataModels>


      For example:

      <profileDataModels>
        <profileExtensionAttributes>
         ...
          <simpleAttribute extensionId="spokenLang" length="64" />
          <simpleAttribute extensionId="TechExperience" length="64" />
          <simpleAttribute extensionId="officeAddress" length="64" />
          <simpleAttribute extensionId="homeAddress" length="64" />
       
        </profileExtensionAttributes>
      </profileDataModels>

  6. To display the extension attribute, you need to associate it with a profile type. To do this, add the following line of code as a child element under the relevant profileType element, and under the appropriate page section, jobInformation, contactInformation, or associatedInformation:
    • <extensionAttribute showLabel="true" editable="true" extensionIdRef="extension_attribute_name"/>


      The following table displays the XML attributes associated with the extensionAttribute element.

      Table 1. XML attributes associated with extensionAttribute
      AttributeDescription
      editableSpecifies if the extension attribute can be edited by users. This attribute takes a Boolean value.
      showLabelSpecifies whether to display a label for the extension attribute in the user interface. 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.
      extensionIdRefThe ID of the extension. This ID is associated with the property key in the resource file. This attribute takes a string value.
      labelKeySpecifies the referenced key name of the label. This attribute takes a string value.
      bundleIdRefSpecifies the referenced bundle ID of the label. This attribute takes a string 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.


      For example, to display the officeAddress and homeAddress extension attributes in the Contact Information section of the page:

      <layoutConfiguration>
          <profileLayout profileType="student">
              <contactInformation>
                 <extensionAttribute 
                  showLabel="true" 
                  editable="true" 
                  extensionIdRef="officeAddress"/>
                 <extensionAttribute 
                  showLabel="true" 
                  editable="true" 
                  extensionIdRef="homeAddress" />
                 <extensionAttribute 
                  showLabel="true" 
                  editable="true" 
                  extensionIdRef="property1" 
                  labelKey="label.contactInformation.property1" 
                  bundleIdRef="customRes" />
           ...
              </contactInformation>
          </profileLayout>
      </layoutConfiguration>

  7. To label the extension attribute, you need to add a resource string to the Profiles application. For more information, see Adding custom strings for widgets and other specified scenarios.
  8. Extension attributes are included in the output of the Profiles API by default. To prevent extension attributes from being included in the API, you need to define which attributes should not be output for each profile type. To do this, add the following line of code in the <apiConfiguration> section as a child element of the <apiModel> element for the relevant profileType.
    • <hiddenApiExtensionAttribute extensionIdRef="extension-id"/>


      For example, to prevent the homeAddress extension attribute from appearing in API output for the default profile type, use this configuration:

      <apiConfiguration>
        <apiModel profileType="default">
          <hiddenApiExtensionAttribute extensionIdRef="homeAddress"/>
                ... 
        </apiModel>
      </apiConfiguration>

  9. After making changes, you must check the configuration files back in, and you must do so during the same wsadmin session in which you checked them out for the changes to take effect. See Applying property changes in Profiles for information about how to save and apply your changes.
Parent topic: Adding custom extension attributes for Profiles

Related tasks
Applying property changes in Profiles
Adding custom strings for widgets and other specified scenarios
Specifying a required field

Related reference
Retrieving profile extension data

expanded Article information
collapsed Article information
Category:
IBM Connections 3.0.1 documentation, Product Documentation,
Tags:

This Version: Version 7 March 15, 2012 9:16:04 AM by IBM  IBMer

expanded Attachments (0)
collapsed Attachments (0)

 


expanded Versions (7)
collapsed Versions (7)
Version Comparison     
Version Date Changed by               Summary of changes
This version (7) Mar 15, 2012 9:16:04 AM IBM  
6 Mar 15, 2012 9:16:04 AM IBM  
5 Nov 28, 2011 3:19:21 PM Michelle Mahoney   Still trying to fix formatting.
4 Nov 28, 2011 3:17:37 PM Michelle Mahoney   Still trying to fix formatting.
3 Nov 28, 2011 3:14:33 PM Michelle Mahoney   Trying to fix formatting.
2 Nov 28, 2011 3:11:06 PM Michelle Mahoney   Added the property1 extension attribute example to the example in Step...
1 Apr 6, 2011 3:58:33 PM IBM  
expanded Comments (0)
collapsed Comments (0)
Copy and paste this wiki markup to link to this article from another article in this wiki.
Go ElsewhereStay ConnectedSubscribe to RSSHelpAbout
  • All Lotus and WebSphere Portal wikis
  • IBM developerWorks
  • IBM Software support
  • IBM Social Business User Experience Blog
  • IBMSocialBizUX on Twitter
  • IBMSocialBizUX on Facebook
  • Lotus product forums
  • IBM Social Business UX blog
  • IBM Collaboration Solutions
  • Recently added feedRecently added
  • Recently edited feedRecently edited
  • Recently added comments feedRecently Added Comments
  • Wiki Help
  • Forgot user name/password
  • Wiki design feedback
  • Content feedback
  • About the wiki
  • About IBM
  • Privacy
  • Contact IBM
  • IBM Terms of use
  • Wiki terms of use