|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.cc.framework.adapter.struts.StrutsFrameworkAdapter
Framework Adapter for the Jakarta Struts Framework
| Field Summary | |
private static org.apache.commons.logging.Log |
log
Log |
private java.lang.String |
servletMapping
The servlet mapping of the frontcontroller servlet |
| Constructor Summary | |
StrutsFrameworkAdapter()
|
|
| Method Summary | |
void |
addTransactionToken(javax.servlet.jsp.PageContext pageContext,
Hyperlink link)
Adds the a transaction token (if any) to the given Parameter List. |
java.lang.String |
applyServletMapping(java.lang.String url)
Applies the front controllers servlet mapping to the given URL |
ActionPainter |
createActionPainter(PainterContext ctx,
ControlAction action)
Creates an ActionPainter. |
private static java.lang.String |
getActionMappingName(java.lang.String action)
Return the form action converted into an action mapping path. |
java.lang.String |
getActionMappingURL(javax.servlet.jsp.PageContext pageContext,
java.lang.String action)
This Method maps an Action identifier to an URL |
java.lang.String |
getControlAction(javax.servlet.jsp.PageContext pageContext,
javax.servlet.jsp.tagext.TagSupport taghandler)
Gets the default Action which should be used to forward requests from this control. |
MessageDataModel |
getMessages(javax.servlet.jsp.PageContext pageContext,
Severity severity)
Returns the Framework Messages |
protected org.apache.struts.config.ModuleConfig |
getModuleConfig(java.lang.String module,
HttpContext context)
Return the ModuleConfig object for the given prefix if it exists, null if otherwise. |
boolean |
hasMessages(javax.servlet.jsp.PageContext pageContext,
Severity severity,
java.lang.String property)
Checks for framework messages |
java.util.Locale |
localeFromName(HttpContext context,
java.lang.String localeName)
Gets the Locale Object from a Locale Name |
java.util.Locale |
localeFromName(javax.servlet.jsp.PageContext pageContext,
java.lang.String localeName)
Gets the Locale Object from a Locale Name |
java.lang.String |
localizeKey(HttpContext context,
java.lang.String resourceKey,
java.util.Locale locale,
boolean returnNull)
Localizes a string depending on the localization settings of the Painter context. |
java.lang.String |
localizeKey(javax.servlet.jsp.PageContext pageContext,
java.lang.String resourceKey,
java.util.Locale locale,
boolean returnNull)
Localizes a string depending on the localization settings of the Painter context. |
java.lang.Object |
lookupBean(javax.servlet.jsp.PageContext pageContext,
java.lang.String name,
java.lang.String property,
HttpScope scope)
Lookup a Javabean for use in a JSP tag handler |
java.lang.Object |
lookupBean(javax.servlet.jsp.PageContext pageContext,
javax.servlet.jsp.tagext.TagSupport taghandler,
java.lang.String name,
java.lang.String property,
HttpScope scope)
Does a lookup for the specified Java bean |
protected org.apache.struts.util.MessageResources |
retrieveMessageResources(HttpContext context,
java.lang.String bundle)
Returns the appropriate MessageResources object for the current struts module and the given bundle. |
protected org.apache.struts.util.MessageResources |
retrieveMessageResources(javax.servlet.jsp.PageContext pageContext,
java.lang.String bundle)
Deprecated. |
void |
setServletMapping(java.lang.String mapping)
Sets the frontcontrollers servlet mapping. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static transient org.apache.commons.logging.Log log
private java.lang.String servletMapping
| Constructor Detail |
public StrutsFrameworkAdapter()
| Method Detail |
public void setServletMapping(java.lang.String mapping)
mapping - Servlet mapping stringpublic java.lang.String applyServletMapping(java.lang.String url)
FrameworkAdapter
applyServletMapping in interface FrameworkAdapterurl - the URL to apply the servlet mapping to (e.g. "/main")
FrameworkAdapter.applyServletMapping(java.lang.String)
public void addTransactionToken(javax.servlet.jsp.PageContext pageContext,
Hyperlink link)
addTransactionToken in interface FrameworkAdapterpageContext - Search the context's scopes for the
resources.link - Hyperlink
protected org.apache.struts.util.MessageResources retrieveMessageResources(javax.servlet.jsp.PageContext pageContext,
java.lang.String bundle)
pageContext - Search the context's scopes for the resources.bundle - The bundle name to look for. If this is null,
the default bundle name is used.
protected org.apache.struts.config.ModuleConfig getModuleConfig(java.lang.String module,
HttpContext context)
module - The module prefix
protected org.apache.struts.util.MessageResources retrieveMessageResources(HttpContext context,
java.lang.String bundle)
context - Search the context's scopes for the resources.bundle - The bundle name to look for. If this is null,
the default bundle name is used.
public java.lang.String localizeKey(javax.servlet.jsp.PageContext pageContext,
java.lang.String resourceKey,
java.util.Locale locale,
boolean returnNull)
FrameworkAdapter
localizeKey in interface FrameworkAdapterpageContext - JSP Page ContextresourceKey - The resource key.locale - Locale or nullreturnNull - controls whether to return null or a not present indicator
FrameworkAdapter.localizeKey(javax.servlet.jsp.PageContext, java.lang.String, java.util.Locale, boolean)
public java.lang.String localizeKey(HttpContext context,
java.lang.String resourceKey,
java.util.Locale locale,
boolean returnNull)
FrameworkAdapter
localizeKey in interface FrameworkAdaptercontext - JSP Page ContextresourceKey - The resource key.locale - Locale or nullreturnNull - controls whether to return null or a not present indicator
FrameworkAdapter.localizeKey(com.cc.framework.http.HttpContext, java.lang.String, java.util.Locale, boolean)private static java.lang.String getActionMappingName(java.lang.String action)
action property is manipulated as follows in
computing the name of the requested mapping:
action - Action
public java.lang.String getActionMappingURL(javax.servlet.jsp.PageContext pageContext,
java.lang.String action)
FrameworkAdapter
getActionMappingURL in interface FrameworkAdapterpageContext - PageContextaction - Action
FrameworkAdapter.getActionMappingURL(javax.servlet.jsp.PageContext, java.lang.String),
TagUtils.getActionMappingURL(java.lang.String, javax.servlet.jsp.PageContext)
public java.util.Locale localeFromName(javax.servlet.jsp.PageContext pageContext,
java.lang.String localeName)
FrameworkAdapter
localeFromName in interface FrameworkAdapterpageContext - JSP Page ContextlocaleName - The Name
nullFrameworkAdapter.localeFromName(javax.servlet.jsp.PageContext, java.lang.String)
public java.util.Locale localeFromName(HttpContext context,
java.lang.String localeName)
FrameworkAdapter
localeFromName in interface FrameworkAdaptercontext - JSP Page ContextlocaleName - The Name
nullFrameworkAdapter.localeFromName(com.cc.framework.http.HttpContext, java.lang.String)
public java.lang.String getControlAction(javax.servlet.jsp.PageContext pageContext,
javax.servlet.jsp.tagext.TagSupport taghandler)
getControlAction in interface FrameworkAdapterpageContext - The JSP Page contexttaghandler - The JSP Tag
null
public java.lang.Object lookupBean(javax.servlet.jsp.PageContext pageContext,
javax.servlet.jsp.tagext.TagSupport taghandler,
java.lang.String name,
java.lang.String property,
HttpScope scope)
throws java.lang.Exception
pageContext - JSP Page Contexttaghandler - The Tag Handler that calls this methodname - The Bean's nameproperty - The propertyscope - The scope where the bean is stored
java.lang.Exception - Is thrown in case of an error
public java.lang.Object lookupBean(javax.servlet.jsp.PageContext pageContext,
java.lang.String name,
java.lang.String property,
HttpScope scope)
throws java.lang.Exception
FrameworkAdapter
lookupBean in interface FrameworkAdapterpageContext - JSP page contextname - Name of the beanproperty - Name of a beans propertyscope - the scope where the bean should be located
null
java.lang.Exception - is thrown in case of an errorFrameworkAdapter.lookupBean(javax.servlet.jsp.PageContext, java.lang.String, java.lang.String, com.cc.framework.http.HttpScope)
public MessageDataModel getMessages(javax.servlet.jsp.PageContext pageContext,
Severity severity)
throws java.lang.Exception
FrameworkAdapter
getMessages in interface FrameworkAdapterpageContext - JSP Page Contextseverity - Severity
java.lang.Exception - If an error occurs while loading the Message ListFrameworkAdapter.getMessages(javax.servlet.jsp.PageContext, com.cc.framework.common.Severity)
public boolean hasMessages(javax.servlet.jsp.PageContext pageContext,
Severity severity,
java.lang.String property)
FrameworkAdapter
hasMessages in interface FrameworkAdapterpageContext - JSP Page Contextseverity - Severityproperty - Property name or null
FrameworkAdapter.hasMessages(javax.servlet.jsp.PageContext, com.cc.framework.common.Severity, java.lang.String)
public ActionPainter createActionPainter(PainterContext ctx,
ControlAction action)
FrameworkAdapter
createActionPainter in interface FrameworkAdapterctx - The Painter Contextaction - ControlAction
FrameworkAdapter.createActionPainter(com.cc.framework.ui.painter.PainterContext, com.cc.framework.ui.control.ControlAction)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||