001 /* 002 * Licensed to the Apache Software Foundation (ASF) under one 003 * or more contributor license agreements. See the NOTICE file 004 * distributed with this work for additional information 005 * regarding copyright ownership. The ASF licenses this file 006 * to you under the Apache License, Version 2.0 (the 007 * "License"); you may not use this file except in compliance 008 * with the License. You may obtain a copy of the License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, 013 * software distributed under the License is distributed on an 014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 015 * KIND, either express or implied. See the License for the 016 * specific language governing permissions and limitations 017 * under the License. 018 */ 019 020 package org.apache.geronimo.genesis.plugins.script; 021 022 import org.codehaus.plexus.component.configurator.converters.lookup.ConverterLookup; 023 import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator; 024 import org.codehaus.plexus.component.configurator.ConfigurationListener; 025 import org.codehaus.plexus.configuration.PlexusConfiguration; 026 import org.apache.commons.logging.Log; 027 import org.apache.commons.logging.LogFactory; 028 029 /** 030 * Container that captures a custom Plexus configuration for delayed processing. 031 * 032 * @version $Rev: 462757 $ $Date: 2006-10-11 03:24:37 -0700 (Wed, 11 Oct 2006) $ 033 */ 034 public class DelayedConfiguration 035 { 036 private static final Log log = LogFactory.getLog(DelayedConfiguration.class); 037 038 private ConverterLookup converterLookup; 039 040 private PlexusConfiguration configuration; 041 042 private Class type; 043 044 private Class baseType; 045 046 private ClassLoader classLoader; 047 048 private ExpressionEvaluator expressionEvaluator; 049 050 private ConfigurationListener listener; 051 052 public DelayedConfiguration(final ConverterLookup converterLookup, 053 final PlexusConfiguration configuration, 054 final Class type, 055 final Class baseType, 056 final ClassLoader classLoader, 057 final ExpressionEvaluator expressionEvaluator, 058 final ConfigurationListener listener) 059 { 060 this.converterLookup = converterLookup; 061 this.configuration = configuration; 062 this.type = type; 063 this.baseType = baseType; 064 this.classLoader = classLoader; 065 this.expressionEvaluator = expressionEvaluator; 066 this.listener = listener; 067 } 068 069 public String toString() { 070 return String.valueOf(getConfiguration()); 071 } 072 073 public ConverterLookup getConverterLookup() { 074 return converterLookup; 075 } 076 077 public PlexusConfiguration getConfiguration() { 078 return configuration; 079 } 080 081 public Class getType() { 082 return type; 083 } 084 085 public Class getBaseType() { 086 return baseType; 087 } 088 089 public ClassLoader getClassLoader() { 090 return classLoader; 091 } 092 093 public ExpressionEvaluator getExpressionEvaluator() { 094 return expressionEvaluator; 095 } 096 097 public ConfigurationListener getListener() { 098 return listener; 099 } 100 }