Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.action
Class ReadStatsInterceptor

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

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

A WebWork interceptor which records a read stat for a particular object. This is designed to intercept an action which views a category, forum or thread. Set the type as to which type of object is being viewed. Category, forum and thread views are supported.

See Also:
Serialized Form

Field Summary
static java.lang.String CATEGORY
          Indicates a category view.
static java.lang.String FORUM
          Indicates a forum view.
static java.lang.String THREAD
          Indicates a thread view.
 
Fields inherited from class com.opensymphony.xwork.interceptor.AroundInterceptor
log
 
Constructor Summary
ReadStatsInterceptor()
           
 
Method Summary
protected  void after(com.opensymphony.xwork.ActionInvocation in, java.lang.String result)
          Records a read stat for a given object.
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

CATEGORY

public static final java.lang.String CATEGORY
Indicates a category view.

See Also:
Constant Field Values

FORUM

public static final java.lang.String FORUM
Indicates a forum view.

See Also:
Constant Field Values

THREAD

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

See Also:
Constant Field Values
Constructor Detail

ReadStatsInterceptor

public ReadStatsInterceptor()
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:
CATEGORY, FORUM, THREAD

setType

public void setType(java.lang.String type)
Sets the type of read stat to create. Must be a CATEGORY, FORUM or 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 a read stat for a given object.

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.