Class PropertiesManagerImpl

    • Constructor Detail

      • PropertiesManagerImpl

        public PropertiesManagerImpl()
    • 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 for
        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.
      • 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 for
        baseBean - 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 beans
        path - path relative to the location for a particular bean
        locale - 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)