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.jba;
017:
018: import java.util.ArrayList;
019: import java.util.List;
020: import javax.xml.bind.annotation.XmlAccessType;
021: import javax.xml.bind.annotation.XmlAccessorType;
022: import javax.xml.bind.annotation.XmlAnyElement;
023: import javax.xml.bind.annotation.XmlAttribute;
024: import javax.xml.bind.annotation.XmlMixed;
025: import javax.xml.bind.annotation.XmlRootElement;
026: import javax.xml.bind.annotation.XmlType;
027: import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
028: import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
029: import org.w3c.dom.Element;
030:
031: /**
032: *
033: */
034: @XmlAccessorType(XmlAccessType.FIELD)
035: @XmlType(name="",propOrder={"content"})
036: @XmlRootElement(name="interceptor")
037: public class Interceptor {
038:
039: @XmlAttribute
040: @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
041: protected String transaction;
042: @XmlAttribute
043: @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
044: protected String metricsEnabled;
045: @XmlAttribute(name="call-by-value")
046: @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
047: protected String callByValue;
048: @XmlMixed
049: @XmlAnyElement
050: protected List<Object> content;
051:
052: /**
053: * Gets the value of the transaction property.
054: *
055: * @return
056: * possible object is
057: * {@link String }
058: *
059: */
060: public String getTransaction() {
061: if (transaction == null) {
062: return "Both";
063: } else {
064: return transaction;
065: }
066: }
067:
068: /**
069: * Sets the value of the transaction property.
070: *
071: * @param value
072: * allowed object is
073: * {@link String }
074: *
075: */
076: public void setTransaction(String value) {
077: this .transaction = value;
078: }
079:
080: /**
081: * Gets the value of the metricsEnabled property.
082: *
083: * @return
084: * possible object is
085: * {@link String }
086: *
087: */
088: public String getMetricsEnabled() {
089: if (metricsEnabled == null) {
090: return "false";
091: } else {
092: return metricsEnabled;
093: }
094: }
095:
096: /**
097: * Sets the value of the metricsEnabled property.
098: *
099: * @param value
100: * allowed object is
101: * {@link String }
102: *
103: */
104: public void setMetricsEnabled(String value) {
105: this .metricsEnabled = value;
106: }
107:
108: /**
109: * Gets the value of the callByValue property.
110: *
111: * @return
112: * possible object is
113: * {@link String }
114: *
115: */
116: public String getCallByValue() {
117: return callByValue;
118: }
119:
120: /**
121: * Sets the value of the callByValue property.
122: *
123: * @param value
124: * allowed object is
125: * {@link String }
126: *
127: */
128: public void setCallByValue(String value) {
129: this .callByValue = value;
130: }
131:
132: /**
133: * Gets the value of the content property.
134: *
135: * <p>
136: * This accessor method returns a reference to the live list,
137: * not a snapshot. Therefore any modification you make to the
138: * returned list will be present inside the JAXB object.
139: * This is why there is not a <CODE>set</CODE> method for the content property.
140: *
141: * <p>
142: * For example, to add a new item, do as follows:
143: * <pre>
144: * getContent().add(newItem);
145: * </pre>
146: *
147: *
148: * <p>
149: * Objects of the following type(s) are allowed in the list
150: * {@link Element }
151: * {@link String }
152: *
153: *
154: */
155: public List<Object> getContent() {
156: if (content == null) {
157: content = new ArrayList<Object>();
158: }
159: return this.content;
160: }
161:
162: }
|