The /atg/userprofiling/ProfileItemFinder component is used by the Personalization module to locate users given the values of their login, password, first name, last name, or email attributes. For example, when a user logs in using a profile form handler, the supplied username and password are passed on to ProfileItemFinder in order to locate the user in the profile repository.

By default, ProfileItemFinder is configured as a component of type atg.userprofiling.RepositoryProfileItemFinder. The RepositoryProfileItemFinder class finds a profile by performing a query against the profile repository. However, with the profile data split between the SQL and LDAP repositories, ProfileItemFinder may need to query the SQL repository in some cases and LDAP repository in others. For example, if the login and password properties are stored in LDAP, but the email property is stored in SQL, then the ProfileItemFinder must query the LDAP repository to find users by login/password, but it must query the SQL repository to find users by email.

When your profile data is split between two linked repositories, you should override the ProfileItemFinder configuration so that it uses the class atg.userprofiling.RepositoryLinkProfileItemFinder. This class extends RepositoryProfileItemFinder and allows queries to be performed against both repositories.

With this configuration, the ProfileItemFinder component has the following properties:

Property

Description

profileTools

A pointer to the /atg/userprofiling/ProfileTools component.

propertyManager

A pointer to the /atg/userprofiling/PropertyManager component.

profileRepository

The main profile repository. This is set to the SQL repository component, /atg/userprofiling/ProfileAdapterRepository, by default.

linkedRepository

The repository that is linked to the main profile repository. Set this to your LDAP repository component, for example /atg/adapter/ldap/LDAPRepository.

linkedItemProperty

The name of the property in the SQL profile repository that points to the item in the linked repository. For example, if your SQL repository has an ldapUser property that points to the LDAP item, set ldapUser as the value here.

linkedProfileTypeMap

The mapping between the main profile repository’s profile types and the corresponding linked repository’s profile types. For example, if both your SQL and LDAP repositories have a single user type, you should set linkedPropertyTypeMap=user=user.

linkPropertyLocal

The name of the property used to link against in the SQL repository. This name is the same as the value of the uniqueIdPropertyLocal attribute in the ldapUser property definition.

linkPropertyRemote

The name of the property used to link against in the LDAP repository. This name is the same as the value of the uniqueIdPropertyRemote attribute in the ldapUser property definition.

loginLinkedPropertyName

The name of the login property in the linked repository, null if the login property is stored in the main profile repository. For example, if the login property is stored in LDAP, this name should be loginLinkedPropertyName=login.

If the login property exists in both repositories (as in our example), only set this property if the password property is also stored in LDAP. That way, the ProfileItemFinder will be able to locate users in the linked repository given their login/password.

passwordLinkedPropertyName

The name of the password property in the linked repository, null if the password property is stored in the main profile repository.

firstNameLinkedPropertyName

The name of the firstName property in the linked repository, null if the firstName property is stored in the main profile repository.

lastNameLinkedPropertyName

The name of the lastName property in the linked repository, null if the lastName property is stored in the main profile repository.

emailLinkedPropertyName

The name of the emailproperty in the linked repository, null if the email property is stored in the main profile repository.

createLocalProfiles

If true, and a profile is found in the linked repository but not in the main profile repository, the local profile is created, with its link property (specified via linkPropertyLocal) set accordingly. Otherwise, the local profile is not created, and the item will not be returned by the search. The default is false.

This property is useful in a situation where you have an existing directory of LDAP users, and you would like the corresponding SQL profiles to be created automatically when the users log in. Since the ProfileItemFinder is used to find the user during login, setting this property to true forces the SQL profile to be created the first time a user logs in.


Copyright © 1997, 2012 Oracle and/or its affiliates. All rights reserved. Legal Notices