Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.platform.contentview.jsf
Class ContentViewCache

java.lang.Object
  extended by org.nuxeo.ecm.platform.contentview.jsf.ContentViewCache
All Implemented Interfaces:
Serializable

public class ContentViewCache
extends Object
implements Serializable

Cache for content views, handling cache keys set on content views.

Each content view instance will be cached if its cache key is not null. Each instance will be cached using the cache key so its state is restored. Also handles refresh of caches when receiving events configured on the content view.

Since:
5.4
Author:
Anahide Tchertchian
See Also:
Serialized Form

Field Summary
static Integer DEFAULT_CACHE_SIZE
          Default cache size, set to 5 instances per content view
 
Constructor Summary
ContentViewCache()
           
 
Method Summary
 void add(ContentView cView)
          Add given content view to the cache, resolving its cache key and initializing it with its cache size.
 ContentView get(String name)
          Returns cached content view with given name, or null if not found.
 void refresh(String contentViewName, boolean rewind)
          Refresh page providers for content views in the cache with given name.refreshEventToContentViewName
 void refreshOnEvent(String eventName)
          Refresh page providers for content views having declared given event as a refresh event.
 void reset(String contentViewName)
          Resets all cached information for given content view.
 void resetAll()
          Resets all cached information for all content views, as well as configuration caches (refresh and reset events linked to content views).
 void resetAllContent()
          Resets all cached information for all content views
 void resetPageProvider(String contentViewName)
          Resets page providers for content views in the cache with given name.
 void resetPageProviderOnEvent(String eventName)
          Resets page providers for content views having declared given event as a reset event.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_CACHE_SIZE

public static final Integer DEFAULT_CACHE_SIZE
Default cache size, set to 5 instances per content view

Constructor Detail

ContentViewCache

public ContentViewCache()
Method Detail

add

public void add(ContentView cView)
Add given content view to the cache, resolving its cache key and initializing it with its cache size.


get

public ContentView get(String name)
Returns cached content view with given name, or null if not found.


refresh

public void refresh(String contentViewName,
                    boolean rewind)
Refresh page providers for content views in the cache with given name.refreshEventToContentViewName

Other contextual information set on the content view and the page provider will be kept.


resetPageProvider

public void resetPageProvider(String contentViewName)
Resets page providers for content views in the cache with given name.

Other contextual information set on the content view will be kept.


refreshOnEvent

public void refreshOnEvent(String eventName)
Refresh page providers for content views having declared given event as a refresh event.

Other contextual information set on the content view and the page provider will be kept.


resetPageProviderOnEvent

public void resetPageProviderOnEvent(String eventName)
Resets page providers for content views having declared given event as a reset event.

Other contextual information set on the content view will be kept.


reset

public void reset(String contentViewName)
Resets all cached information for given content view.


resetAllContent

public void resetAllContent()
Resets all cached information for all content views


resetAll

public void resetAll()
Resets all cached information for all content views, as well as configuration caches (refresh and reset events linked to content views).


Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.