|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.nucleus.logging.VariableArgumentApplicationLoggingImpl atg.nucleus.GenericService atg.servlet.ContextRootSwappingService atg.servlet.VirtualContextRootService
public class VirtualContextRootService
This service provides a central location for multiple components to access defined virtual context root mappings.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class atg.servlet.ContextRootSwappingService |
---|
ContextRootSwappingService.ServletContextInfo |
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 | |
---|---|
VirtualContextRootService()
Constructs an instanceof VirtualContextRootService |
Method Summary | |
---|---|
java.lang.String |
findContextRootFromServletPath(java.lang.String pServletPath)
find the context root within a servlet path |
java.lang.String |
getAdditionalProductionURLPropertyName()
get AdditionalProductionURLPropertyName |
ContextRootSwappingService.ServletContextInfo |
getContextRootForVirtualContextRoot(javax.servlet.ServletContext pServletContext,
java.lang.String pServletPath)
get a ServletContext for a virtual context root |
ContextRootSwappingService.ServletContextInfo |
getContextRootForVirtualContextRoot(javax.servlet.ServletContext pServletContext,
java.lang.String pServletPath,
boolean pCheckForValidPath)
get a ServletContext for a virtual context root |
java.lang.String |
getContextRootPropertyName()
get ContextRootPropertyName |
java.lang.String |
getProductionURLPropertyName()
get ProductionURLPropertyName |
java.lang.String |
getRealContextRoot(java.lang.String pVirtualContextRoot)
get the real context root for a given virtual context root, or null if there isn't one |
java.lang.String |
getRealServletPath(java.lang.String pServletPath)
transform the given servlet path containing a virtual context root into a servlet path with the corresponding real context root. |
SiteContextManager |
getSiteContextManager()
get SiteContextManager |
protected Site |
getSiteForVCRURL(java.lang.String pURL)
given a url containing a virtual context root, get the associated site object |
URLPatternMatchingRuleFilter |
getURLPatternMatchingRuleFilter()
get URLPatternMatchingRuleFilter |
boolean |
hasVirtualContextRootMappings()
check to see if this service has any virtual context root mappings |
boolean |
hasVirtualContextRootMappings(java.lang.String pURL)
check to see if this service has any virtual context root mappings |
boolean |
isEnabled()
get Enabled - this determines if any VirtualContextRoot features will be enabled. |
void |
setAdditionalProductionURLPropertyName(java.lang.String pAdditionalProductionURLPropertyName)
set AdditionalProductionURLPropertyName |
void |
setContextRootPropertyName(java.lang.String pContextRootPropertyName)
set ContextRootPropertyName |
void |
setEnabled(boolean pEnabled)
set Enabled - this determines if any VirtualContextRoot features will be enabled. |
void |
setProductionURLPropertyName(java.lang.String pProductionURLPropertyName)
set ProductionURLPropertyName |
void |
setSiteContextManager(SiteContextManager pSiteContextManager)
set SiteContextManager |
void |
setURLPatternMatchingRuleFilter(URLPatternMatchingRuleFilter pURLPatternMatchingRuleFilter)
set URLPatternMatchingRuleFilter |
java.lang.String |
transformRealURLToVirtualURL(java.lang.String pOriginalURL,
java.lang.String pRealURL)
given an original URL containing a virtual context root, and second URL containing a real context root, return a URL containing the virtual context root of the first URL, and the servlet path of the second URL, if the second URL's context root is the real context root corresponding to the virual context root in the first URL |
protected java.lang.String |
trimLevel(java.lang.String pURI)
trim one directory level off the URI |
Methods inherited from class atg.servlet.ContextRootSwappingService |
---|
findWelcomeFile, getDefaultWelcomeFiles, getWelcomeFiles, setDefaultWelcomeFiles |
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 |
---|
public static java.lang.String CLASS_VERSION
Constructor Detail |
---|
public VirtualContextRootService()
Method Detail |
---|
public void setContextRootPropertyName(java.lang.String pContextRootPropertyName)
pContextRootPropertyName
- the ContextRootPropertyNamepublic java.lang.String getContextRootPropertyName()
public void setProductionURLPropertyName(java.lang.String pProductionURLPropertyName)
pProductionURLPropertyName
- the ProductionURLPropertyNamepublic java.lang.String getProductionURLPropertyName()
public void setAdditionalProductionURLPropertyName(java.lang.String pAdditionalProductionURLPropertyName)
pAdditionalProductionURLPropertyName
- the AdditionalProductionURLPropertyNamepublic java.lang.String getAdditionalProductionURLPropertyName()
public void setEnabled(boolean pEnabled)
pEnabled
- the Enabledpublic boolean isEnabled()
public void setURLPatternMatchingRuleFilter(URLPatternMatchingRuleFilter pURLPatternMatchingRuleFilter)
pURLPatternMatchingRuleFilter
- the URLPatternMatchingRuleFilterpublic URLPatternMatchingRuleFilter getURLPatternMatchingRuleFilter()
public void setSiteContextManager(SiteContextManager pSiteContextManager)
pSiteContextManager
- the SiteContextManagerpublic SiteContextManager getSiteContextManager()
public boolean hasVirtualContextRootMappings()
public boolean hasVirtualContextRootMappings(java.lang.String pURL)
pURL
- the url used to determine the site that
corresponds to the virtual context root, if null, then
the site associated with the current thread is used
public ContextRootSwappingService.ServletContextInfo getContextRootForVirtualContextRoot(javax.servlet.ServletContext pServletContext, java.lang.String pServletPath)
pServletContext
- the current servlet context, if this is null
then no ServletContext will be returned within the
ServletContextInfo object, and no logic will be performed
to determine the welcome file path for the given servlet pathpServletPath
- the servlet path
public ContextRootSwappingService.ServletContextInfo getContextRootForVirtualContextRoot(javax.servlet.ServletContext pServletContext, java.lang.String pServletPath, boolean pCheckForValidPath)
pServletContext
- the current servlet context, if this is null
then no ServletContext will be returned within the
ServletContextInfo object, and no logic will be performed
to determine the welcome file path for the given servlet pathpServletPath
- the servlet pathpCheckForValidPath
- - if true, will check to make sure there is a resource
at the given location before returning the context info. if false, will return the
context info regardless of whether the resource exists. Useful for getting servlets,
which can't be checked against ServletContext.getResourceAsStream()
public java.lang.String getRealServletPath(java.lang.String pServletPath)
pServletPath
- the virtual context root servlet path
public java.lang.String findContextRootFromServletPath(java.lang.String pServletPath)
public java.lang.String getRealContextRoot(java.lang.String pVirtualContextRoot)
pVirtualContextRoot
- the virtual context root
protected java.lang.String trimLevel(java.lang.String pURI)
protected Site getSiteForVCRURL(java.lang.String pURL)
pURL
- the virtual context root url
public java.lang.String transformRealURLToVirtualURL(java.lang.String pOriginalURL, java.lang.String pRealURL)
pOriginalURL
- the url containing the virtual context rootpRealURL
- the url containing the real context root
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |