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.openejb.deployment;
018    
019    import java.util.jar.JarFile;
020    
021    import org.apache.geronimo.gbean.AbstractName;
022    import org.apache.geronimo.j2ee.deployment.annotation.AnnotatedApp;
023    import org.apache.geronimo.j2ee.deployment.EJBModule;
024    import org.apache.geronimo.kernel.repository.Environment;
025    import org.apache.geronimo.openejb.xbeans.ejbjar.OpenejbGeronimoEjbJarType;
026    import org.apache.openejb.jee.oejb3.OpenejbJar;
027    import org.apache.openejb.assembler.classic.EjbJarInfo;
028    import org.apache.openejb.jee.EjbJar;
029    import org.apache.xmlbeans.XmlObject;
030    
031    /**
032     * @version $Rev$ $Date$
033     */
034    public class EjbModule extends EJBModule {
035        private String originalSpecDD;
036        private XmlObject specDD;
037        private EjbJarInfo ejbJarInfo;
038        private EjbDeploymentBuilder ejbDeploymentBuilder;
039        private OpenejbGeronimoEjbJarType vendorDD;
040        private final org.apache.openejb.config.EjbModule ejbModule;
041    
042        public EjbModule(org.apache.openejb.config.EjbModule ejbModule, boolean standAlone, AbstractName moduleName, Environment environment, JarFile moduleFile, String targetPath, String ejbJarXml, AnnotatedApp annoatedApp) {
043            super(standAlone, moduleName, environment, moduleFile, targetPath, null, null, ejbJarXml, annoatedApp);
044            this.ejbModule = ejbModule;
045        }
046    
047        @Override
048        public String getOriginalSpecDD() {
049            return originalSpecDD;
050        }
051    
052        public void setOriginalSpecDD(String originalSpecDD) {
053            this.originalSpecDD = originalSpecDD;
054        }
055    
056        @Override
057        public XmlObject getSpecDD() {
058            return specDD;
059        }
060    
061        public void setSpecDD(XmlObject specDD) {
062            this.specDD = specDD;
063        }
064    
065        @Override
066        public OpenejbGeronimoEjbJarType getVendorDD() {
067            return vendorDD;
068        }
069    
070        public void setVendorDD(OpenejbGeronimoEjbJarType vendorDD) {
071            this.vendorDD = vendorDD;
072        }
073    
074        public org.apache.openejb.config.EjbModule getEjbModule() {
075            return ejbModule;
076        }
077    
078        public EjbJarInfo getEjbJarInfo() {
079            return ejbJarInfo;
080        }
081    
082        public void setEjbJarInfo(EjbJarInfo ejbJarInfo) {
083            this.ejbJarInfo = ejbJarInfo;
084        }
085    
086        public EjbDeploymentBuilder getEjbBuilder() {
087            return ejbDeploymentBuilder;
088        }
089    
090        public void setEjbBuilder(EjbDeploymentBuilder ejbDeploymentBuilder) {
091            this.ejbDeploymentBuilder = ejbDeploymentBuilder;
092        }
093    
094        public EjbJar getEjbJar() {
095            return ejbModule.getEjbJar();
096        }
097    
098        public OpenejbJar getOpenejbJar() {
099            return ejbModule.getOpenejbJar();
100        }
101    
102        public ClassLoader getClassLoader() {
103            return ejbModule.getClassLoader();
104        }
105    
106        public void setClassLoader(ClassLoader classLoader) {
107            ejbModule.setClassLoader(classLoader);
108        }
109    }