1 // 2 // ======================================================================== 3 // Copyright (c) 1995-2016 Mort Bay Consulting Pty. Ltd. 4 // ------------------------------------------------------------------------ 5 // All rights reserved. This program and the accompanying materials 6 // are made available under the terms of the Eclipse Public License v1.0 7 // and Apache License v2.0 which accompanies this distribution. 8 // 9 // The Eclipse Public License is available at 10 // http://www.eclipse.org/legal/epl-v10.html 11 // 12 // The Apache License v2.0 is available at 13 // http://www.opensource.org/licenses/apache2.0.php 14 // 15 // You may elect to redistribute this code under either of these licenses. 16 // ======================================================================== 17 // 18 19 package org.eclipse.jetty.start.config; 20 21 import org.eclipse.jetty.start.Props; 22 import org.eclipse.jetty.start.RawArgs; 23 24 /** 25 * A Configuration Source 26 */ 27 public interface ConfigSource 28 { 29 /** 30 * The identifier for this source. 31 * <p> 32 * Used in end-user display of the source. 33 * 34 * @return the configuration source identifier. 35 */ 36 public String getId(); 37 38 /** 39 * The weight of this source, used for proper ordering of the config source search order. 40 * <p> 41 * Recommended Weights: 42 * <pre> 43 * -1 = the command line 44 * 0 = the ${jetty.base} source 45 * [1..n] = include-jetty-dir entries from command line 46 * [n+1..n] = include-jetty-dir entries from start.ini (or start.d/*.ini) 47 * 9999999 = the ${jetty.home} source 48 * </pre> 49 * 50 * @return the weight of the config source. (lower value is more important) 51 */ 52 public int getWeight(); 53 54 /** 55 * The list of Arguments for this ConfigSource 56 * 57 * @return the list of Arguments for this ConfigSource 58 */ 59 public RawArgs getArgs(); 60 61 /** 62 * The properties for this ConfigSource 63 * 64 * @return the properties for this ConfigSource 65 */ 66 public Props getProps(); 67 68 /** 69 * Return the value of the specified property. 70 * 71 * @param key the key to lookup 72 * @return the value of the property, or null if not found 73 */ 74 public String getProperty(String key); 75 }