public class ScopedModelDrivenInterceptor extends AbstractInterceptor
ScopedModelDriven interface. If
detected, it will retrieve the model class from the configured scope, then provide it to the Action.
Interceptor parameters:
<-- Basic usage -->
<interceptor name="scopedModelDriven" class="com.opensymphony.interceptor.ScopedModelDrivenInterceptor" />
<-- Using all available parameters -->
<interceptor name="gangsterForm" class="com.opensymphony.interceptor.ScopedModelDrivenInterceptor">
<param name="scope">session</param>
<param name="name">gangsterForm</param>
<param name="className">com.opensymphony.example.GangsterForm</param>
</interceptor>
| Constructor and Description |
|---|
ScopedModelDrivenInterceptor() |
| Modifier and Type | Method and Description |
|---|---|
String |
intercept(ActionInvocation invocation)
Override to handle interception
|
protected Object |
resolveModel(ObjectFactory factory,
ActionContext actionContext,
String modelClassName,
String modelScope,
String modelName) |
void |
setClassName(String className) |
void |
setName(String name) |
void |
setObjectFactory(ObjectFactory factory) |
void |
setScope(String scope) |
destroy, initpublic void setObjectFactory(ObjectFactory factory)
protected Object resolveModel(ObjectFactory factory, ActionContext actionContext, String modelClassName, String modelScope, String modelName) throws Exception
Exceptionpublic String intercept(ActionInvocation invocation) throws Exception
AbstractInterceptorintercept in interface Interceptorintercept in class AbstractInterceptorinvocation - the action invocationActionInvocation.invoke(), or from the interceptor itself.Exception - any system-level error, as defined in Action.execute().public void setClassName(String className)
className - the className to setpublic void setName(String name)
name - the name to setpublic void setScope(String scope)
scope - the scope to setCopyright © 2000-2014 Apache Software Foundation. All Rights Reserved.