atg.userprofiling
Class RepositoryProfileItemFinder

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.userprofiling.RepositoryProfileItemFinder
All Implemented Interfaces:
NameContextBindingListener, NameContextElement, NameResolver, AdminableService, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, atg.nucleus.logging.VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, java.util.EventListener
Direct Known Subclasses:
RepositoryLinkProfileItemFinder

public class RepositoryProfileItemFinder
extends GenericService

Finds profile repository items by querying the profile repository.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Fields inherited from class atg.nucleus.GenericService
SERVICE_INFO_KEY
 
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging
DEFAULT_LOG_TRACE_STATUS
 
Fields inherited from interface atg.nucleus.logging.ApplicationLogging
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
 
Constructor Summary
RepositoryProfileItemFinder()
           
 
Method Summary
 RepositoryItem[] findByEmail(java.lang.String pEmail, java.lang.String pProfileType)
          Returns all RepositoryItems which represent profiles with the given email address, null if no such items are found.
protected  RepositoryItem[] findByEmail(java.lang.String pEmail, java.lang.String pProfileType, Repository pRepository)
          Returns all RepositoryItems which represent profiles with the given email address, null if no such items are found.
 RepositoryItem findByLogin(java.lang.String pLogin, java.lang.String pPassword, java.lang.String pProfileType)
          Returns the RepositoryItem which represents the profile with the given login and password, null if it's not found.
 RepositoryItem findByLogin(java.lang.String pLogin, java.lang.String pPassword, java.lang.String pProfileType, Repository pRepository)
          Returns the RepositoryItem which represents the profile with the given login and password, null if it's not found.
 RepositoryItem[] findByName(java.lang.String pFirstName, java.lang.String pLastName, java.lang.String pProfileType)
          Returns all RepositoryItems which represent profiles with the given first and last names, null if no such items are found.
protected  RepositoryItem[] findByName(java.lang.String pFirstName, java.lang.String pLastName, java.lang.String pProfileType, Repository pRepository)
          Returns all RepositoryItems which represent profiles with the given first and last names, null if no such items are found.
 Query generateEmailQuery(java.lang.String pEmail, QueryBuilder pQueryBuilder)
          Returns the Query which will be executed to find the profiles with the given email address.
 Query generateLoginQuery(java.lang.String pLogin, java.lang.String pPassword, QueryBuilder pQueryBuilder)
          Returns the Query which will be executed to find the profile with the given login and password.
 Query generateNameQuery(java.lang.String pFirstName, java.lang.String pLastName, QueryBuilder pQueryBuilder)
          Returns the Query which will be executed to find the profiles with the given first and last names.
protected  java.lang.String getEmailPropertyName()
          Returns the name of the email property to use in the email query, looking it up in the PropertyManager.
protected  java.lang.String getFirstNamePropertyName()
          Returns the name of the first name property to use in the name query, looking it up in the PropertyManager.
protected  java.lang.String getLastNamePropertyName()
          Returns the name of the last name property to use in the name query, looking it up in the PropertyManager.
protected  java.lang.String getLoginPropertyName()
          Returns the name of the login property to use in the login query, looking it up in the PropertyManager.
protected  java.lang.String getPasswordPropertyName()
          Returns the name of the password property to use in the login query, looking it up in the PropertyManager.
 MutableRepository getProfileRepository()
          Returns the profile repository.
 ProfileTools getProfileTools()
          Returns the profile tools.
 PropertyManager getPropertyManager()
          Returns the property manager.
 void setProfileRepository(MutableRepository pProfileRepository)
          Sets the profile repository.
 void setProfileTools(ProfileTools pProfileTools)
          Sets the profile tools.
 void setPropertyManager(PropertyManager pPropertyManager)
          Sets the property manager.
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string

Constructor Detail

RepositoryProfileItemFinder

public RepositoryProfileItemFinder()
Method Detail

getProfileRepository

public MutableRepository getProfileRepository()
Returns the profile repository.


setProfileRepository

public void setProfileRepository(MutableRepository pProfileRepository)
Sets the profile repository.


getProfileTools

public ProfileTools getProfileTools()
Returns the profile tools.


setProfileTools

public void setProfileTools(ProfileTools pProfileTools)
Sets the profile tools.


getPropertyManager

public PropertyManager getPropertyManager()
Returns the property manager.


setPropertyManager

public void setPropertyManager(PropertyManager pPropertyManager)
Sets the property manager.


findByLogin

public RepositoryItem findByLogin(java.lang.String pLogin,
                                  java.lang.String pPassword,
                                  java.lang.String pProfileType)
Returns the RepositoryItem which represents the profile with the given login and password, null if it's not found.

Parameters:
pLogin - the user's login
pPassword - the user's password; if null, the search is only performed using the login
pProfileType - the name of the profiles' item descriptor

findByLogin

public RepositoryItem findByLogin(java.lang.String pLogin,
                                  java.lang.String pPassword,
                                  java.lang.String pProfileType,
                                  Repository pRepository)
Returns the RepositoryItem which represents the profile with the given login and password, null if it's not found.

Parameters:
pLogin - the user's login
pPassword - the user's password; if null, the search is only performed using the login
pProfileType - the name of the profiles' item descriptor
pRepository - the repository to search

findByName

public RepositoryItem[] findByName(java.lang.String pFirstName,
                                   java.lang.String pLastName,
                                   java.lang.String pProfileType)
Returns all RepositoryItems which represent profiles with the given first and last names, null if no such items are found. Either first name or last name can be null.

Parameters:
pFirstName - the user's first name
pLastName - the user's last name
pProfileType - the name of the profiles' item descriptor

findByName

protected RepositoryItem[] findByName(java.lang.String pFirstName,
                                      java.lang.String pLastName,
                                      java.lang.String pProfileType,
                                      Repository pRepository)
Returns all RepositoryItems which represent profiles with the given first and last names, null if no such items are found. Either first name or last name can be null.

Parameters:
pFirstName - the user's first name
pLastName - the user's last name
pProfileType - the name of the profiles' item descriptor
pRepository - the repository to search

findByEmail

public RepositoryItem[] findByEmail(java.lang.String pEmail,
                                    java.lang.String pProfileType)
Returns all RepositoryItems which represent profiles with the given email address, null if no such items are found.

Parameters:
pEmail - the user's email address
pProfileType - the name of the profiles' item descriptor

findByEmail

protected RepositoryItem[] findByEmail(java.lang.String pEmail,
                                       java.lang.String pProfileType,
                                       Repository pRepository)
Returns all RepositoryItems which represent profiles with the given email address, null if no such items are found.

Parameters:
pEmail - the user's email address
pProfileType - the name of the profiles' item descriptor
pRepository - the repository to search

generateLoginQuery

public Query generateLoginQuery(java.lang.String pLogin,
                                java.lang.String pPassword,
                                QueryBuilder pQueryBuilder)
                         throws RepositoryException
Returns the Query which will be executed to find the profile with the given login and password. If both pLogin and pPassword are not null, then the query returned is of the form: (login == pLogin) AND (password == pPassword). If the password is null then just (login == pLogin) is returned.

Throws:
RepositoryException - if there is a problem constructing the query

generateNameQuery

public Query generateNameQuery(java.lang.String pFirstName,
                               java.lang.String pLastName,
                               QueryBuilder pQueryBuilder)
                        throws RepositoryException
Returns the Query which will be executed to find the profiles with the given first and last names. If both the first and last names are not null, then the query returned will be of the form: (firstName == pFirstName) AND (lastName == pLastName). If the firstName is null then just (lastName == pLastName) is returned. If the lastName is null then just (firstName == pFirstName) is returned.

Throws:
RepositoryException - if there is a problem constructing the query

generateEmailQuery

public Query generateEmailQuery(java.lang.String pEmail,
                                QueryBuilder pQueryBuilder)
                         throws RepositoryException
Returns the Query which will be executed to find the profiles with the given email address. The query returned will be of the form (email == pEmail).

Throws:
RepositoryException - if there is a problem constructing the query

getLoginPropertyName

protected java.lang.String getLoginPropertyName()
Returns the name of the login property to use in the login query, looking it up in the PropertyManager.


getPasswordPropertyName

protected java.lang.String getPasswordPropertyName()
Returns the name of the password property to use in the login query, looking it up in the PropertyManager.


getFirstNamePropertyName

protected java.lang.String getFirstNamePropertyName()
Returns the name of the first name property to use in the name query, looking it up in the PropertyManager.


getLastNamePropertyName

protected java.lang.String getLastNamePropertyName()
Returns the name of the last name property to use in the name query, looking it up in the PropertyManager.


getEmailPropertyName

protected java.lang.String getEmailPropertyName()
Returns the name of the email property to use in the email query, looking it up in the PropertyManager.