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: */package org.apache.openejb.jee.oejb2;
017:
018: import java.util.ArrayList;
019: import java.util.List;
020: import javax.xml.bind.JAXBElement;
021: import javax.xml.bind.annotation.XmlAccessType;
022: import javax.xml.bind.annotation.XmlAccessorType;
023: import javax.xml.bind.annotation.XmlElement;
024: import javax.xml.bind.annotation.XmlElementRef;
025: import javax.xml.bind.annotation.XmlType;
026:
027: /**
028: * <p>Java class for serviceModuleType complex type.
029: *
030: * <p>The following schema fragment specifies the expected content contained within this class.
031: *
032: * <pre>
033: * <complexType name="serviceModuleType">
034: * <complexContent>
035: * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
036: * <sequence>
037: * <element ref="{http://geronimo.apache.org/xml/ns/deployment-1.2}environment"/>
038: * <element ref="{http://geronimo.apache.org/xml/ns/deployment-1.2}service" maxOccurs="unbounded" minOccurs="0"/>
039: * </sequence>
040: * </restriction>
041: * </complexContent>
042: * </complexType>
043: * </pre>
044: *
045: *
046: */
047: @XmlAccessorType(XmlAccessType.FIELD)
048: @XmlType(name="serviceModuleType",namespace="http://geronimo.apache.org/xml/ns/deployment-1.2",propOrder={"environment","service"})
049: public class ServiceModuleType {
050:
051: @XmlElement(name="environment",namespace="http://geronimo.apache.org/xml/ns/deployment-1.2",required=true)
052: protected EnvironmentType environment;
053: @XmlElementRef(name="service",namespace="http://geronimo.apache.org/xml/ns/deployment-1.2",type=JAXBElement.class)
054: protected List<JAXBElement<? extends AbstractServiceType>> service;
055:
056: /**
057: * Gets the value of the environment property.
058: *
059: * @return
060: * possible object is
061: * {@link EnvironmentType }
062: *
063: */
064: public EnvironmentType getEnvironment() {
065: return environment;
066: }
067:
068: /**
069: * Sets the value of the environment property.
070: *
071: * @param value
072: * allowed object is
073: * {@link EnvironmentType }
074: *
075: */
076: public void setEnvironment(EnvironmentType value) {
077: this .environment = value;
078: }
079:
080: /**
081: * Gets the value of the service property.
082: *
083: * <p>
084: * This accessor method returns a reference to the live list,
085: * not a snapshot. Therefore any modification you make to the
086: * returned list will be present inside the JAXB object.
087: * This is why there is not a <CODE>set</CODE> method for the service property.
088: *
089: * <p>
090: * For example, to add a new item, do as follows:
091: * <pre>
092: * getService().add(newItem);
093: * </pre>
094: *
095: *
096: * <p>
097: * Objects of the following type(s) are allowed in the list
098: * {@link JAXBElement }{@code <}{@link GbeanType }{@code >}
099: * {@link JAXBElement }{@code <}{@link AbstractServiceType }{@code >}
100: *
101: *
102: */
103: public List<JAXBElement<? extends AbstractServiceType>> getService() {
104: if (service == null) {
105: service = new ArrayList<JAXBElement<? extends AbstractServiceType>>();
106: }
107: return this.service;
108: }
109:
110: }
|