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.gbean.GBeanData;
023    import org.apache.geronimo.gbean.GBeanInfo;
024    import org.apache.geronimo.gbean.GBeanInfoBuilder;
025    import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
026    import org.apache.geronimo.deployment.DeploymentContext;
027    import org.apache.geronimo.kernel.repository.Environment;
028    
029    /**
030     * @version $Rev: 539121 $ $Date: 2007-05-17 17:20:58 -0400 (Thu, 17 May 2007) $
031     */
032    public class UnavailableWebServiceBuilder implements WebServiceBuilder {
033    
034        public void findWebServices(Module module, boolean isEJB, Map correctedPortLocations, Environment environment, Map sharedContext) throws DeploymentException {
035        }
036    
037        public boolean configurePOJO(GBeanData targetGBean, String servletName, Module module, String seiClassName, DeploymentContext context) throws DeploymentException {
038            throw new DeploymentException("Web services are not available in this configuration");
039        }
040    
041        public boolean configureEJB(GBeanData targetGBean, String ejbName, Module module, Map portInfoObject, ClassLoader classLoader) throws DeploymentException {
042            throw new DeploymentException("Web services are not available in this configuration");
043        }
044    
045        public static final GBeanInfo GBEAN_INFO;
046    
047        static {
048            GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(UnavailableWebServiceBuilder.class, NameFactory.MODULE_BUILDER);
049            infoBuilder.addInterface(WebServiceBuilder.class);
050            GBEAN_INFO = infoBuilder.getBeanInfo();
051        }
052    
053        public static GBeanInfo getGBeanInfo() {
054            return GBEAN_INFO;
055        }
056    
057    }