View Javadoc

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *  http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  
20  package org.apache.geronimo.genesis.plugins.script;
21  
22  import org.codehaus.plexus.component.configurator.converters.lookup.ConverterLookup;
23  import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator;
24  import org.codehaus.plexus.component.configurator.ConfigurationListener;
25  import org.codehaus.plexus.configuration.PlexusConfiguration;
26  import org.apache.commons.logging.Log;
27  import org.apache.commons.logging.LogFactory;
28  
29  /**
30   * Container that captures a custom Plexus configuration for delayed processing.
31   *
32   * @version $Rev: 462757 $ $Date: 2006-10-11 03:24:37 -0700 (Wed, 11 Oct 2006) $
33   */
34  public class DelayedConfiguration
35  {
36      private static final Log log = LogFactory.getLog(DelayedConfiguration.class);
37  
38      private ConverterLookup converterLookup;
39  
40      private PlexusConfiguration configuration;
41  
42      private Class type;
43  
44      private Class baseType;
45  
46      private ClassLoader classLoader;
47  
48      private ExpressionEvaluator expressionEvaluator;
49  
50      private ConfigurationListener listener;
51  
52      public DelayedConfiguration(final ConverterLookup converterLookup,
53                                  final PlexusConfiguration configuration,
54                                  final Class type,
55                                  final Class baseType,
56                                  final ClassLoader classLoader,
57                                  final ExpressionEvaluator expressionEvaluator,
58                                  final ConfigurationListener listener)
59      {
60          this.converterLookup = converterLookup;
61          this.configuration = configuration;
62          this.type = type;
63          this.baseType = baseType;
64          this.classLoader = classLoader;
65          this.expressionEvaluator = expressionEvaluator;
66          this.listener = listener;
67      }
68  
69      public String toString() {
70          return String.valueOf(getConfiguration());
71      }
72  
73      public ConverterLookup getConverterLookup() {
74          return converterLookup;
75      }
76  
77      public PlexusConfiguration getConfiguration() {
78          return configuration;
79      }
80  
81      public Class getType() {
82          return type;
83      }
84  
85      public Class getBaseType() {
86          return baseType;
87      }
88  
89      public ClassLoader getClassLoader() {
90          return classLoader;
91      }
92  
93      public ExpressionEvaluator getExpressionEvaluator() {
94          return expressionEvaluator;
95      }
96  
97      public ConfigurationListener getListener() {
98          return listener;
99      }
100 }