01: /**
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * 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: */package org.apache.geronimo.j2ee.jsr88;
17:
18: import javax.enterprise.deploy.model.DeployableObject;
19: import javax.enterprise.deploy.shared.ModuleType;
20: import javax.enterprise.deploy.spi.DeploymentConfiguration;
21:
22: import org.apache.geronimo.deployment.ModuleConfigurer;
23: import org.apache.geronimo.gbean.GBeanInfo;
24: import org.apache.geronimo.gbean.GBeanInfoBuilder;
25: import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
26: import org.apache.geronimo.j2ee.jsr88.EARConfiguration;
27:
28: /**
29: *
30: *
31: * @version $Rev: 493181 $ $Date: 2007-01-05 12:32:03 -0800 (Fri, 05 Jan 2007) $
32: */
33: public class EARConfigurer implements ModuleConfigurer {
34: public DeploymentConfiguration createConfiguration(
35: DeployableObject deployable) {
36: if (ModuleType.EAR.equals(deployable.getType())) {
37: return new EARConfiguration(deployable);
38: } else {
39: return null;
40: }
41: }
42:
43: public ModuleType getModuleType() {
44: return ModuleType.EAR;
45: }
46:
47: public static final GBeanInfo GBEAN_INFO;
48:
49: static {
50: GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(
51: EARConfigurer.class, NameFactory.DEPLOYMENT_CONFIGURER);
52: infoFactory.addInterface(ModuleConfigurer.class);
53: GBEAN_INFO = infoFactory.getBeanInfo();
54: }
55:
56: public static GBeanInfo getGBeanInfo() {
57: return GBEAN_INFO;
58: }
59: }
|