Class FormsCacheService

java.lang.Object
fr.paris.lutece.portal.service.cache.AbstractCacheableService<String,Object>
fr.paris.lutece.plugins.forms.service.cache.FormsCacheService
All Implemented Interfaces:
fr.paris.lutece.portal.service.cache.CacheableService<String,Object>, fr.paris.lutece.portal.service.cache.Lutece107Cache<String,Object>, fr.paris.lutece.portal.service.util.LuteceService, Closeable, Serializable, AutoCloseable, Iterable<javax.cache.Cache.Entry<String,Object>>, javax.cache.Cache<String,Object>

@ApplicationScoped public class FormsCacheService extends fr.paris.lutece.portal.service.cache.AbstractCacheableService<String,Object>
See Also:
  • Constructor Details

    • FormsCacheService

      public FormsCacheService()
  • Method Details

    • initCache

      @PostConstruct public void initCache()
      Overrides:
      initCache in class fr.paris.lutece.portal.service.cache.AbstractCacheableService<String,Object>
    • getName

      public String getName()
    • getStepCacheKey

      public String getStepCacheKey(int nStepID)
    • getInitialStepCacheKey

      public String getInitialStepCacheKey(int nIdForm)
    • getIdStepByFormKey

      public String getIdStepByFormKey(int nIdQuestion)
    • getFormCacheKey

      public String getFormCacheKey(int nIdForm)
    • getFormListCacheKey

      public String getFormListCacheKey()
    • getControlCacheKey

      public String getControlCacheKey(int nIdControl)
    • getControlByControlTargetAndTypeCacheKey

      public String getControlByControlTargetAndTypeCacheKey(int nIdControlTarget, ControlType controlType)
    • getControlByQuestionAndTypeCacheKey

      public String getControlByQuestionAndTypeCacheKey(int nIdQuestion, String strControlType)
    • getQuestionCacheKey

      public String getQuestionCacheKey(int nIdQuestion)
    • getUncompleteQuestionCacheKey

      public String getUncompleteQuestionCacheKey()
    • getUncompleteQuestionByFormCacheKey

      public String getUncompleteQuestionByFormCacheKey(int nIdForm)
    • getFormDisplayCacheKey

      public String getFormDisplayCacheKey(int nIdFormDisplay)
    • getFormDisplayListByParentCacheKey

      public String getFormDisplayListByParentCacheKey(int nIdStep, int nIdParent)
    • getGroupCacheKey

      public String getGroupCacheKey(int nIdGroup)
    • getControlGroupCacheKey

      public String getControlGroupCacheKey(int nIdControlGroup)
    • getTransitionsListFromStepCacheKey

      public String getTransitionsListFromStepCacheKey(int nIdStep)
    • getFormMessageByFormCacheKey

      public String getFormMessageByFormCacheKey(int nIdForm)
    • put

      public void put(String key, Object value)
      Puts a value in the cache. A failure of the cache (a value the provider cannot serialize, a closed cache, a provider error) is logged and never reaches the caller: the value is then read from the database again.
      Specified by:
      put in interface javax.cache.Cache<String,Object>
      Overrides:
      put in class fr.paris.lutece.portal.service.cache.AbstractCacheableService<String,Object>
    • get

      public Object get(String key)
      Specified by:
      get in interface javax.cache.Cache<String,Object>
      Overrides:
      get in class fr.paris.lutece.portal.service.cache.AbstractCacheableService<String,Object>
    • remove

      public boolean remove(String key)
      Specified by:
      remove in interface javax.cache.Cache<String,Object>
      Overrides:
      remove in class fr.paris.lutece.portal.service.cache.AbstractCacheableService<String,Object>
    • resetCache

      public void resetCache()
      Resets the cache. Within a transaction (form import or copy, which write hundreds of objects), the reset is done once, after the transaction completes: the other requests cannot cache again the data read before the commit, and the cache (shared by every instance under Hazelcast) is not emptied for each written object.
      Specified by:
      resetCache in interface fr.paris.lutece.portal.service.cache.CacheableService<String,Object>
      Overrides:
      resetCache in class fr.paris.lutece.portal.service.cache.AbstractCacheableService<String,Object>
    • processEntryEvent

      public void processEntryEvent(@Observes fr.paris.lutece.plugins.genericattributes.business.EntryEvent event)
      Process an entry event
      Parameters:
      event - The event to process