001/*
002 * jPOS Project [http://jpos.org]
003 * Copyright (C) 2000-2026 jPOS Software SRL
004 *
005 * This program is free software: you can redistribute it and/or modify
006 * it under the terms of the GNU Affero General Public License as
007 * published by the Free Software Foundation, either version 3 of the
008 * License, or (at your option) any later version.
009 *
010 * This program is distributed in the hope that it will be useful,
011 * but WITHOUT ANY WARRANTY; without even the implied warranty of
012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
013 * GNU Affero General Public License for more details.
014 *
015 * You should have received a copy of the GNU Affero General Public License
016 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
017 */
018
019package org.jpos.core;
020
021
022import java.util.Set;
023
024/**
025 * @author apr@cs.com.uy
026 * @version $Id$
027 * @since jPOS 1.1
028 *
029 * CardAgents relies on a Configuration object to provide
030 * runtime configuration parameters such as merchant number, etc.
031 */
032public interface Configuration {
033    String get(String propertyName);
034    /**
035     * @param propertyName  ditto
036     * @return all properties with a given name (or a zero-length array)
037     */
038    String[] getAll(String propertyName);
039    int[] getInts(String propertyName);
040    long[] getLongs(String propertyName);
041    double[] getDoubles(String propertyName);
042    boolean[] getBooleans(String propertyName);
043    String get(String propertyName, String defaultValue);
044    int getInt(String propertyName);
045    int getInt(String propertyName, int defaultValue);
046    long getLong(String propertyName);
047    long getLong(String propertyName, long defaultValue);
048    double getDouble(String propertyName);
049    double getDouble(String propertyName, double defaultValue);
050    boolean getBoolean(String propertyName);
051    boolean getBoolean(String propertyName, boolean defaultValue);
052    /**
053     * @param name the Property name
054     * @param value typically a String, but could be a String[] too
055     */
056    void put(String name, Object value);
057    Set<String> keySet();
058}