atg.repository.search.config
Class RepositoryGroupDimensionService

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.repository.search.config.GenericDimensionService
              extended by atg.repository.search.config.RepositoryGroupDimensionService
All Implemented Interfaces:
NameContextBindingListener, NameContextElement, NameResolver, AdminableService, atg.nucleus.ConfigurationListener, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, SearchDimension, java.util.EventListener

public class RepositoryGroupDimensionService
extends GenericDimensionService
implements atg.nucleus.ConfigurationListener

Search configuration dimension service that uses repository group names as the dimension values to determine whether a site visitor should be selected for a path in the dimension tree.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Fields inherited from class atg.repository.search.config.GenericDimensionService
mDimensionName, mDimensionValueKeyPrefix, mDimensionValuesLocalized, mDisplayNameKey, mDisplayNameLocalized, mFormatter
 
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
RepositoryGroupDimensionService()
           
 
Method Summary
 void configurationAdded(atg.nucleus.ConfigurationEvent e)
           
 void configurationDeleted(atg.nucleus.ConfigurationEvent e)
           
 void configurationUpdated(atg.nucleus.ConfigurationEvent e)
           
 boolean dimensionMatchesValue(DynamoHttpServletRequest pRequest, java.lang.String pValue)
          Checks the request profile against a group for the passed in string group name for a match.
 boolean dimensionMatchesValue(RepositoryItem pProfile, java.lang.String pValue)
          Checks whether or not a value extracted from the given profile matches the given value.
protected  boolean doesGroupMatchProfile(java.lang.String pGroupName, RepositoryItem pProfile)
          Checks the profile against the group for a match.
 void doStartService()
          On startup the RepositoryGroupListManager API is called and a map of supported user group components is created.
 void doStopService()
          Remove property listener.
 java.util.List getDimensionValues()
          Returns a list of string dimension values that are valid for this dimension.
protected  RepositoryItemGroup getGroup(java.lang.String pGroupName)
          Gets the RepositoryItemGroup for the given name.
 java.lang.String getGroupListId()
           
 java.util.Map getNameGroupMap()
           
 java.lang.String getProfilePath()
           
 PropertiesChangedListener getPropertiesChangedListener()
           
 atg.repository.nucleus.RepositoryGroupContainerService getRepositoryGroupContainerService()
          Returns the repositoryGroupContainerService property
 atg.repository.nucleus.RepositoryRepositoryGroupListManager getRepositoryGroupListManager()
           
 java.lang.String getRepositoryName()
          Returns the repositoryName property
 boolean isProfileBased()
           
 void setDimensionValues(java.util.List pDimensionValues)
           
 void setGroupListId(java.lang.String pGroupListId)
           
 void setNameGroupMap(java.util.Map pNameGroupMap)
           
 void setProfilePath(java.lang.String pProfilePath)
           
 void setPropertiesChangedListener(PropertiesChangedListener pPropertiesChangedListener)
           
 void setRepositoryGroupContainerService(atg.repository.nucleus.RepositoryGroupContainerService pRepositoryGroupContainerService)
          Sets the repositoryGroupContainerService property
 void setRepositoryGroupListManager(atg.repository.nucleus.RepositoryRepositoryGroupListManager pRepositoryGroupListManager)
           
 void setRepositoryName(java.lang.String pRepositoryName)
          Sets the repositoryName property
 
Methods inherited from class atg.repository.search.config.GenericDimensionService
dimensionMatchesValue, getAllDimensionValues, getDimensionName, getDimensionValueDisplayName, getDimensionValueKeyPrefix, getDimensionValuesLocalized, getDisplayName, getDisplayNameKey, getDisplayNameLocalized, getFormatter, setDimensionName, setDimensionValueKeyPrefix, setDimensionValuesLocalized, setDisplayNameKey, setDisplayNameLocalized, setFormatter
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, 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

RepositoryGroupDimensionService

public RepositoryGroupDimensionService()
Method Detail

getGroupListId

public java.lang.String getGroupListId()

setGroupListId

public void setGroupListId(java.lang.String pGroupListId)

getRepositoryGroupListManager

public atg.repository.nucleus.RepositoryRepositoryGroupListManager getRepositoryGroupListManager()

setRepositoryGroupListManager

public void setRepositoryGroupListManager(atg.repository.nucleus.RepositoryRepositoryGroupListManager pRepositoryGroupListManager)

getRepositoryName

public java.lang.String getRepositoryName()
Returns the repositoryName property

Returns:
The repository name

setRepositoryName

public void setRepositoryName(java.lang.String pRepositoryName)
Sets the repositoryName property

Parameters:
pRepositoryName - The repository name to set

getRepositoryGroupContainerService

public atg.repository.nucleus.RepositoryGroupContainerService getRepositoryGroupContainerService()
Returns the repositoryGroupContainerService property

Returns:
The repositoryGroupContainerService property

setRepositoryGroupContainerService

public void setRepositoryGroupContainerService(atg.repository.nucleus.RepositoryGroupContainerService pRepositoryGroupContainerService)
Sets the repositoryGroupContainerService property

Parameters:
pRepositoryGroupContainerService - The property value to set

getNameGroupMap

public java.util.Map getNameGroupMap()

setNameGroupMap

public void setNameGroupMap(java.util.Map pNameGroupMap)

getDimensionValues

public java.util.List getDimensionValues()
Description copied from interface: SearchDimension
Returns a list of string dimension values that are valid for this dimension.

Specified by:
getDimensionValues in interface SearchDimension
Returns:
List of String dimension values.

setDimensionValues

public void setDimensionValues(java.util.List pDimensionValues)

getProfilePath

public java.lang.String getProfilePath()

setProfilePath

public void setProfilePath(java.lang.String pProfilePath)

getPropertiesChangedListener

public PropertiesChangedListener getPropertiesChangedListener()

setPropertiesChangedListener

public void setPropertiesChangedListener(PropertiesChangedListener pPropertiesChangedListener)

doStartService

public void doStartService()
                    throws ServiceException
On startup the RepositoryGroupListManager API is called and a map of supported user group components is created.

Overrides:
doStartService in class GenericService
Throws:
ServiceException

doStopService

public void doStopService()
                   throws ServiceException
Remove property listener.

Overrides:
doStopService in class GenericService
Throws:
ServiceException

dimensionMatchesValue

public boolean dimensionMatchesValue(RepositoryItem pProfile,
                                     java.lang.String pValue)
Checks whether or not a value extracted from the given profile matches the given value.

Specified by:
dimensionMatchesValue in interface SearchDimension
Overrides:
dimensionMatchesValue in class GenericDimensionService
Parameters:
pProfile - RepositoryItem profile to use
pValue - String vlaue to check.
Returns:
true if pValue matches the dimension value extracted from pProfile or pValue is null

isProfileBased

public boolean isProfileBased()
Specified by:
isProfileBased in interface SearchDimension
Returns:
true if this dimension can determine the dimension value from a profile.

dimensionMatchesValue

public boolean dimensionMatchesValue(DynamoHttpServletRequest pRequest,
                                     java.lang.String pValue)
Checks the request profile against a group for the passed in string group name for a match.

Specified by:
dimensionMatchesValue in interface SearchDimension
Overrides:
dimensionMatchesValue in class GenericDimensionService
Parameters:
pRequest - DynamoHttpServletRequest.
pValue - group name.
Returns:
true if request profile matches the group.

doesGroupMatchProfile

protected boolean doesGroupMatchProfile(java.lang.String pGroupName,
                                        RepositoryItem pProfile)
Checks the profile against the group for a match.

Parameters:
pGroupName - group name
pProfile - RepositoryItem profile.
Returns:
true if the profile matches the group.

getGroup

protected RepositoryItemGroup getGroup(java.lang.String pGroupName)
Gets the RepositoryItemGroup for the given name. First checks the map created on startup before asking the container service.

Parameters:
pGroupName - String name of the group
Returns:
RepositoryItemGroup for the name or null if not found

configurationAdded

public void configurationAdded(atg.nucleus.ConfigurationEvent e)

configurationUpdated

public void configurationUpdated(atg.nucleus.ConfigurationEvent e)
Specified by:
configurationUpdated in interface atg.nucleus.ConfigurationListener

configurationDeleted

public void configurationDeleted(atg.nucleus.ConfigurationEvent e)
Specified by:
configurationDeleted in interface atg.nucleus.ConfigurationListener