All Downloads are FREE. Search and download functionalities are using the official Maven repository.

liquibase.configuration.ConfigurationValueProvider Maven / Gradle / Ivy

There is a newer version: 4.30.0
Show newest version
package liquibase.configuration;

import liquibase.command.CommandScope;
import liquibase.configuration.core.DefaultsFileValueProvider;

/**
 * Defines a way for {@link LiquibaseConfiguration} to find configured values.
 */
public interface ConfigurationValueProvider {

    /**
     * Returns the precedence of values returned by this provider. Higher a provider with higher precedence overrides values from lower precedence providers.
     * 

* Standard provider precedence: *
    *
  • 400 {@link liquibase.configuration.core.ScopeValueProvider}
  • *
  • 350 {@link liquibase.configuration.core.DeprecatedConfigurationValueProvider}
  • *
  • 250 Integration specific providers
  • *
  • 300: TODO JNDI attributes
  • *
  • 250: TODO Servlet Context
  • *
  • 200 {@link liquibase.configuration.core.SystemPropertyValueProvider}
  • *
  • 150 EnvironmentValueProvider
  • *
  • 100: TODO profile/context specific properties files
  • *
  • 50: {@link DefaultsFileValueProvider}
  • *
*/ int getPrecedence(); /** * Lookup the given key(s) in this source. * It is up to the implementation to provide any "smoothing" or translation of key names. * For example, an EnvironmentValueProvider will look check environment variables containing _'s rather than .'s. * * @param keyAndAliases an array of keys to check, where the first element is the canonical key name, any aliases for that key as later elements. * * @return null if the key is not defined in this provider. */ ProvidedValue getProvidedValue(String... keyAndAliases); /** * Perform any validation of keys/values stored in this provider for the given commandScope. * For example, check for keys that do not match anything expected. */ void validate(CommandScope commandScope) throws IllegalArgumentException; }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy