Class CachingPropertiesManagerImpl
- java.lang.Object
-
- org.onehippo.forge.properties.impl.AbstractPropertiesManager
-
- org.onehippo.forge.properties.impl.PropertiesManagerImpl
-
- org.onehippo.forge.properties.impl.CachingPropertiesManagerImpl
-
- All Implemented Interfaces:
PropertiesManager
public class CachingPropertiesManagerImpl extends PropertiesManagerImpl
-
-
Constructor Summary
Constructors Constructor Description CachingPropertiesManagerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
createCanonicalKey(org.hippoecm.hst.content.beans.standard.HippoBean location, String path)
Create a key for a location an a relative path of a properties document.protected PropertiesBean
getPropertiesBean(org.hippoecm.hst.content.beans.standard.HippoBean location, String path, Locale locale)
Get a serializable PropertiesBean by location, path and locale.void
invalidate(String canonicalPath)
Invalidate a cached document based on the canonical path of a properties document, or invalidate all if the path is null.protected void
storeInCache(String canonicalKey, String localeKey, PropertiesBean propertiesBean)
Store a properties bean in cache.-
Methods inherited from class org.onehippo.forge.properties.impl.PropertiesManagerImpl
getDefaultDocumentLocation, getDefaultDocumentName, getDefaultLocation, getPropertiesBean, getPropertiesBean, getPropertiesBeans, getTranslatedProperties, setDefaultDocumentLocation, setDefaultDocumentName
-
Methods inherited from class org.onehippo.forge.properties.impl.AbstractPropertiesManager
getProperties, getProperties, getPropertiesBean, getPropertiesBean, getPropertiesBeans
-
-
-
-
Method Detail
-
invalidate
public void invalidate(String canonicalPath)
Description copied from class:PropertiesManagerImpl
Invalidate a cached document based on the canonical path of a properties document, or invalidate all if the path is null.- Specified by:
invalidate
in interfacePropertiesManager
- Overrides:
invalidate
in classPropertiesManagerImpl
- Parameters:
canonicalPath
- the path of a properties document, relative to the base bean, or null.
-
getPropertiesBean
protected PropertiesBean getPropertiesBean(org.hippoecm.hst.content.beans.standard.HippoBean location, String path, Locale locale)
Description copied from class:PropertiesManagerImpl
Get a serializable PropertiesBean by location, path and locale.- Overrides:
getPropertiesBean
in classPropertiesManagerImpl
- Parameters:
location
- default location where to find properties beanspath
- path relative to the location for a particular beanlocale
- locale by which to find linked properties documents- Returns:
- Serializable cacheable properties bean, based on a properties document
-
storeInCache
protected void storeInCache(String canonicalKey, String localeKey, PropertiesBean propertiesBean)
Store a properties bean in cache.
-
-