org.apache.struts2.portlet.interceptor
Class PortletPreferencesInterceptor

java.lang.Object
  extended by com.opensymphony.xwork2.interceptor.AbstractInterceptor
      extended by org.apache.struts2.portlet.interceptor.PortletPreferencesInterceptor
All Implemented Interfaces:
Interceptor, Serializable, StrutsStatics

public class PortletPreferencesInterceptor
extends AbstractInterceptor
implements StrutsStatics

An interceptor which provides an implementation of PortletPreferences if the Action implements PortletPreferencesAware. If running in a servlet environment, a testing implementation of PortletPreferences will be created and provided, but it should not be used in a production environment.

Interceptor parameters:

Extending the interceptor:

There are no known extension points for this interceptor.

Example code:

 
 <action name="someAction" class="com.examples.SomeAction">
     <interceptor-ref name="portlet-preferences"/>
     <interceptor-ref name="basicStack"/>
     <result name="success">good_result.ftl</result>
 </action>
 
 

See Also:
PortletPreferencesAware, Serialized Form

Field Summary
private static Log LOG
           
 
Fields inherited from interface org.apache.struts2.StrutsStatics
HTTP_REQUEST, HTTP_RESPONSE, PAGE_CONTEXT, SERVLET_CONTEXT, SERVLET_DISPATCHER, STRUTS_PORTLET_CONTEXT
 
Constructor Summary
PortletPreferencesInterceptor()
           
 
Method Summary
 String intercept(ActionInvocation invocation)
          Override to handle interception
 
Methods inherited from class com.opensymphony.xwork2.interceptor.AbstractInterceptor
destroy, init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

private static final Log LOG
Constructor Detail

PortletPreferencesInterceptor

public PortletPreferencesInterceptor()
Method Detail

intercept

public String intercept(ActionInvocation invocation)
                 throws Exception
Description copied from class: AbstractInterceptor
Override to handle interception

Specified by:
intercept in interface Interceptor
Specified by:
intercept in class AbstractInterceptor
Returns:
the return code, either returned from ActionInvocation.invoke(), or from the interceptor itself.
Throws:
Exception - any system-level error, as defined in Action.execute().


Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.