Class ConfigurationFilesManager


  • @Component
    public class ConfigurationFilesManager
    extends java.lang.Object
    Author:
    Baptiste Mesta, Emmanuel Duchastenier, Anthony Birembaut
    • Constructor Detail

      • ConfigurationFilesManager

        public ConfigurationFilesManager()
    • Method Detail

      • getAlsoCustomAndInternalPropertiesFromFilename

        protected java.util.Properties getAlsoCustomAndInternalPropertiesFromFilename​(long tenantId,
                                                                                      java.lang.String propertiesFileName,
                                                                                      boolean setKeysToLowerCase)
      • propertiesKeysToLowerCaseIfNeeded

        protected java.util.Properties propertiesKeysToLowerCaseIfNeeded​(java.util.Properties properties,
                                                                         boolean setKeysToLowerCase)
      • getTenantProperties

        public java.util.Properties getTenantProperties​(java.lang.String propertiesFileName,
                                                        long tenantId)
      • getTenantProperties

        public java.util.Properties getTenantProperties​(java.lang.String propertiesFileName,
                                                        long tenantId,
                                                        boolean setKeysToLowerCase)
      • getProperties

        public static java.util.Properties getProperties​(byte[] content)
        Parses the content as a Properties object. If content is null, return empty properties.
      • removeProperty

        public void removeProperty​(java.lang.String propertiesFilename,
                                   long tenantId,
                                   java.lang.String propertyName)
                            throws java.io.IOException
        Throws:
        java.io.IOException
      • getInternalPropertiesFilename

        public static java.lang.String getInternalPropertiesFilename​(java.lang.String propertiesFilename)
      • getCustomPropertiesFilename

        public static java.lang.String getCustomPropertiesFilename​(java.lang.String propertiesFilename)
      • update

        protected void update​(long tenantId,
                              java.lang.String propertiesFilename,
                              java.util.Properties properties)
                       throws java.io.IOException
        Throws:
        java.io.IOException
      • getConfigurationFilesUtils

        protected BonitaHomeServer getConfigurationFilesUtils()
      • getTenantPortalConfiguration

        protected java.util.Properties getTenantPortalConfiguration​(long tenantId,
                                                                    java.lang.String propertiesFilename)
      • getTenantConfigurations

        protected java.util.Map<java.lang.String,​java.util.Properties> getTenantConfigurations​(long tenantId)
                                                                                              throws java.io.IOException
        Throws:
        java.io.IOException
      • setProperty

        public void setProperty​(java.lang.String propertiesFilename,
                                long tenantId,
                                java.lang.String propertyName,
                                java.lang.String propertyValue)
                         throws java.io.IOException
        Throws:
        java.io.IOException