001/* 002 * Copyright 2020 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.core.migration.configuration.impl; 017 018import org.apache.avalon.framework.configuration.Configuration; 019 020import org.ametys.core.migration.configuration.VersionConfiguration; 021import org.ametys.core.migration.handler.impl.JavaVersionHandlerComponent; 022 023/** 024 * Java Version Configuration 025 */ 026public class JavaVersionConfiguration implements VersionConfiguration 027{ 028 private String _componentId; 029 030 private Configuration _pluginVersionConfiguration; 031 032 private JavaVersionHandlerComponent _handler; 033 034 /** 035 * Create the configuration object 036 * @param componentId component id 037 * @param pluginVersionConfiguration version configuration from plugin.xml 038 * @param handler java version handler 039 */ 040 public JavaVersionConfiguration(String componentId, Configuration pluginVersionConfiguration, JavaVersionHandlerComponent handler) 041 { 042 _componentId = componentId; 043 _pluginVersionConfiguration = pluginVersionConfiguration; 044 _handler = handler; 045 } 046 047 /** 048 * Get the java version handler 049 * @return java version handler 050 */ 051 public JavaVersionHandlerComponent getHandler() 052 { 053 return _handler; 054 } 055 056 /** 057 * The component Id 058 * @return the component Id 059 */ 060 public String getComponentId() 061 { 062 return _componentId; 063 } 064 065 /** 066 * The full configuration for this handler from plugin.xml 067 * @return the full configuration for this handler 068 */ 069 public Configuration getPluginVersionConfiguration() 070 { 071 return _pluginVersionConfiguration; 072 } 073 074}