001/*
002 *  Copyright 2015 Anyware Services
003 *
004 *  Licensed under the Apache License, Version 2.0 (the "License");
005 *  you may not use this file except in compliance with the License.
006 *  You may obtain a copy of the License at
007 *
008 *      http://www.apache.org/licenses/LICENSE-2.0
009 *
010 *  Unless required by applicable law or agreed to in writing, software
011 *  distributed under the License is distributed on an "AS IS" BASIS,
012 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 *  See the License for the specific language governing permissions and
014 *  limitations under the License.
015 */
016package org.ametys.runtime.plugin;
017
018import org.apache.avalon.framework.configuration.Configuration;
019
020/**
021 * This class is a storage for an extension informations 
022 */
023public class ComponentDefinition
024{
025    private String _id;
026    private String _role;
027    private String _pluginName;
028    private String _featureName;
029    private Configuration _configuration;
030    
031    /**
032     * Store elements about a component.
033     * @param id the component's id.
034     * @param role the component's role.
035     * @param pluginName The name of the plugin declaring the component.
036     * @param featureName The name of the feature declaring the component.
037     * @param configuration The configuration of the component.
038     */
039    public ComponentDefinition(String id, String role, String pluginName, String featureName, Configuration configuration)
040    {
041        _id = id;
042        _role = role;
043        _pluginName = pluginName;
044        _featureName = featureName;
045        _configuration = configuration;
046    }
047    
048    /**
049     * Returns the component id.
050     * @return the component id.
051     */
052    public String getId()
053    {
054        return _id;
055    }
056    
057    /**
058     * Returns the component role.
059     * @return the component role.
060     */
061    public String getRole()
062    {
063        return _role;
064    }
065    
066    /**
067     * Returns the configuration
068     * @return the configuration
069     */
070    public Configuration getConfiguration()
071    {
072        return _configuration;
073    }
074    
075    /**
076     * Returns the feature name
077     * @return the feature name
078     */
079    public String getFeatureName()
080    {
081        return _featureName;
082    }
083    
084    /**
085     * Returns the plugin name
086     * @return the plugin name
087     */
088    public String getPluginName()
089    {
090        return _pluginName;
091    }
092}