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