net.sf.scmwebgui
Class CacheFilter

java.lang.Object
  extended by net.sf.scmwebgui.AbstractCacheFilter
      extended by net.sf.scmwebgui.CacheFilter
All Implemented Interfaces:
javax.servlet.Filter, net.sourceforge.sconman.ISCMEventListener

public class CacheFilter
extends AbstractCacheFilter
implements net.sourceforge.sconman.ISCMEventListener

This is the specific cache filter that will be used in SCONMAN-WEBGUI

Author:
mballesteros

Field Summary
 
Fields inherited from class net.sf.scmwebgui.AbstractCacheFilter
CACHE_CLEAN_PERIOD_INIT_PARAM, CACHE_DIRECTORY_INIT_PARAM, CACHE_TIME_OF_LIFE_INIT_PARAM, ctx
 
Constructor Summary
CacheFilter()
           
 
Method Summary
 void afterAddContent(net.sourceforge.sconman.Content content)
           
 void afterAddRelationship(net.sourceforge.sconman.Content content, net.sourceforge.sconman.Content relatedContent)
           
 void afterModifyContent(net.sourceforge.sconman.Content content)
           
 void afterModifyRelatedContent(net.sourceforge.sconman.Content content)
           
 void afterRemoveContent(net.sourceforge.sconman.Content content)
           
 void afterRemoveRelationship(net.sourceforge.sconman.Content content, net.sourceforge.sconman.Content relatedContent)
           
 void afterSaveProject(net.sourceforge.sconman.Project arg0)
           
 void beforeAddContent(net.sourceforge.sconman.Content arg0)
           
 void beforeAddRelationship(net.sourceforge.sconman.Content content, net.sourceforge.sconman.Content relatedContent)
           
 void beforeModifyContent(net.sourceforge.sconman.Content arg0)
           
 void beforeRemoveContent(net.sourceforge.sconman.Content content)
           
 void beforeRemoveRelationship(net.sourceforge.sconman.Content content, net.sourceforge.sconman.Content relatedContent)
           
 void beforeSaveProject(net.sourceforge.sconman.Project project)
           
protected  java.lang.String getCachedFilePath(RequestContext reqCtx)
          Maps a context URI to a cached file path
protected  java.lang.String getCategoryCachePath(java.lang.String project, java.lang.String categoryPath)
           
 void onCategoryAdded(net.sourceforge.sconman.Category parent, net.sourceforge.sconman.Category newCategory)
           
 void onCategoryModified(net.sourceforge.sconman.Category category)
           
 void onCategoryRemoved(net.sourceforge.sconman.Category parent, java.lang.String removedCategoryPath)
           
 void onChangeProperty(net.sourceforge.sconman.Category arg0, java.lang.String arg1)
           
 void onClose(net.sourceforge.sconman.Project arg0)
           
 void onLoadProject()
           
protected  boolean shouldCache(javax.servlet.http.HttpServletRequest req)
          No cache when request attribute "__cache" equals "bypass"
protected  boolean shouldRefresh(javax.servlet.http.HttpServletRequest req)
          Refresh when request attribute "__cache" equals "refresh"
 
Methods inherited from class net.sf.scmwebgui.AbstractCacheFilter
destroy, doFilter, init, invalidateCache, invalidateContentCache
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheFilter

public CacheFilter()
Method Detail

shouldCache

protected boolean shouldCache(javax.servlet.http.HttpServletRequest req)
No cache when request attribute "__cache" equals "bypass"

Specified by:
shouldCache in class AbstractCacheFilter
Parameters:
req -
Returns:

shouldRefresh

protected boolean shouldRefresh(javax.servlet.http.HttpServletRequest req)
Refresh when request attribute "__cache" equals "refresh"

Specified by:
shouldRefresh in class AbstractCacheFilter
Returns:

beforeAddContent

public void beforeAddContent(net.sourceforge.sconman.Content arg0)
Specified by:
beforeAddContent in interface net.sourceforge.sconman.ISCMEventListener

afterAddContent

public void afterAddContent(net.sourceforge.sconman.Content content)
Specified by:
afterAddContent in interface net.sourceforge.sconman.ISCMEventListener

beforeModifyContent

public void beforeModifyContent(net.sourceforge.sconman.Content arg0)
Specified by:
beforeModifyContent in interface net.sourceforge.sconman.ISCMEventListener

afterModifyContent

public void afterModifyContent(net.sourceforge.sconman.Content content)
Specified by:
afterModifyContent in interface net.sourceforge.sconman.ISCMEventListener

beforeRemoveContent

public void beforeRemoveContent(net.sourceforge.sconman.Content content)
Specified by:
beforeRemoveContent in interface net.sourceforge.sconman.ISCMEventListener

afterRemoveContent

public void afterRemoveContent(net.sourceforge.sconman.Content content)
Specified by:
afterRemoveContent in interface net.sourceforge.sconman.ISCMEventListener

onLoadProject

public void onLoadProject()
Specified by:
onLoadProject in interface net.sourceforge.sconman.ISCMEventListener

onChangeProperty

public void onChangeProperty(net.sourceforge.sconman.Category arg0,
                             java.lang.String arg1)
Specified by:
onChangeProperty in interface net.sourceforge.sconman.ISCMEventListener

onCategoryAdded

public void onCategoryAdded(net.sourceforge.sconman.Category parent,
                            net.sourceforge.sconman.Category newCategory)
Specified by:
onCategoryAdded in interface net.sourceforge.sconman.ISCMEventListener

onCategoryRemoved

public void onCategoryRemoved(net.sourceforge.sconman.Category parent,
                              java.lang.String removedCategoryPath)
Specified by:
onCategoryRemoved in interface net.sourceforge.sconman.ISCMEventListener

onCategoryModified

public void onCategoryModified(net.sourceforge.sconman.Category category)
Specified by:
onCategoryModified in interface net.sourceforge.sconman.ISCMEventListener

getCachedFilePath

protected java.lang.String getCachedFilePath(RequestContext reqCtx)
Maps a context URI to a cached file path

Specified by:
getCachedFilePath in class AbstractCacheFilter
Parameters:
ctxURI -
Returns:

getCategoryCachePath

protected java.lang.String getCategoryCachePath(java.lang.String project,
                                                java.lang.String categoryPath)

beforeAddRelationship

public void beforeAddRelationship(net.sourceforge.sconman.Content content,
                                  net.sourceforge.sconman.Content relatedContent)
Specified by:
beforeAddRelationship in interface net.sourceforge.sconman.ISCMEventListener

afterAddRelationship

public void afterAddRelationship(net.sourceforge.sconman.Content content,
                                 net.sourceforge.sconman.Content relatedContent)
Specified by:
afterAddRelationship in interface net.sourceforge.sconman.ISCMEventListener

beforeRemoveRelationship

public void beforeRemoveRelationship(net.sourceforge.sconman.Content content,
                                     net.sourceforge.sconman.Content relatedContent)
Specified by:
beforeRemoveRelationship in interface net.sourceforge.sconman.ISCMEventListener

afterRemoveRelationship

public void afterRemoveRelationship(net.sourceforge.sconman.Content content,
                                    net.sourceforge.sconman.Content relatedContent)
Specified by:
afterRemoveRelationship in interface net.sourceforge.sconman.ISCMEventListener

afterModifyRelatedContent

public void afterModifyRelatedContent(net.sourceforge.sconman.Content content)
Specified by:
afterModifyRelatedContent in interface net.sourceforge.sconman.ISCMEventListener

beforeSaveProject

public void beforeSaveProject(net.sourceforge.sconman.Project project)
Specified by:
beforeSaveProject in interface net.sourceforge.sconman.ISCMEventListener

afterSaveProject

public void afterSaveProject(net.sourceforge.sconman.Project arg0)
Specified by:
afterSaveProject in interface net.sourceforge.sconman.ISCMEventListener

onClose

public void onClose(net.sourceforge.sconman.Project arg0)
Specified by:
onClose in interface net.sourceforge.sconman.ISCMEventListener


Copyright null null. All Rights Reserved.