001    /**
002     *  Licensed to the Apache Software Foundation (ASF) under one or more
003     *  contributor license agreements.  See the NOTICE file distributed with
004     *  this work for additional information regarding copyright ownership.
005     *  The ASF licenses this file to You under the Apache License, Version 2.0
006     *  (the "License"); you may not use this file except in compliance with
007     *  the License.  You may obtain a copy of the License at
008     *
009     *     http://www.apache.org/licenses/LICENSE-2.0
010     *
011     *  Unless required by applicable law or agreed to in writing, software
012     *  distributed under the License is distributed on an "AS IS" BASIS,
013     *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014     *  See the License for the specific language governing permissions and
015     *  limitations under the License.
016     */
017    package org.apache.geronimo.j2ee.deployment;
018    
019    import java.util.Map;
020    
021    import org.apache.geronimo.common.DeploymentException;
022    import org.apache.geronimo.deployment.DeploymentContext;
023    import org.apache.geronimo.gbean.GBeanData;
024    import org.apache.geronimo.kernel.repository.Environment;
025    
026    /**
027     * @version $Rev: 539121 $ $Date: 2007-05-17 17:20:58 -0400 (Thu, 17 May 2007) $
028     */
029    public interface WebServiceBuilder {
030    
031       /**
032        * Introspects on the module file to locate web service for deployment.
033        *
034        * @param moduleFile J2EE module
035        * @param isEJB is this an EJB archive?
036        * @param correctedPortLocations mapping between port locations and paths.
037        * @param environment
038        * @param sharedContext map of builder-specific key to map of servlet names to port information, or an
039        * empty map if no web services found.  Port information is opaque
040        * to all except the WebServiceBuilder itself.
041        * @throws DeploymentException if error encountered while introspecting the module.
042        */
043       void findWebServices(Module module, boolean isEJB, Map correctedPortLocations, Environment environment, Map sharedContext) throws DeploymentException;
044    
045        //obviously these need the deployment descriptors, but I'm not sure in what form yet.
046        /**
047         * configure the supplied GBeanData to implement the POJO web service described in the deployment descriptor.
048         * The GBeanData will be for a ServletHolder like gbean that is adapted to holding a ws stack that talks to a
049         * POJO web service.  The web deployer is responsible for filling in the standard servlet info such as init params.
050         * @param targetGBean
051         * @param servletName
052         * @param module
053         * @param seiClassName
054         * @param context
055         * @return true if this builder configured this pojo
056         * @throws DeploymentException
057         */
058        boolean configurePOJO(GBeanData targetGBean, String servletName, Module module, String seiClassName, DeploymentContext context) throws DeploymentException;
059    
060        /**
061         * configure the supplied EJBContainer gbeandata to implement the ejb web service described in the deployment descriptor
062         * N.B. this method is a complete guess and should be replaced by something useable right away!
063         * @param targetGBean
064         * @param ejbName
065         * @param moduleFile
066         * @param sharedContext
067         * @param classLoader
068         * @throws DeploymentException
069         */
070        boolean configureEJB(GBeanData targetGBean, String ejbName, Module module, Map sharedContext, ClassLoader classLoader) throws DeploymentException;
071    
072    }