|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.struts.util.ModuleUtils
General purpose utility methods related to module processing.
Field Summary | |
private static ModuleUtils |
instance
The Singleton instance. |
private static org.apache.commons.logging.Log |
log
Commons logging instance. |
Constructor Summary | |
protected |
ModuleUtils()
Constructor for ModuleUtils. |
Method Summary | |
static ModuleUtils |
getInstance()
Returns the Singleton instance of TagUtils. |
ModuleConfig |
getModuleConfig(javax.servlet.http.HttpServletRequest request)
Return the current ModuleConfig object stored in request, if it exists, null otherwise. |
ModuleConfig |
getModuleConfig(javax.servlet.http.HttpServletRequest request,
javax.servlet.ServletContext context)
Return the ModuleConfig object is it exists, null otherwise. |
ModuleConfig |
getModuleConfig(java.lang.String prefix,
javax.servlet.http.HttpServletRequest request,
javax.servlet.ServletContext context)
Return the desired ModuleConfig object stored in context, if it exists, otherwise return the current ModuleConfig |
ModuleConfig |
getModuleConfig(java.lang.String prefix,
javax.servlet.ServletContext context)
Return the desired ModuleConfig object stored in context, if it exists, null otherwise. |
java.lang.String |
getModuleName(javax.servlet.http.HttpServletRequest request,
javax.servlet.ServletContext context)
Get the module name to which the specified request belong. |
java.lang.String |
getModuleName(java.lang.String matchPath,
javax.servlet.ServletContext context)
Get the module name to which the specified uri belong. |
java.lang.String[] |
getModulePrefixes(javax.servlet.ServletContext context)
Return the list of module prefixes that are defined for this web application. |
void |
selectModule(javax.servlet.http.HttpServletRequest request,
javax.servlet.ServletContext context)
Select the module to which the specified request belongs, and add corresponding request attributes to this request. |
void |
selectModule(java.lang.String prefix,
javax.servlet.http.HttpServletRequest request,
javax.servlet.ServletContext context)
Select the module to which the specified request belongs, and add corresponding request attributes to this request. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private static final ModuleUtils instance
private static final org.apache.commons.logging.Log log
Constructor Detail |
protected ModuleUtils()
Method Detail |
public static ModuleUtils getInstance()
public ModuleConfig getModuleConfig(javax.servlet.http.HttpServletRequest request)
RequestUtils.selectModule(HttpServletRequest, ServletContext)
.request
- The servlet request we are processingpublic ModuleConfig getModuleConfig(java.lang.String prefix, javax.servlet.ServletContext context)
prefix
- The module prefix of the desired modulecontext
- The ServletContext for this web applicationpublic ModuleConfig getModuleConfig(java.lang.String prefix, javax.servlet.http.HttpServletRequest request, javax.servlet.ServletContext context)
prefix
- The module prefix of the desired modulerequest
- The servlet request we are processingcontext
- The ServletContext for this web applicationpublic ModuleConfig getModuleConfig(javax.servlet.http.HttpServletRequest request, javax.servlet.ServletContext context)
request
- The servlet request we are processingcontext
- The ServletContext for this web applicationpublic java.lang.String getModuleName(javax.servlet.http.HttpServletRequest request, javax.servlet.ServletContext context)
request
- The servlet request we are processingcontext
- The ServletContext for this web applicationpublic java.lang.String getModuleName(java.lang.String matchPath, javax.servlet.ServletContext context)
matchPath
- The uri from which we want the module name.context
- The ServletContext for this web applicationpublic java.lang.String[] getModulePrefixes(javax.servlet.ServletContext context)
context
- The ServletContext for this web application.public void selectModule(javax.servlet.http.HttpServletRequest request, javax.servlet.ServletContext context)
request
- The servlet request we are processingcontext
- The ServletContext for this web applicationpublic void selectModule(java.lang.String prefix, javax.servlet.http.HttpServletRequest request, javax.servlet.ServletContext context)
prefix
- The module prefix of the desired modulerequest
- The servlet request we are processingcontext
- The ServletContext for this web application
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |