001/* 002 * (C) Copyright 2015 Nuxeo SA (http://nuxeo.com/) and contributors. 003 * 004 * All rights reserved. This program and the accompanying materials 005 * are made available under the terms of the GNU Lesser General Public License 006 * (LGPL) version 2.1 which accompanies this distribution, and is available at 007 * http://www.gnu.org/licenses/lgpl-2.1.html 008 * 009 * This library is distributed in the hope that it will be useful, 010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 012 * Lesser General Public License for more details. 013 * 014 * Contributors: 015 * Andre Justo 016 * Anahide Tchertchian 017 */ 018package org.nuxeo.runtime.services.config; 019 020/** 021 * Service holding runtime configuration properties. 022 * 023 * @since 7.4 024 */ 025public interface ConfigurationService { 026 027 /** 028 * Returns the given property value if any, otherwise null. 029 * 030 * @param key the property key 031 */ 032 String getProperty(String key); 033 034 /** 035 * Returns the given property value if any, otherwise returns the given default value. 036 * 037 * @param key the property key 038 * @param defaultValue the default value for this key 039 */ 040 String getProperty(String key, String defaultValue); 041 042 /** 043 * Returns true if given property is true when compared to a boolean value. 044 */ 045 boolean isBooleanPropertyTrue(String key); 046 047 /** 048 * Returns true if given property is false when compared to a boolean value. 049 */ 050 boolean isBooleanPropertyFalse(String key); 051 052}