001 /* 002 * Licensed to the Apache Software Foundation (ASF) under one 003 * or more contributor license agreements. See the NOTICE file 004 * distributed with this work for additional information 005 * regarding copyright ownership. The ASF licenses this file 006 * to you under the Apache License, Version 2.0 (the 007 * "License"); you may not use this file except in compliance 008 * with the License. You may obtain a copy of the License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, 013 * software distributed under the License is distributed on an 014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 015 * KIND, either express or implied. See the License for the 016 * specific language governing permissions and limitations 017 * under the License. 018 */ 019 package org.apache.fulcrum.yaafi.framework.configuration; 020 021 import java.util.Properties; 022 023 /** 024 * This interface allows to resolve component configuration properties. These 025 * properties are used to expand variables found in the componentConfiguration.xml. 026 * The main motivation for this interface is to allow users to hook up 027 * commons-configuration to resolve global parameters easily without 028 * coupling this implementation to any external libraries. 029 * 030 * @author <a href="mailto:siegfried.goeschl@it20one.at">Siegfried Goeschl</a> 031 */ 032 public interface ComponentConfigurationPropertiesResolver 033 { 034 /** default file name of the component config property file */ 035 String COMPONENT_CONFIG_PROPERTIES_VALUE = "/componentConfiguration.properties"; 036 037 /** 038 * Resolve custom properties 039 * 040 * @param defaults the default properties 041 * @return the custom properties 042 */ 043 Properties resolve(Properties defaults) throws Exception; 044 }