com.wassilak.configuration_service.configuration.Configuration Maven / Gradle / Ivy
Show all versions of configuration-service Show documentation
package com.wassilak.configuration_service.configuration;
import java.io.Serializable;
/**
* The Configuration interface defines the behavior of the Configuration
* object, which is a container for users to place application specific
* properties.
*
* Copyright (C) 2014 John Wassilak ([email protected])
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see http://www.gnu.org/licenses/.
*/
public interface Configuration extends Serializable {
/**
* The getApplicationName method returns the name of the application that
* the configuration was created for.
*
* @return the name of the application that the configuration was created
* for.
*/
public String getApplicationName();
/**
* The getApplicationVersion method returns the version of the application
* that the configuration was created for.
*
* @return the version of the application that the configuration was
* created for.
*/
public String getApplicationVersion();
/**
* The getProperty method returns the value to which the specified key is
* mapped, or null if this configuration contains no mapping for the key.
*
* @param key The key whose associated value is to be returned.
* @return The value to which the specified key is mapped, or null if this
* configuration contains no mapping for the key.
*/
public Object getProperty(String key);
/**
* The setProperty method associates the specified value with the
* specified key in this configuration. If the configuration previously
* contained a mapping for the key, the old value is replaced by the
* specified value.
*
* @param key The key with which the specified value is to be associated.
* @param value The value to be associated with the specified key.
*/
public void setProperty(String key, Object value);
}