All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.openejb.cdi.CdiBeanInfo Maven / Gradle / Ivy

There is a newer version: 4.7.5
Show newest version
/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.apache.openejb.cdi;

import org.apache.openejb.Injection;
import org.apache.openejb.jee.*;

import javax.xml.bind.annotation.XmlTransient;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;

public class CdiBeanInfo implements JndiConsumer {

    protected KeyedCollection envEntry;
    protected KeyedCollection ejbRef;
    protected KeyedCollection ejbLocalRef;
    protected KeyedCollection serviceRef;
    protected KeyedCollection resourceRef;
    protected KeyedCollection resourceEnvRef;
    protected KeyedCollection messageDestinationRef;
    protected KeyedCollection persistenceContextRef;
    protected KeyedCollection persistenceUnitRef;
    protected List postConstruct;
    protected List preDestroy;
    protected KeyedCollection dataSource;
    protected List postActivate;
    protected List prePassivate;
    protected List securityRoleRef;
    protected SecurityIdentity securityIdentity;
    private String beanName;
    private ClassLoader classLoader;
    private List injections;

    public String getBeanName() {
        return beanName;
    }

    public List getInjections() {
        return injections;
    }


    public void setInjections(List injections) {
        this.injections = injections;
    }


    public void setBeanName(String beanName) {
        this.beanName = beanName;
    }

    public ClassLoader getClassLoader() {
        return classLoader;
    }

    public void setClassLoader(ClassLoader classLoader) {
        this.classLoader = classLoader;
    }

    private List afterBegin;
    private List beforeCompletion;
    private List afterCompletion;
    private Class beanClass;

    public void setBeanClass(Class beanClass) {
        this.beanClass = beanClass;
    }


    public Collection getEnvEntry() {
        if (envEntry == null) {
            envEntry = new KeyedCollection();
        }
        return this.envEntry;
    }

    public Map getEnvEntryMap() {
        if (envEntry == null) {
            envEntry = new KeyedCollection();
        }
        return this.envEntry.toMap();
    }

    public Collection getEjbRef() {
        if (ejbRef == null) {
            ejbRef = new KeyedCollection();
        }
        return this.ejbRef;
    }

    public Map getEjbRefMap() {
        if (ejbRef == null) {
            ejbRef = new KeyedCollection();
        }
        return this.ejbRef.toMap();
    }

    public Collection getEjbLocalRef() {
        if (ejbLocalRef == null) {
            ejbLocalRef = new KeyedCollection();
        }
        return this.ejbLocalRef;
    }

    public Map getEjbLocalRefMap() {
        if (ejbLocalRef == null) {
            ejbLocalRef = new KeyedCollection();
        }
        return this.ejbLocalRef.toMap();
    }

    public Collection getServiceRef() {
        if (serviceRef == null) {
            serviceRef = new KeyedCollection();
        }
        return this.serviceRef;
    }

    public Map getServiceRefMap() {
        if (serviceRef == null) {
            serviceRef = new KeyedCollection();
        }
        return this.serviceRef.toMap();
    }

    public Collection getResourceRef() {
        if (resourceRef == null) {
            resourceRef = new KeyedCollection();
        }
        return this.resourceRef;
    }

    public Map getResourceRefMap() {
        if (resourceRef == null) {
            resourceRef = new KeyedCollection();
        }
        return this.resourceRef.toMap();
    }

    public Collection getResourceEnvRef() {
        if (resourceEnvRef == null) {
            resourceEnvRef = new KeyedCollection();
        }
        return this.resourceEnvRef;
    }

    public Map getResourceEnvRefMap() {
        if (resourceEnvRef == null) {
            resourceEnvRef = new KeyedCollection();
        }
        return this.resourceEnvRef.toMap();
    }

    public Collection getMessageDestinationRef() {
        if (messageDestinationRef == null) {
            messageDestinationRef = new KeyedCollection();
        }
        return this.messageDestinationRef;
    }

    public Map getMessageDestinationRefMap() {
        if (messageDestinationRef == null) {
            messageDestinationRef = new KeyedCollection();
        }
        return this.messageDestinationRef.toMap();
    }

    public Collection getPersistenceContextRef() {
        if (persistenceContextRef == null) {
            persistenceContextRef = new KeyedCollection();
        }
        return this.persistenceContextRef;
    }

    public Map getPersistenceContextRefMap() {
        if (persistenceContextRef == null) {
            persistenceContextRef = new KeyedCollection();
        }
        return this.persistenceContextRef.toMap();
    }

    public Collection getPersistenceUnitRef() {
        if (persistenceUnitRef == null) {
            persistenceUnitRef = new KeyedCollection();
        }
        return this.persistenceUnitRef;
    }

    public Map getPersistenceUnitRefMap() {
        if (persistenceUnitRef == null) {
            persistenceUnitRef = new KeyedCollection();
        }
        return this.persistenceUnitRef.toMap();
    }

    public List getPostConstruct() {
        if (postConstruct == null) {
            postConstruct = new ArrayList();
        }
        return this.postConstruct;
    }


    public List getSecurityRoleRef() {
        if (securityRoleRef == null) {
            securityRoleRef = new ArrayList();
        }
        return this.securityRoleRef;
    }

    public SecurityIdentity getSecurityIdentity() {
        return securityIdentity;
    }

    public void setSecurityIdentity(SecurityIdentity value) {
        this.securityIdentity = value;
    }


    public List getAfterBegin() {
        if (afterBegin == null) {
            afterBegin = new ArrayList();
        }
        return afterBegin;
    }

    public List getAfterCompletion() {
        if (afterCompletion == null) {
            afterCompletion = new ArrayList();
        }
        return this.afterCompletion;
    }

    public List getBeforeCompletion() {
        if (beforeCompletion == null) {
            beforeCompletion = new ArrayList();
        }
        return this.beforeCompletion;
    }

    public Collection getDataSource() {
        if (dataSource == null) {
            dataSource = new KeyedCollection();
        }
        return this.dataSource;
    }

    public Map getDataSourceMap() {
        if (dataSource == null) {
            dataSource = new KeyedCollection();
        }
        return this.dataSource.toMap();
    }

    public String getJndiConsumerName() {
        return beanName;
    }

    public Class getBeanClass() {
        return this.beanClass;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy