1 /* 2 * $Id: ConfigurationBuilder.java 7963 2007-08-21 08:53:15Z dirk.olmes $ 3 * -------------------------------------------------------------------------------------- 4 * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com 5 * 6 * The software in this package is published under the terms of the CPAL v1.0 7 * license, a copy of which has been included with this distribution in the 8 * LICENSE.txt file. 9 */ 10 11 package org.mule.config; 12 13 import org.mule.umo.manager.UMOManager; 14 15 import java.util.Properties; 16 17 /** 18 * <code>ConfigurationBuilder</code> is a Strategy class used to configure a 19 * UMOManager instance using different configuration mechanisms, such as for Xml, a 20 * script or some other means. 21 */ 22 public interface ConfigurationBuilder 23 { 24 /** 25 * Will configure a UMOManager based on the configuration file(s) provided. 26 * 27 * @param configResources a comma separated list of configuration files to load, 28 * this should be accessible on the classpath or filesystem 29 * @return A configured UMOManager 30 * @throws ConfigurationException 31 */ 32 UMOManager configure(String configResources) throws ConfigurationException; 33 34 /** 35 * Will configure a UMOManager based on the configuration file(s) provided. 36 * 37 * @param configResources - A comma-separated list of configuration files to 38 * load, these should be accessible on the classpath or filesystem 39 * @param startupPropertiesFile - An optional file containing startup properties. 40 * This is useful for managing different environments (dev, test, 41 * production) 42 * @return A configured UMOManager 43 * @throws ConfigurationException 44 */ 45 UMOManager configure(String configResources, String startupPropertiesFile) throws ConfigurationException; 46 47 /** 48 * Will configure a UMOManager based on the configurations made available through 49 * Readers 50 * 51 * @param configResources - An array of Readers, each Reader contains a portion 52 * of the Mule server configuration. 53 * @param startupProperties - Optional properties to be set before configuring 54 * the Mule server. This is useful for managing different environments 55 * (dev, test, production) 56 * @return A configured UMOManager 57 * @throws ConfigurationException 58 */ 59 UMOManager configure(ReaderResource[] configResources, Properties startupProperties) 60 throws ConfigurationException; 61 62 boolean isConfigured(); 63 }