1 /* 2 * Copyright 2012-2013 smartics, Kronseder & Reiner GmbH 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package de.smartics.properties.spi.config.definition; 17 18 import java.io.Serializable; 19 20 import javax.annotation.CheckForNull; 21 22 import de.smartics.properties.api.config.domain.key.ConfigurationKey; 23 24 /** 25 * Contains information from the <code>definition.xml</code> that is contained 26 * in archives providing property information. 27 * <p> 28 * Implementations are required to be <i>thread-safe</i>. 29 * </p> 30 */ 31 public interface PropertiesDefinitionContext extends Serializable 32 { 33 // ********************************* Fields ********************************* 34 35 // --- constants ------------------------------------------------------------ 36 37 // ****************************** Initializer ******************************* 38 39 // ****************************** Inner Classes ***************************** 40 41 // ********************************* Methods ******************************** 42 43 // --- get&set -------------------------------------------------------------- 44 45 // --- business ------------------------------------------------------------- 46 47 /** 48 * Returns the configuration key associated with the given {@code path}. 49 * 50 * @param path the path to fetch its configuration key. Note that a 51 * <code>null</code> value is allowed. 52 * @return the configuration key for the given {@code path} or 53 * <code>null</code> if no key is associated with it. 54 */ 55 @CheckForNull 56 ConfigurationKey<?> getKey(String path); 57 58 // --- object basics -------------------------------------------------------- 59 }