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    
018    package org.apache.geronimo.connector;
019    
020    import java.util.Map;
021    
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.management.J2EEApplication;
027    import org.apache.geronimo.management.J2EEServer;
028    import org.apache.geronimo.management.geronimo.ResourceAdapter;
029    import org.apache.geronimo.management.geronimo.ResourceAdapterModule;
030    
031    /**
032     * @version $Revision: 476049 $
033     */
034    public class ResourceAdapterModuleImplGBean {
035    
036        public static final GBeanInfo GBEAN_INFO;
037    
038        static {
039            GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(ResourceAdapterModuleImplGBean.class, ResourceAdapterModuleImpl.class, NameFactory.RESOURCE_ADAPTER_MODULE);
040            infoBuilder.addReference("J2EEServer", J2EEServer.class, null);
041            infoBuilder.addReference("J2EEApplication", J2EEApplication.class, null);
042    
043            infoBuilder.addAttribute("deploymentDescriptor", String.class, true);
044    
045            infoBuilder.addReference("ResourceAdapter", ResourceAdapter.class, NameFactory.RESOURCE_ADAPTER);
046            infoBuilder.addAttribute("objectName", String.class, false);
047            infoBuilder.addAttribute("server", String.class, false);
048            infoBuilder.addAttribute("application", String.class, false);
049            infoBuilder.addAttribute("javaVMs", String[].class, false);
050            infoBuilder.addAttribute("resourceAdapters", String[].class, false);
051    
052            infoBuilder.addAttribute("resourceAdapterGBeanData", GBeanData.class, true);
053            infoBuilder.addAttribute("activationSpecInfoMap", Map.class, true);
054            infoBuilder.addAttribute("adminObjectInfoMap", Map.class, true);
055            infoBuilder.addAttribute("managedConnectionFactoryInfoMap", Map.class, true);
056    
057            infoBuilder.addAttribute("displayName", String.class, true, false);
058            infoBuilder.addAttribute("description", String.class, true, false);
059            infoBuilder.addAttribute("vendorName", String.class, true, false);
060            infoBuilder.addAttribute("EISType", String.class, true, false);
061            infoBuilder.addAttribute("resourceAdapterVersion", String.class, true, false);
062    
063    
064            infoBuilder.addInterface(ResourceAdapterModule.class);
065    
066            infoBuilder.setConstructor(new String[]{
067                    "objectName",
068                    "ResourceAdapter",
069                    "J2EEServer",
070                    "J2EEApplication",
071                    "deploymentDescriptor",
072                    "resourceAdapterGBeanData",
073                    "activationSpecInfoMap",
074                    "adminObjectInfoMap",
075                    "managedConnectionFactoryInfoMap",
076                    "displayName",
077                    "description",
078                    "vendorName",
079                    "resourceAdapterVersion",
080                    "EISType"
081            });
082    
083            GBEAN_INFO = infoBuilder.getBeanInfo();
084        }
085    
086        public static GBeanInfo getGBeanInfo() {
087            return GBEAN_INFO;
088        }
089    
090    }