In some situations, particularly where portals are involved, you might need to have two profiles with the same name in a profile set.
IBM® WebSphere® Portlet Factory supports this ability through the use of qualified naming. A fully qualified profile name is "MyApp.CompanyB.HR" for referencing the HR Profile under CompanyB. The default profile is always assumed to be at the root. The default profile is never specified in the fully qualified name, unless it is a referent to the default profile.
To be compatible with existing profile sets and to avoid confusion new Boolean flag on the profile set is used to indicate that a the profile set will use fully qualified profile names. This flag defaults to "true" after creating a new profile set and it can be changed by using the setUseQualifiedProfileNames(..) method.
If this flag is set and the profile set is saved, the UseQualifiedProfileNames flag must not be changed. This is because the profile names stored in the profile set are stored differently based on this flag. Flipping it when there is existing data causes two different types of profile names to be created. The API for this feature looks as follows:
* Set if this profile set should be using full names (e.g. bowstreet.hr.foo).
* @param useQualifiedProfileNames true if this profile set should be using full names (e.g. bowstreet.hr.foo), else false.
public void setUseQualifiedProfileNames(boolean useQualifiedProfileNames)
The Profile Set Manager in WebSphere Portlet Factory Designer always creates profile sets that use fully qualified names. To provide backward compatibility with previous versions of the profile management tools, the getName() method on the profile class operates under the following rules:
- When using fully qualified profile names, the name returned will be the fully qualified name of the profile ("MyApp.CompanyA.HR").
- If not using qualified profile names, the name returned will be the non-qualified name ("HR").
There is also a new method on the profile class for getting the short (display) name. This method is:
* Gets the non-qualified name of this Profile.
* @return The non-qualified Profile name (e.g. "gold").
public String getShortName()
Parent topic: Profile sets