Class ContextProperties

    • Method Detail

      • write

        public void write()
                   throws IOException
        This method saves the properties-file connected by ContextProperties.
        NOTE: only call this on an ContextProperties _NOT_ created from an InputStream!
        Throws:
        IOException - raised when the file cannot be written
      • getInt

        public int getInt​(String property)
      • getInt

        public int getInt​(String property,
                          int defaultValue)
      • getLong

        public long getLong​(String property)
      • getLong

        public long getLong​(String property,
                            long defaultValue)
      • getBoolean

        public boolean getBoolean​(String property)
      • getBoolean

        public boolean getBoolean​(String property,
                                  boolean defaultValue)
      • getDouble

        public double getDouble​(String property)
      • getDouble

        public double getDouble​(String property,
                                double defaultValue)
      • getFloat

        public float getFloat​(String property)
      • getFloat

        public float getFloat​(String property,
                              float defaultValue)
      • getPropertyWithSubstitutions

        public String getPropertyWithSubstitutions​(String property)
        Gets the property value replacing all variable references
        Parameters:
        property - name of the setting to process
        Returns:
        the porperty's value with expanded variables
      • getPropertyWithSubstitutions

        public String getPropertyWithSubstitutions​(String property,
                                                   String defaultValue)
      • getMaxBackups

        public int getMaxBackups()
      • setMaxBackups

        public void setMaxBackups​(int maxBackups)
      • getTenantProperty

        public String getTenantProperty​(String tenant,
                                        String property)
      • getProperties

        public Map<String,​String> getProperties​(String prefix)
        Gets all the properties whose name starts with the given prefix.
        Parameters:
        prefix - property's prefix
        Returns:
        the map property_name = property_value
      • removeTenantProperties

        public void removeTenantProperties​(String tenant)
        Removes all the properties of a specific tenant
        Parameters:
        tenant - name of the tenant
      • replicateTenantSettings

        public void replicateTenantSettings​(String tenant)
        Replicates the settings of the default tenant to a new tenant
        Parameters:
        tenant - name of the tenant