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 ExtensionDefinition 024{ 025 private String _id; 026 private String _point; 027 private String _pluginName; 028 private String _featureName; 029 private Configuration _configuration; 030 031 /** 032 * Store elements about an extension 033 * @param id the extension's id. 034 * @param point the extension point name. 035 * @param pluginName The name of the plugin declaring the extension. 036 * @param featureName The name of the feature declaring the extension. 037 * @param configuration The configuration of the extension. 038 */ 039 public ExtensionDefinition(String id, String point, String pluginName, String featureName, Configuration configuration) 040 { 041 _id = id; 042 _point = point; 043 _pluginName = pluginName; 044 _featureName = featureName; 045 _configuration = configuration; 046 } 047 048 /** 049 * Returns the extension id. 050 * @return the extension id. 051 */ 052 public String getId() 053 { 054 return _id; 055 } 056 057 /** 058 * Returns the extension point name. 059 * @return the extension point name. 060 */ 061 public String getPoint() 062 { 063 return _point; 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}