info.hargrave.configuration.ConfigurationMedium Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of configurate Show documentation
Show all versions of configurate Show documentation
Configuration API that attempts to facilitate strongly-typed configuration
The newest version!
package info.hargrave.configuration;
import org.apache.commons.io.IOUtils;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.HashMap;
/**
* Defines access to a medium for configuration storage
* Date: 10/24/13
* Time: 10:44 PM
*/
public interface ConfigurationMedium {
/**
* Commit the configuration to the medium
* @param configuration configuration data map
* @throws IOException if the commit should fail for any reason
*/
public void commitConfiguration(HashMap configuration) throws IOException;
/**
* Read the configuration from the medium
* @return configuration data map
* @throws IOException if the read should fail for any reason
*/
public HashMap readConfiguration() throws IOException, ClassNotFoundException;
}