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 java.util.Collections;
021: import javax.xml.bind.JAXBElement;
022: import javax.xml.bind.annotation.XmlAccessType;
023: import javax.xml.bind.annotation.XmlAccessorType;
024: import javax.xml.bind.annotation.XmlAttribute;
025: import javax.xml.bind.annotation.XmlElement;
026: import javax.xml.bind.annotation.XmlElementRef;
027: import javax.xml.bind.annotation.XmlID;
028: import javax.xml.bind.annotation.XmlType;
029: import javax.xml.bind.annotation.XmlTransient;
030: import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
031: import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
032:
033: /**
034: * <p>Java class for message-driven-beanType complex type.
035: *
036: * <p>The following schema fragment specifies the expected content contained within this class.
037: *
038: * <pre>
039: * <complexType name="message-driven-beanType">
040: * <complexContent>
041: * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
042: * <sequence>
043: * <element name="ejb-name" type="{http://www.w3.org/2001/XMLSchema}string"/>
044: * <element ref="{http://geronimo.apache.org/xml/ns/naming-1.2}resource-adapter"/>
045: * <element name="activation-config" type="{http://openejb.apache.org/xml/ns/openejb-jar-2.2}activation-configType" minOccurs="0"/>
046: * <group ref="{http://geronimo.apache.org/xml/ns/naming-1.2}jndiEnvironmentRefsGroup"/>
047: * </sequence>
048: * <attribute name="id" type="{http://www.w3.org/2001/XMLSchema}ID" />
049: * </restriction>
050: * </complexContent>
051: * </complexType>
052: * </pre>
053: *
054: *
055: */
056: @XmlAccessorType(XmlAccessType.FIELD)
057: @XmlType(name="message-driven-beanType",propOrder={"ejbName","resourceAdapter","activationConfig","abstractNamingEntry","persistenceContextRef","persistenceUnitRef","ejbRef","ejbLocalRef","serviceRef","resourceRef","resourceEnvRef"})
058: public class MessageDrivenBeanType implements EnterpriseBean {
059:
060: @XmlElement(name="ejb-name",required=true)
061: protected String ejbName;
062:
063: @XmlElement(name="resource-adapter",namespace="http://geronimo.apache.org/xml/ns/naming-1.2",required=true)
064: protected ResourceLocatorType resourceAdapter;
065:
066: @XmlElement(name="activation-config")
067: protected ActivationConfigType activationConfig;
068:
069: @XmlElementRef(name="abstract-naming-entry",namespace="http://geronimo.apache.org/xml/ns/naming-1.2",type=JAXBElement.class)
070: protected List<JAXBElement<? extends AbstractNamingEntryType>> abstractNamingEntry;
071:
072: @XmlElement(name="persistence-contenxt-ref",namespace="http://geronimo.apache.org/xml/ns/naming-1.2")
073: protected List<PersistenceContextRefType> persistenceContextRef;
074:
075: @XmlElement(name="persistence-unit-ref",namespace="http://geronimo.apache.org/xml/ns/naming-1.2")
076: protected List<PersistenceUnitRefType> persistenceUnitRef;
077:
078: @XmlElement(name="ejb-ref",namespace="http://geronimo.apache.org/xml/ns/naming-1.2")
079: protected List<EjbRefType> ejbRef;
080:
081: @XmlElement(name="ejb-local-ref",namespace="http://geronimo.apache.org/xml/ns/naming-1.2")
082: protected List<EjbLocalRefType> ejbLocalRef;
083:
084: @XmlElement(name="service-ref",namespace="http://geronimo.apache.org/xml/ns/naming-1.2")
085: protected List<ServiceRefType> serviceRef;
086:
087: @XmlElement(name="resource-ref",namespace="http://geronimo.apache.org/xml/ns/naming-1.2")
088: protected List<ResourceRefType> resourceRef;
089:
090: @XmlElement(name="resource-env-ref",namespace="http://geronimo.apache.org/xml/ns/naming-1.2")
091: protected List<ResourceEnvRefType> resourceEnvRef;
092:
093: @XmlAttribute
094: @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
095: @XmlID
096: protected String id;
097:
098: @XmlTransient
099: public List<String> getJndiName() {
100: return Collections.emptyList();
101: }
102:
103: @XmlTransient
104: public List<String> getLocalJndiName() {
105: return Collections.emptyList();
106: }
107:
108: public List<Jndi> getJndi() {
109: return Collections.emptyList();
110: }
111:
112: /**
113: * Gets the value of the ejbName property.
114: *
115: * @return
116: * possible object is
117: * {@link String }
118: *
119: */
120: public String getEjbName() {
121: return ejbName;
122: }
123:
124: /**
125: * Sets the value of the ejbName property.
126: *
127: * @param value
128: * allowed object is
129: * {@link String }
130: *
131: */
132: public void setEjbName(String value) {
133: this .ejbName = value;
134: }
135:
136: /**
137: * Gets the value of the resourceAdapter property.
138: *
139: * @return
140: * possible object is
141: * {@link ResourceLocatorType }
142: *
143: */
144: public ResourceLocatorType getResourceAdapter() {
145: return resourceAdapter;
146: }
147:
148: /**
149: * Sets the value of the resourceAdapter property.
150: *
151: * @param value
152: * allowed object is
153: * {@link ResourceLocatorType }
154: *
155: */
156: public void setResourceAdapter(ResourceLocatorType value) {
157: this .resourceAdapter = value;
158: }
159:
160: /**
161: * Gets the value of the activationConfig property.
162: *
163: * @return
164: * possible object is
165: * {@link ActivationConfigType }
166: *
167: */
168: public ActivationConfigType getActivationConfig() {
169: return activationConfig;
170: }
171:
172: /**
173: * Sets the value of the activationConfig property.
174: *
175: * @param value
176: * allowed object is
177: * {@link ActivationConfigType }
178: *
179: */
180: public void setActivationConfig(ActivationConfigType value) {
181: this .activationConfig = value;
182: }
183:
184: /**
185: * Gets the value of the abstractNamingEntry property.
186: *
187: * <p>
188: * This accessor method returns a reference to the live list,
189: * not a snapshot. Therefore any modification you make to the
190: * returned list will be present inside the JAXB object.
191: * This is why there is not a <CODE>set</CODE> method for the abstractNamingEntry property.
192: *
193: * <p>
194: * For example, to add a new item, do as follows:
195: * <pre>
196: * getAbstractNamingEntry().add(newItem);
197: * </pre>
198: *
199: *
200: * <p>
201: * Objects of the following type(s) are allowed in the list
202: * {@link JAXBElement }{@code <}{@link AbstractNamingEntryType }{@code >}
203: * {@link JAXBElement }{@code <}{@link PersistenceContextRefType }{@code >}
204: * {@link JAXBElement }{@code <}{@link PersistenceUnitRefType }{@code >}
205: * {@link JAXBElement }{@code <}{@link GbeanRefType }{@code >}
206: *
207: *
208: */
209: public List<JAXBElement<? extends AbstractNamingEntryType>> getAbstractNamingEntry() {
210: if (abstractNamingEntry == null) {
211: abstractNamingEntry = new ArrayList<JAXBElement<? extends AbstractNamingEntryType>>();
212: }
213: return this .abstractNamingEntry;
214: }
215:
216: public List<PersistenceContextRefType> getPersistenceContextRef() {
217: if (persistenceContextRef == null) {
218: persistenceContextRef = new ArrayList<PersistenceContextRefType>();
219: }
220: return persistenceContextRef;
221: }
222:
223: public List<PersistenceUnitRefType> getPersistenceUnitRef() {
224: if (persistenceUnitRef == null) {
225: persistenceUnitRef = new ArrayList<PersistenceUnitRefType>();
226: }
227: return persistenceUnitRef;
228: }
229:
230: /**
231: * Gets the value of the ejbRef property.
232: *
233: * <p>
234: * This accessor method returns a reference to the live list,
235: * not a snapshot. Therefore any modification you make to the
236: * returned list will be present inside the JAXB object.
237: * This is why there is not a <CODE>set</CODE> method for the ejbRef property.
238: *
239: * <p>
240: * For example, to add a new item, do as follows:
241: * <pre>
242: * getEjbRef().add(newItem);
243: * </pre>
244: *
245: *
246: * <p>
247: * Objects of the following type(s) are allowed in the list
248: * {@link EjbRefType }
249: *
250: *
251: */
252: public List<EjbRefType> getEjbRef() {
253: if (ejbRef == null) {
254: ejbRef = new ArrayList<EjbRefType>();
255: }
256: return this .ejbRef;
257: }
258:
259: /**
260: * Gets the value of the ejbLocalRef property.
261: *
262: * <p>
263: * This accessor method returns a reference to the live list,
264: * not a snapshot. Therefore any modification you make to the
265: * returned list will be present inside the JAXB object.
266: * This is why there is not a <CODE>set</CODE> method for the ejbLocalRef property.
267: *
268: * <p>
269: * For example, to add a new item, do as follows:
270: * <pre>
271: * getEjbLocalRef().add(newItem);
272: * </pre>
273: *
274: *
275: * <p>
276: * Objects of the following type(s) are allowed in the list
277: * {@link EjbLocalRefType }
278: *
279: *
280: */
281: public List<EjbLocalRefType> getEjbLocalRef() {
282: if (ejbLocalRef == null) {
283: ejbLocalRef = new ArrayList<EjbLocalRefType>();
284: }
285: return this .ejbLocalRef;
286: }
287:
288: /**
289: * Gets the value of the serviceRef property.
290: *
291: * <p>
292: * This accessor method returns a reference to the live list,
293: * not a snapshot. Therefore any modification you make to the
294: * returned list will be present inside the JAXB object.
295: * This is why there is not a <CODE>set</CODE> method for the serviceRef property.
296: *
297: * <p>
298: * For example, to add a new item, do as follows:
299: * <pre>
300: * getServiceRef().add(newItem);
301: * </pre>
302: *
303: *
304: * <p>
305: * Objects of the following type(s) are allowed in the list
306: * {@link ServiceRefType }
307: *
308: *
309: */
310: public List<ServiceRefType> getServiceRef() {
311: if (serviceRef == null) {
312: serviceRef = new ArrayList<ServiceRefType>();
313: }
314: return this .serviceRef;
315: }
316:
317: /**
318: * Gets the value of the resourceRef property.
319: *
320: * <p>
321: * This accessor method returns a reference to the live list,
322: * not a snapshot. Therefore any modification you make to the
323: * returned list will be present inside the JAXB object.
324: * This is why there is not a <CODE>set</CODE> method for the resourceRef property.
325: *
326: * <p>
327: * For example, to add a new item, do as follows:
328: * <pre>
329: * getResourceRef().add(newItem);
330: * </pre>
331: *
332: *
333: * <p>
334: * Objects of the following type(s) are allowed in the list
335: * {@link ResourceRefType }
336: *
337: *
338: */
339: public List<ResourceRefType> getResourceRef() {
340: if (resourceRef == null) {
341: resourceRef = new ArrayList<ResourceRefType>();
342: }
343: return this .resourceRef;
344: }
345:
346: /**
347: * Gets the value of the resourceEnvRef property.
348: *
349: * <p>
350: * This accessor method returns a reference to the live list,
351: * not a snapshot. Therefore any modification you make to the
352: * returned list will be present inside the JAXB object.
353: * This is why there is not a <CODE>set</CODE> method for the resourceEnvRef property.
354: *
355: * <p>
356: * For example, to add a new item, do as follows:
357: * <pre>
358: * getResourceEnvRef().add(newItem);
359: * </pre>
360: *
361: *
362: * <p>
363: * Objects of the following type(s) are allowed in the list
364: * {@link ResourceEnvRefType }
365: *
366: *
367: */
368: public List<ResourceEnvRefType> getResourceEnvRef() {
369: if (resourceEnvRef == null) {
370: resourceEnvRef = new ArrayList<ResourceEnvRefType>();
371: }
372: return this .resourceEnvRef;
373: }
374:
375: /**
376: * Gets the value of the id property.
377: *
378: * @return
379: * possible object is
380: * {@link String }
381: *
382: */
383: public String getId() {
384: return id;
385: }
386:
387: /**
388: * Sets the value of the id property.
389: *
390: * @param value
391: * allowed object is
392: * {@link String }
393: *
394: */
395: public void setId(String value) {
396: this.id = value;
397: }
398:
399: }
|