Class PropertiesManagerImpl
- java.lang.Object
-
- org.onehippo.forge.properties.impl.AbstractPropertiesManager
-
- org.onehippo.forge.properties.impl.PropertiesManagerImpl
-
- All Implemented Interfaces:
PropertiesManager
- Direct Known Subclasses:
CachingMapPropertiesManagerImpl
,CachingPropertiesManagerImpl
public class PropertiesManagerImpl extends AbstractPropertiesManager
Note: this class is deprecated. Do not use it because it has bad performance. Use the CachingPropertiesManagerImpl instead in your Spring configuration.
-
-
Constructor Summary
Constructors Constructor Description PropertiesManagerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDefaultDocumentLocation()
Get the location where properties are searched.String
getDefaultDocumentName()
Get the default name of the property documents that are searched for.protected org.hippoecm.hst.content.beans.standard.HippoBean
getDefaultLocation(org.hippoecm.hst.content.beans.standard.HippoBean baseBean)
Get the base location where the properties documents are stored.PropertiesBean
getPropertiesBean(String path, org.hippoecm.hst.content.beans.standard.HippoBean baseBean, Locale locale)
Get the bean representing the properties document with the given name at the configured location, relative to the given base bean (if configured location does not start with slash).protected PropertiesBean
getPropertiesBean(org.hippoecm.hst.content.beans.standard.HippoBean location, String path, Locale locale)
Get a serializable PropertiesBean by location, path and locale.PropertiesBean
getPropertiesBean(org.hippoecm.hst.content.beans.standard.HippoBean baseBean, Locale locale)
Get the bean representing the properties document with the configured default name at the configured location, relative to the given base bean (if configured location does not start with slash).List<PropertiesBean>
getPropertiesBeans(List<String> paths, org.hippoecm.hst.content.beans.standard.HippoBean baseBean, Locale locale)
Get the beans representing the properties documents with the given names at the configured location, relative to the given base bean (if configured location does not start with slash).protected Properties
getTranslatedProperties(org.hippoecm.hst.content.beans.standard.HippoBean location, String path, Locale 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.void
setDefaultDocumentLocation(String defaultDocumentLocation)
void
setDefaultDocumentName(String defaultDocumentName)
-
Methods inherited from class org.onehippo.forge.properties.impl.AbstractPropertiesManager
getProperties, getProperties, getPropertiesBean, getPropertiesBean, getPropertiesBeans
-
-
-
-
Method Detail
-
getDefaultDocumentLocation
public String getDefaultDocumentLocation()
Get the location where properties are searched. The location is relative to the baseBean in the API methods, whether it starts with '/' or not.
-
getDefaultDocumentName
public String getDefaultDocumentName()
Get the default name of the property documents that are searched for.
-
getPropertiesBean
public PropertiesBean getPropertiesBean(org.hippoecm.hst.content.beans.standard.HippoBean baseBean, Locale locale)
Get the bean representing the properties document with the configured default name at the configured location, relative to the given base bean (if configured location does not start with slash).- Parameters:
baseBean
- the base bean from where to get the properties location (if location does not start with slash), normally the siteContentBaseBean.locale
- the locale by which to try to retrieve linked translated properties.
-
getPropertiesBean
public PropertiesBean getPropertiesBean(String path, org.hippoecm.hst.content.beans.standard.HippoBean baseBean, Locale locale)
Get the bean representing the properties document with the given name at the configured location, relative to the given base bean (if configured location does not start with slash).- Parameters:
path
- the relative path of the properties documents to search forbaseBean
- the base bean from where to get the properties location (if location does not start with slash), normally the siteContentBaseBean.locale
- the locale by which to try to retrieve linked translated properties.
-
getPropertiesBeans
public List<PropertiesBean> getPropertiesBeans(List<String> paths, org.hippoecm.hst.content.beans.standard.HippoBean baseBean, Locale locale)
Get the beans representing the properties documents with the given names at the configured location, relative to the given base bean (if configured location does not start with slash).- Parameters:
paths
- the relative paths of the properties documents to search forbaseBean
- the base bean from where to get the properties location, normally the siteContentBaseBean.locale
- the locale by which to try to retrieve linked translated properties.
-
invalidate
public 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.- Parameters:
canonicalPath
- the path of a properties document, relative to the base bean, or null.
-
setDefaultDocumentLocation
public void setDefaultDocumentLocation(String defaultDocumentLocation)
-
setDefaultDocumentName
public void setDefaultDocumentName(String defaultDocumentName)
-
getDefaultLocation
protected org.hippoecm.hst.content.beans.standard.HippoBean getDefaultLocation(org.hippoecm.hst.content.beans.standard.HippoBean baseBean)
Get the base location where the properties documents are stored.- Parameters:
baseBean
- normally the site content base bean- Returns:
- default location bean
-
getPropertiesBean
protected PropertiesBean getPropertiesBean(org.hippoecm.hst.content.beans.standard.HippoBean location, String path, Locale locale)
Get a serializable PropertiesBean by location, path and locale.- 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
-
getTranslatedProperties
protected Properties getTranslatedProperties(org.hippoecm.hst.content.beans.standard.HippoBean location, String path, Locale locale)
-
-