Configure profile types for attribute layout 



To configure a profile type for profile attribute layout, you add the profile type containing the attribute layout to the profiles-config.xml file. Profile attribute data is included in the output of the Profiles API by default. To prevent attributes from being included in the API, you need to define which attributes should not be output for each profile type.

Before starting


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

Note: Do not hide any required fields; if a user edits their profile contact information and required field information is hidden for that user type, the edited profile form cannot be saved.

Procedure


To add a profile type for profile attribute layout, perform the following steps.

  1. From the dmgr host:

      cd $DMGR_PROFILE/bin
      ./wsadmin.sh -jython
      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, pick the node where the file is stored.

  2. Check out the Profiles configuration files:

      @nowiki@7where:

      • <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 WAS 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")

  • Save a copy of the profiles-config.xml file.

  • Open the file in a text editor.

  • Add a profile layout inside the <profileLayout> element, as in the following example:

      <layoutConfiguration>
      <profileLayout profileType="default"> <jobInformation> <attribute showLabel="false" appendHtml="<br/&gt;">organizationTitle</attribute> </jobInformation> ... </profileLayout> <profileLayout profileType="teacher"> <jobInformation> <attribute showLabel="false" appendHtml="<br/&gt;">organizationTitle</attribute> </jobInformation> ... </profileLayout> <searchResultsLayout profileType="default"> <column> ... </column> <column> ... </column> <column> ... </column> </searchResultsLayout> <searchResultsLayout profileType="teacher"> <column> ... </column> <column> ... </column> <column> ... </column> </searchResultsLayout> <businessCardLayout profileType="default"> <attributes> ... </attributes> </businessCardLayout> <businessCardLayout profileType="teacher"> <attributes> ... </attributes> </businessCardLayout> </layoutConfiguration> <apiConfiguration> <apiModel profileType="default"> ... </apiModel> <apiModel profileType="teacher"> ... </apiModel> </apiConfiguration>

  • To prevent attributes from being included in the Profiles API, you need to define which attributes should not be output for each profile type. To do this, add an <apiModel> child element for each profileType in the <apiConfiguration> section using the following format:

      <apiModel profileType="profile_type_name">
      </apiModel>

      Within the <apiModel> element, list the profile attributes that should be excluded from the API using a <hiddenApiAttribute> element in the following format:

      <hiddenApiAttribute>attribute_name</hiddenApiAttribute>


      For example, to prevent the jobResp attribute from appearing in the API output for the teacher profile, use this configuration:

      <apiConfiguration>
      <apiModel profileType="teacher"> <hiddenApiAttribute>jobResp</hiddenApiAttribute> </apiModel> </apiConfiguration>

  • Save your changes and check the profiles-config.xml file back in using the following command:

      ProfilesConfigService.checkInConfig()

  • To exit the wsadmin client, type exit at the prompt.

  • Stop and restart the Profiles server.


    Parent topic

    Add profile types


    +

    Search Tips   |   Advanced Search