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

org.yarnandtail.andhow.AndHowConfiguration Maven / Gradle / Ivy

Go to download

Simple typed and validated configuration loading for web apps, command line or any environment application.

There is a newer version: 1.5.0
Show newest version
package org.yarnandtail.andhow;

import java.util.List;
import org.yarnandtail.andhow.api.*;

/**
 *
 * @author ericeverman
 */
public interface AndHowConfiguration {
	List buildLoaders();
	
	List getRegisteredGroups();

	NamingStrategy getNamingStrategy();
	
	/**
	 * Sets the command line arguments, removing any previously set commandline args.
	 *
	 * @param commandLineArgs
	 * @return
	 */
	C setCmdLineArgs(String[] commandLineArgs);
	
	
	/**
	 * Sets a fixed, non-configurable value for a Property.
	 *
	 * Property values set in this way use the FixedValueLoader to load values
	 * prior to any other loader. Since the first loaded value for a Property
	 * 'wins', this effectively fixes the value and makes it non-configurable.
	 *
	 * @param  The type of Property and value
	 * @param property The property to set a value for
	 * @param value The value to set.
	 * @return
	 */
	 C addFixedValue(Property property, T value);
	
	/**
	 * Removes a PropertyValue from the list of fixed values.
	 *
	 * It is not an error to attempt to remove a property that is not in the
	 * current fixed value list.
	 *
	 * @param property A non-null property.
	 * @return
	 */
	C removeFixedValue(Property property);
	
	void build();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy