001 /**
002 * <copyright>
003 * </copyright>
004 *
005 * $Id$
006 */
007 package com.hammurapi.config;
008
009 import com.hammurapi.config.bootstrap.ConfigurationException;
010 import com.hammurapi.config.runtime.InjectionConfig;
011
012
013 /**
014 * <!-- begin-user-doc -->
015 * A representation of the model object '<em><b>Named</b></em>'.
016 * <!-- end-user-doc -->
017 *
018 * <!-- begin-model-doc -->
019 * Something with a name. Named objects are injected into objects being configured in the following ways: a) Using set<name> methods with a single argument.
020 * E.g. named object with name age can be injected into an object being configured using setAge(...) method. b) Using add<name> methods. Add methods can be used for injection of multi-value configuration parameters.
021 * c) Using create<name> methods. In this case named object must not have type definition and must not define a constructor. It is responsibility of the object being configured to create an instance, and then the configuration
022 * framework's responsibility is to inject configuration into that instance.
023 *
024 * <!-- end-model-doc -->
025 *
026 * <p>
027 * The following features are supported:
028 * <ul>
029 * <li>{@link com.hammurapi.config.Named#getName <em>Name</em>}</li>
030 * <li>{@link com.hammurapi.config.Named#isRuntime <em>Runtime</em>}</li>
031 * </ul>
032 * </p>
033 *
034 * @see com.hammurapi.config.ConfigPackage#getNamed()
035 * @model interface="true" abstract="true"
036 * @generated
037 */
038 public interface Named extends Factory {
039 /**
040 * Returns the value of the '<em><b>Name</b></em>' attribute.
041 * <!-- begin-user-doc -->
042 * <!-- end-user-doc -->
043 * <!-- begin-model-doc -->
044 * Object name.
045 * <!-- end-model-doc -->
046 * @return the value of the '<em>Name</em>' attribute.
047 * @see #setName(String)
048 * @see com.hammurapi.config.ConfigPackage#getNamed_Name()
049 * @model required="true"
050 * @generated
051 */
052 String getName();
053
054 /**
055 * Sets the value of the '{@link com.hammurapi.config.Named#getName <em>Name</em>}' attribute.
056 * <!-- begin-user-doc -->
057 * <!-- end-user-doc -->
058 * @param value the new value of the '<em>Name</em>' attribute.
059 * @see #getName()
060 * @generated
061 */
062 void setName(String value);
063
064 /**
065 * Returns the value of the '<em><b>Runtime</b></em>' attribute.
066 * The default value is <code>"true"</code>.
067 * <!-- begin-user-doc -->
068 * <!-- end-user-doc -->
069 * <!-- begin-model-doc -->
070 * If true (default), then this named object gets injected into owner object at runtime. Otherwise, it is used only at model transformation time and is not injected at runtime.
071 * <!-- end-model-doc -->
072 * @return the value of the '<em>Runtime</em>' attribute.
073 * @see #setRuntime(boolean)
074 * @see com.hammurapi.config.ConfigPackage#getNamed_Runtime()
075 * @model default="true" required="true"
076 * @generated
077 */
078 boolean isRuntime();
079
080 /**
081 * Sets the value of the '{@link com.hammurapi.config.Named#isRuntime <em>Runtime</em>}' attribute.
082 * <!-- begin-user-doc -->
083 * <!-- end-user-doc -->
084 * @param value the new value of the '<em>Runtime</em>' attribute.
085 * @see #isRuntime()
086 * @generated
087 */
088 void setRuntime(boolean value);
089
090 /**
091 * @param injectionConfig
092 * @return
093 * @throws ConfigurationException
094 * @generated
095 */
096 void inject(InjectionConfig injectionConfig) throws ConfigurationException;
097
098
099 } // Named