001    /**
002     * <copyright>
003     * </copyright>
004     *
005     * $Id$
006     */
007    package com.hammurapi.config;
008    
009    
010    /**
011     * <!-- begin-user-doc -->
012     * A representation of the model object '<em><b>Profile</b></em>'.
013     * <!-- end-user-doc -->
014     *
015     * <!-- begin-model-doc -->
016     * Collection of named things. 
017     * The purpose of profiles to have a single component configuration for multiple environments where the component might be deployed.
018     * For example a single component configuration can be used on a local developer workstation, in a shared development environment, testing environment and production environment. 
019     * In each deployment the client code supplies a different profile path, but the component configuration resource remains the same. It alleviates an often encountered problem when different environments have different
020     * configuration resources and as such problems in production environment can not be reproduced in development environment. An often used approach with substitution variables (tokens) quickly goes out of control as complexity of the system increases. Profiles can leverage substitution variables and provide additional level of flexibility. 
021     * 
022     * Profiles form a hierarchy (path). Named values on lower levels shadow/override values defined at higher levels. For example, let's say there is a data source definition. It has driver class, url, user and password. The driver class name (and a path to load the driver) can be defined at the root level, as well as the database user name. Connection URL can be defined at the environment profile level - different URL's for local environment, DEV and PROD. The password shall not be stored in the config file. So it shall come from a substitution token, e.g. $[db.password]. The password can be defined at the root level, or at environment level. In the latter case the token may contain environment name, e.g. $[db.password.DEV]. If, acciedentally, developer tries to load production profile in his local or DEV environment, then startup will fail because of unsuccessful expansion of $[db.password.PROD] token or because substituted password will be invalid. The first case - unsuccessfull expansion is easier to detect and troubleshoot.
023     * 
024     * Profiles also allow to specify different qualities of service (e.g. performance, cost, distributes vs. local computation) for the same component with the same interface in different environments. 
025     * 
026     * 
027     * 
028     * <!-- end-model-doc -->
029     *
030     * <p>
031     * The following features are supported:
032     * <ul>
033     *   <li>{@link com.hammurapi.config.Profile#getName <em>Name</em>}</li>
034     *   <li>{@link com.hammurapi.config.Profile#getDescription <em>Description</em>}</li>
035     *   <li>{@link com.hammurapi.config.Profile#getOwner <em>Owner</em>}</li>
036     * </ul>
037     * </p>
038     *
039     * @see com.hammurapi.config.ConfigPackage#getProfile()
040     * @model
041     * @generated
042     */
043    public interface Profile extends PropertySource {
044            /**
045             * Returns the value of the '<em><b>Name</b></em>' attribute.
046             * <!-- begin-user-doc -->
047             * <!-- end-user-doc -->
048             * <!-- begin-model-doc -->
049             * Profile name.
050             * <!-- end-model-doc -->
051             * @return the value of the '<em>Name</em>' attribute.
052             * @see #setName(String)
053             * @see com.hammurapi.config.ConfigPackage#getProfile_Name()
054             * @model required="true"
055             * @generated
056             */
057            String getName();
058    
059            /**
060             * Sets the value of the '{@link com.hammurapi.config.Profile#getName <em>Name</em>}' attribute.
061             * <!-- begin-user-doc -->
062             * <!-- end-user-doc -->
063             * @param value the new value of the '<em>Name</em>' attribute.
064             * @see #getName()
065             * @generated
066             */
067            void setName(String value);
068    
069            /**
070             * Returns the value of the '<em><b>Description</b></em>' attribute.
071             * <!-- begin-user-doc -->
072             * <!-- end-user-doc -->
073             * <!-- begin-model-doc -->
074             * Profile description.
075             * <!-- end-model-doc -->
076             * @return the value of the '<em>Description</em>' attribute.
077             * @see #setDescription(String)
078             * @see com.hammurapi.config.ConfigPackage#getProfile_Description()
079             * @model
080             * @generated
081             */
082            String getDescription();
083    
084            /**
085             * Sets the value of the '{@link com.hammurapi.config.Profile#getDescription <em>Description</em>}' attribute.
086             * <!-- begin-user-doc -->
087             * <!-- end-user-doc -->
088             * @param value the new value of the '<em>Description</em>' attribute.
089             * @see #getDescription()
090             * @generated
091             */
092            void setDescription(String value);
093    
094            /**
095             * Returns the value of the '<em><b>Owner</b></em>' container reference.
096             * It is bidirectional and its opposite is '{@link com.hammurapi.config.PropertySource#getProfile <em>Profile</em>}'.
097             * <!-- begin-user-doc -->
098             * <!-- end-user-doc -->
099             * <!-- begin-model-doc -->
100             * Parent profile or object definition.
101             * <!-- end-model-doc -->
102             * @return the value of the '<em>Owner</em>' container reference.
103             * @see #setOwner(PropertySource)
104             * @see com.hammurapi.config.ConfigPackage#getProfile_Owner()
105             * @see com.hammurapi.config.PropertySource#getProfile
106             * @model opposite="profile" transient="false"
107             * @generated
108             */
109            PropertySource getOwner();
110    
111            /**
112             * Sets the value of the '{@link com.hammurapi.config.Profile#getOwner <em>Owner</em>}' container reference.
113             * <!-- begin-user-doc -->
114             * <!-- end-user-doc -->
115             * @param value the new value of the '<em>Owner</em>' container reference.
116             * @see #getOwner()
117             * @generated
118             */
119            void setOwner(PropertySource value);
120    
121    } // Profile