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

org.apache.openejb.config.sys.Resources 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.config.sys;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import java.util.ArrayList;
import java.util.List;


/**
 * 

Java class for anonymous complex type. *

*

The following schema fragment specifies the expected content contained within this class. *

*

 * <complexType>
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element ref="{http://www.openejb.org/System/Configuration}Container" maxOccurs="unbounded"/>
 *         <element ref="{http://www.openejb.org/System/Configuration}JndiProvider" maxOccurs="unbounded" minOccurs="0"/>
 *         <element ref="{http://www.openejb.org/System/Configuration}ConnectionManager" minOccurs="0"/>
 *         <element ref="{http://www.openejb.org/System/Configuration}Connector" maxOccurs="unbounded" minOccurs="0"/>
 *         <element ref="{http://www.openejb.org/System/Configuration}Resource" maxOccurs="unbounded" minOccurs="0"/>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 * 
*/ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = {"container", "jndiProvider", "connectionManager", "resource"}) @XmlRootElement(name = "resources") public class Resources { @XmlElement(name = "Container", required = true) protected List container; @XmlElement(name = "JndiProvider") protected List jndiProvider; @XmlElement(name = "ConnectionManager") protected ConnectionManager connectionManager; @XmlElement(name = "Resource") protected List resource; /** * Gets the value of the container property. *

*

* This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a set method for the container property. *

*

* For example, to add a new item, do as follows: *

     *    getContainer().add(newItem);
     * 
*

*

*

* Objects of the following type(s) are allowed in the list * {@link org.apache.openejb.config.sys.Container } */ public List getContainer() { if (container == null) { container = new ArrayList(); } return this.container; } /** * Gets the value of the jndiProvider property. *

*

* This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a set method for the jndiProvider property. *

*

* For example, to add a new item, do as follows: *

     *    getJndiProvider().add(newItem);
     * 
*

*

*

* Objects of the following type(s) are allowed in the list * {@link org.apache.openejb.config.sys.JndiProvider } */ public List getJndiProvider() { if (jndiProvider == null) { jndiProvider = new ArrayList(); } return this.jndiProvider; } /** * Gets the value of the connectionManager property. * * @return possible object is * {@link org.apache.openejb.config.sys.ConnectionManager } */ public ConnectionManager getConnectionManager() { return connectionManager; } /** * Sets the value of the connectionManager property. * * @param value allowed object is * {@link org.apache.openejb.config.sys.ConnectionManager } */ public void setConnectionManager(ConnectionManager value) { this.connectionManager = value; } /** * Gets the value of the resource property. *

*

* This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a set method for the resource property. *

*

* For example, to add a new item, do as follows: *

     *    getResource().add(newItem);
     * 
*

*

*

* Objects of the following type(s) are allowed in the list * {@link org.apache.openejb.config.sys.Resource } */ public List getResource() { if (resource == null) { resource = new ArrayList(); } return this.resource; } public void add(Object service) { if (service instanceof Container) { getContainer().add((Container) service); } else if (service instanceof Resource) { getResource().add((Resource) service); } else if (service instanceof JndiProvider) { getJndiProvider().add((JndiProvider) service); } else if (service instanceof ConnectionManager) { setConnectionManager((ConnectionManager) service); } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy