Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.action
Class RecentHistoryInterceptor

java.lang.Object
  extended by com.opensymphony.xwork.interceptor.AroundInterceptor
      extended by com.jivesoftware.forum.action.RecentHistoryInterceptor
All Implemented Interfaces:
com.opensymphony.xwork.interceptor.Interceptor, java.io.Serializable

public class RecentHistoryInterceptor
extends com.opensymphony.xwork.interceptor.AroundInterceptor

A WebWork interceptor which records the last 'X' objects a user has viewed. This is designed to intercept an action which views a thread. Set the type as to which type of object is being viewed. Thread views are supported.

See Also:
Serialized Form

Field Summary
static int DEFAULT_HISTORY_NUMBER
          Jive Property Default value for number of objects to store
static java.lang.String PROPERTY_HISTORY_ENABLED
          Jive Property key for enabling user history
static java.lang.String PROPERTY_HISTORY_NUMBER
          Jive Property key for number of objects to store
static java.lang.String SESSION_HISTORY
          Jive Session key for storing object history
static java.lang.String THREAD
          Indicates a thread view.
 
Fields inherited from class com.opensymphony.xwork.interceptor.AroundInterceptor
log
 
Constructor Summary
RecentHistoryInterceptor()
           
 
Method Summary
protected  void after(com.opensymphony.xwork.ActionInvocation in, java.lang.String result)
          Records the given object in the user history.
protected  void before(com.opensymphony.xwork.ActionInvocation in)
          Does nothing in this implementation.
 java.lang.String getType()
          Returns the type of object this interceptor operates on.
 void setType(java.lang.String type)
          Sets the type of read stat to create.
 
Methods inherited from class com.opensymphony.xwork.interceptor.AroundInterceptor
destroy, init, intercept
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

THREAD

public static final java.lang.String THREAD
Indicates a thread view.

See Also:
Constant Field Values

PROPERTY_HISTORY_ENABLED

public static final java.lang.String PROPERTY_HISTORY_ENABLED
Jive Property key for enabling user history

See Also:
Constant Field Values

PROPERTY_HISTORY_NUMBER

public static final java.lang.String PROPERTY_HISTORY_NUMBER
Jive Property key for number of objects to store

See Also:
Constant Field Values

DEFAULT_HISTORY_NUMBER

public static final int DEFAULT_HISTORY_NUMBER
Jive Property Default value for number of objects to store

See Also:
Constant Field Values

SESSION_HISTORY

public static final java.lang.String SESSION_HISTORY
Jive Session key for storing object history

See Also:
Constant Field Values
Constructor Detail

RecentHistoryInterceptor

public RecentHistoryInterceptor()
Method Detail

getType

public java.lang.String getType()
Returns the type of object this interceptor operates on.

Returns:
the type of object this interceptor operates on.
See Also:
THREAD

setType

public void setType(java.lang.String type)
Sets the type of read stat to create. Must be a THREAD type. Any other input will result in an IllegalArgumentException.

Parameters:
type - the type of read stat to create.

before

protected void before(com.opensymphony.xwork.ActionInvocation in)
               throws java.lang.Exception
Does nothing in this implementation.

Specified by:
before in class com.opensymphony.xwork.interceptor.AroundInterceptor
Throws:
java.lang.Exception

after

protected void after(com.opensymphony.xwork.ActionInvocation in,
                     java.lang.String result)
              throws java.lang.Exception
Records the given object in the user history.

Specified by:
after in class com.opensymphony.xwork.interceptor.AroundInterceptor
Parameters:
in - the action invocation (the context of the action).
result - the result from the action execution.
Throws:
java.lang.Exception - if an error occurs while executing the action.

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.