Create profiles
In this topic ...
Creating Hierarchical Profiles
Related Topics ...
We can create a profile from one of two areas in the Designer:
- Manage Profiles editor of the Profile Manage
- Profile Input dialog
To modify or delete an existing profile, be in the Manage Profiles editor.
Create a Profile
To create a profile:
- Launch the New Profile dialog:
- From the Manage Profiles editor, click the New Profile icon [].
- From the Profile Input dialog, click the Create button in the Profiles section.
- In the New Profile dialog, enter a name for the new profile in the Profile Name input box.
- Choose a parent profile whose values the new profile inherits from the Parent Profile select box.
- Optionally, use the Advanced pull-down menu to associate available segments (an entity returned by a profile handler, such as a J2EERole or an LDAP Group) with the profile. Select the segment from the Available for Association list and move segment to the Associated pane. For example, if the Profile Handler that you have created returns LDAP Groups, we can select a role in the Available for Association list to associate with the profile.
We can also click the Add External button to add an external role to the profile.
- Click OK to create the profile.
When a profile is created that is a parent of another profile, the isContainer check box is enabled. The last child profile created disables the isContainer check box. If you are creating profiles to be used as "end user" profiles to be used for execution time personalization, disable the "Is Container" folder just to the right of the Name input.
Editing a Profile
The process of editing an existing profile is similar to that of creating the profile.
To edit a profile:
- Launch the Edit Profile dialog by clicking the Edit Profile icon [] from the Manage Profiles editor.
- In the Edit Profile dialog, the current name of the profile will be in the Profile Name input box. We can enter a new name, as long as it is not the name of an existing profile in the profile set.
- The name of the current parent profile will be in the Parent Profile select box. We can select another parent profile.
- Optionally, use the Advanced pull-down menu to add or remove associated segments for the profile.
- Click OK to apply the profile changes.
Delete a Profile
To delete a profile from a profile set:
- In the Manage Profiles editor, select the profile to be deleted.
- Click the Delete Profile icon [].
- At the Delete Profile confirmation dialog, click OK.
Create Hierarchical Profiles
There are many ways to implement the customization of a web application. An application can use any number of profiles to implement different web applications for different users. One way to construct your profile sets is to use a hierarchical structure of profiles that we can repeat for each type of user. This approach allows you to develop a profile set that more closely resembles the variable elements of your application.
For example, if your application can be customized for a given organization and the Engineering and HR groups within that organization, it would make sense to have a profile set structure that contained a profile for all the members in the organization and a profile for the Engineering group and a profile for the HR group in the organization.
As we need to add support for different customers, we can create a new profile for customer-wide values and two more profiles named "Engineering" and "HR."
To avoid conflicts between the HR profile values for Cisco and the HR profile values for Sears, the inheritance structure determines the actual name of the profile. The Factory uses these fully-qualified profile names everywhere profile names are used.
As a result, the profiles listed in the image above actually have the following names:
- Cisco
- Cisco.Engineering
- Cisco.HR
- IBM
- IBM.Engineering
- IBM.HR
- Sears
- Sears.Engineering
- Sears.HR
About Generated File Names
On some application servers, there is a length limit on path names (including the file name) of 255 characters. The Factory generates JSP files and Method classes based on the model name and any profiles applied to the model. In most cases, the file name lengths are well under 255 characters. However, when you use the model as a portlet in nested portals, the generated file could exceed the file length limitation.
To prevent the generation of file names that are too long, the Factory converts the profile names to a unique ID. We can determine the file length at which the Factory converts the profile name portion of a generated file name to an ID by setting the bowstreet.profiles.maxKeyLength property in the WEB-INF/config/cluster.properties file. The default value is 60.
The maxKeyLength does not refer to the length of the whole file name, just the length of the profile name portion of it. As a result, set the maxKeyLength low enough to account for the portlet name, model name, and any other parts of the path to the generated file.
For example, the class generated for a model named "datatablepage" that is used as a portlet in a nested portal could have the following file name:
dataviewportlet_main_external_partners_premium_techsource_personalizationroot_techuser_pressreleases_datatabletablepage.java
The Factory checks the length of the profile names embedded in the name and if it exceeds the value of the maxKeyLength property (in this case, 60), it will convert them to an ID. The following would be the result of the previous example:
dataviewportlet_160568228_datatabletablepage.java