atg.svc.clicktoconnect
Class URIMatchLandingPageHandler

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.svc.clicktoconnect.LandingPageHandler
              extended by atg.svc.clicktoconnect.URIMatchLandingPageHandler
All Implemented Interfaces:
atg.naming.NameContextBindingListener, atg.naming.NameContextElement, atg.naming.NameResolver, atg.nucleus.AdminableService, atg.nucleus.logging.ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, atg.nucleus.logging.VariableArgumentApplicationLogging, atg.nucleus.naming.ComponentNameResolver, atg.nucleus.Service, atg.nucleus.ServiceListener, java.util.EventListener

@Service(requiredProperties="virtualContextRootService")
public class URIMatchLandingPageHandler
extends LandingPageHandler

Generates a LandingPage when the C2C Referrer URL starts with any of the values configured by the uriMatches property.

By default the configured LandingPage is returned when a match is found.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
protected  java.lang.String[] mURIMatches
           
protected  atg.servlet.VirtualContextRootService mVirtualContextRootService
           
 
Fields inherited from class atg.svc.clicktoconnect.LandingPageHandler
mEnvironmentTools, mLandingPage
 
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
URIMatchLandingPageHandler()
           
 
Method Summary
protected  LandingPage createLandingPage(C2CRequestData pC2CRequestData)
          Returns the configured LandingPage
 LandingPage generateLandingPage(C2CRequestData pC2CRequestData)
          If the referrer url starts with the uriMatch property createLandingPage is executed to create the LandingPage object.
 java.lang.String[] getURIMatches()
          Returns the array of URI strings that are used to determine if this handler should create a landing page.
 atg.servlet.VirtualContextRootService getVirtualContextRootService()
          Returns the virtualContextRootService
protected  boolean isFileURIMatch(java.lang.String pReferrerFileURL)
          Returns true if the referrer file url (pReferrerFileURL) matches with the value specified by the uriMatch property.
protected  boolean isURIMatch(C2CRequestData pC2CRequestData)
          This method gets the referrer file url and calls isFileURIMatch(String) to find out whether the referrer file url matches with any configured uriMatch property value.
 void setURIMatches(java.lang.String[] pMatches)
           
 void setVirtualContextRootService(atg.servlet.VirtualContextRootService pVirtualContextRootService)
          Sets the virtualContextRootService
 
Methods inherited from class atg.svc.clicktoconnect.LandingPageHandler
getEnvironmentTools, getLandingPage, getReferrerParameter, setEnvironmentTools, setLandingPage
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, 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


mURIMatches

protected java.lang.String[] mURIMatches

mVirtualContextRootService

protected atg.servlet.VirtualContextRootService mVirtualContextRootService
Constructor Detail

URIMatchLandingPageHandler

public URIMatchLandingPageHandler()
Method Detail

getURIMatches

public java.lang.String[] getURIMatches()
Returns the array of URI strings that are used to determine if this handler should create a landing page.

Returns:
String[]

setURIMatches

public void setURIMatches(java.lang.String[] pMatches)

getVirtualContextRootService

public atg.servlet.VirtualContextRootService getVirtualContextRootService()
Returns the virtualContextRootService

Returns:
the virtualContextRootService

setVirtualContextRootService

public void setVirtualContextRootService(atg.servlet.VirtualContextRootService pVirtualContextRootService)
Sets the virtualContextRootService

Parameters:
pVirtualContextRootService - the virtualContextRootService to set

isURIMatch

protected boolean isURIMatch(C2CRequestData pC2CRequestData)
This method gets the referrer file url and calls isFileURIMatch(String) to find out whether the referrer file url matches with any configured uriMatch property value.

Parameters:
pC2CRequestData -
Returns:
true if match is found
See Also:
isFileURIMatch(String)

isFileURIMatch

protected boolean isFileURIMatch(java.lang.String pReferrerFileURL)
Returns true if the referrer file url (pReferrerFileURL) matches with the value specified by the uriMatch property.

This method uses the following approach to find a match.

Parameters:
pReferrerFileURL -
Returns:
returns true if a match is found. false otherwise.
See Also:
VirtualContextRootService.getRealServletPath(String)

createLandingPage

protected LandingPage createLandingPage(C2CRequestData pC2CRequestData)
Returns the configured LandingPage

Parameters:
pC2CRequestData -
Returns:
LandingPage

generateLandingPage

public LandingPage generateLandingPage(C2CRequestData pC2CRequestData)
If the referrer url starts with the uriMatch property createLandingPage is executed to create the LandingPage object.

Specified by:
generateLandingPage in class LandingPageHandler
Returns:
LandingPage