KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > portlet > forums > interceptors > ResourceCacheInvalidatorInterceptor


1 /*****************************************
2  * *
3  * JBoss Portal: The OpenSource Portal *
4  * *
5  * Forums JBoss Portlet *
6  * *
7  * Distributable under GPL license. *
8  * See terms of license at gnu.org. *
9  * *
10  *****************************************/

11 package org.jboss.portlet.forums.interceptors;
12
13
14 /**
15  * Todo : add invalidation for the general RSS topic and complete invalidation for other commands
16  *
17  * @author <a HREF="mailto:julien@jboss.org">Julien Viet</a>
18  * @version $Revision: 1.3 $
19  */

20 public class ResourceCacheInvalidatorInterceptor // extends AbstractCommandFilter
21
{
22    /*
23       private ResourceManager mgr;
24       public ResourceManager getManager()
25       {
26          return mgr;
27       }
28       public void setManager(ResourceManager mgr)
29       {
30          this.mgr = mgr;
31       }
32       public Result filter(ServerCommand cmd) throws CommandException
33       {
34          Result result = getNext().filter(cmd);
35          ResultType type = result.getType();
36          if (type == CommandConstants.TYPE_REPLY_POSTED || result.getType() == CommandConstants.TYPE_NEW_TOPIC_POSTED)
37          {
38             String forumId = ((ForumCommand)cmd).forum.getId().toString();
39             mgr.remove(BBTools.computeCacheKey(false, forumId));
40             mgr.remove(BBTools.computeCacheKey(true, forumId));
41          }
42          return result;
43       }
44     */

45 }
Popular Tags