KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > geronimo > deployment > ConfigurationBuilder


1 /**
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */

17
18 package org.apache.geronimo.deployment;
19
20 import java.io.File JavaDoc;
21 import java.io.IOException JavaDoc;
22 import java.util.Collection JavaDoc;
23 import java.util.List JavaDoc;
24 import java.util.jar.JarFile JavaDoc;
25
26 import org.apache.geronimo.common.DeploymentException;
27 import org.apache.geronimo.deployment.DeploymentContext;
28 import org.apache.geronimo.kernel.config.ConfigurationStore;
29 import org.apache.geronimo.kernel.repository.Artifact;
30 import org.apache.geronimo.kernel.repository.ArtifactResolver;
31
32 /**
33  * @version $Rev: 476049 $ $Date: 2006-11-16 23:35:17 -0500 (Thu, 16 Nov 2006) $
34  */

35 public interface ConfigurationBuilder {
36     static final String JavaDoc CONFIG_BUILDER = "ConfigBuilder";
37
38     /**
39      * Builds a deployment plan specific to this builder from a planFile and/or
40      * module if this builder can process it.
41      * @param planFile the deployment plan to examine; can be null
42      * @param module the URL of the module to examine; can be null
43      * @return the deployment plan, or null if this builder can not handle the module
44      * @throws org.apache.geronimo.common.DeploymentException if there was a problem with the configuration
45      */

46     Object JavaDoc getDeploymentPlan(File JavaDoc planFile, JarFile JavaDoc module, ModuleIDBuilder idBuilder) throws DeploymentException;
47
48     /**
49      * Checks what configuration URL will be used for the provided module.
50      * @param plan the deployment plan
51      * @param module the module to build
52      * @return the ID that will be used for the Configuration
53      * @throws IOException if there was a problem reading or writing the files
54      * @throws org.apache.geronimo.common.DeploymentException if there was a problem with the configuration
55      */

56     Artifact getConfigurationID(Object JavaDoc plan, JarFile JavaDoc module, ModuleIDBuilder idBuilder) throws IOException JavaDoc, DeploymentException;
57
58     /**
59      * Build a configuration from a local file
60      *
61      * @param inPlaceDeployment true if the deployment is in-place.
62      * @param plan the deployment plan
63      * @param module the module to build
64      * @param configurationStores
65      * @param artifactResolver
66      * @param targetConfigurationStore
67      * @return the deployment context created from the deployment (the contexts must be closed by the caller)
68      * @throws IOException if there was a problem reading or writing the files
69      * @throws org.apache.geronimo.common.DeploymentException if there was a problem with the configuration
70      */

71     DeploymentContext buildConfiguration(boolean inPlaceDeployment, Artifact configId, Object JavaDoc plan, JarFile JavaDoc module, Collection JavaDoc configurationStores, ArtifactResolver artifactResolver, ConfigurationStore targetConfigurationStore) throws IOException JavaDoc, DeploymentException;
72 }
73
Popular Tags