Save This Page
Home » openejb-3.1.2-src » org.apache » openejb » jee » jba » [javadoc | source]
    1   /**
    2    * Licensed to the Apache Software Foundation (ASF) under one or more
    3    * contributor license agreements.  See the NOTICE file distributed with
    4    * this work for additional information regarding copyright ownership.
    5    * The ASF licenses this file to You under the Apache License, Version 2.0
    6    * (the "License"); you may not use this file except in compliance with
    7    * the License.  You may obtain a copy of the License at
    8    *
    9    *     http://www.apache.org/licenses/LICENSE-2.0
   10    *
   11    * Unless required by applicable law or agreed to in writing, software
   12    * distributed under the License is distributed on an "AS IS" BASIS,
   13    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   14    * See the License for the specific language governing permissions and
   15    * limitations under the License.
   16    */
   17   
   18   package org.apache.openejb.jee.jba;
   19   
   20   import java.util.ArrayList;
   21   import java.util.List;
   22   import javax.xml.bind.annotation.XmlAccessType;
   23   import javax.xml.bind.annotation.XmlAccessorType;
   24   import javax.xml.bind.annotation.XmlAnyElement;
   25   import javax.xml.bind.annotation.XmlAttribute;
   26   import javax.xml.bind.annotation.XmlMixed;
   27   import javax.xml.bind.annotation.XmlRootElement;
   28   import javax.xml.bind.annotation.XmlType;
   29   import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
   30   import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
   31   import org.w3c.dom.Element;
   32   
   33   
   34   /**
   35    * 
   36    */
   37   @XmlAccessorType(XmlAccessType.FIELD)
   38   @XmlType(name = "", propOrder = {
   39       "content"
   40   })
   41   @XmlRootElement(name = "interceptor")
   42   public class Interceptor {
   43   
   44       @XmlAttribute
   45       @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
   46       protected String transaction;
   47       @XmlAttribute
   48       @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
   49       protected String metricsEnabled;
   50       @XmlAttribute(name = "call-by-value")
   51       @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
   52       protected String callByValue;
   53       @XmlMixed
   54       @XmlAnyElement
   55       protected List<Object> content;
   56   
   57       /**
   58        * Gets the value of the transaction property.
   59        * 
   60        * @return
   61        *     possible object is
   62        *     {@link String }
   63        *     
   64        */
   65       public String getTransaction() {
   66           if (transaction == null) {
   67               return "Both";
   68           } else {
   69               return transaction;
   70           }
   71       }
   72   
   73       /**
   74        * Sets the value of the transaction property.
   75        * 
   76        * @param value
   77        *     allowed object is
   78        *     {@link String }
   79        *     
   80        */
   81       public void setTransaction(String value) {
   82           this.transaction = value;
   83       }
   84   
   85       /**
   86        * Gets the value of the metricsEnabled property.
   87        * 
   88        * @return
   89        *     possible object is
   90        *     {@link String }
   91        *     
   92        */
   93       public String getMetricsEnabled() {
   94           if (metricsEnabled == null) {
   95               return "false";
   96           } else {
   97               return metricsEnabled;
   98           }
   99       }
  100   
  101       /**
  102        * Sets the value of the metricsEnabled property.
  103        * 
  104        * @param value
  105        *     allowed object is
  106        *     {@link String }
  107        *     
  108        */
  109       public void setMetricsEnabled(String value) {
  110           this.metricsEnabled = value;
  111       }
  112   
  113       /**
  114        * Gets the value of the callByValue property.
  115        * 
  116        * @return
  117        *     possible object is
  118        *     {@link String }
  119        *     
  120        */
  121       public String getCallByValue() {
  122           return callByValue;
  123       }
  124   
  125       /**
  126        * Sets the value of the callByValue property.
  127        * 
  128        * @param value
  129        *     allowed object is
  130        *     {@link String }
  131        *     
  132        */
  133       public void setCallByValue(String value) {
  134           this.callByValue = value;
  135       }
  136   
  137       /**
  138        * Gets the value of the content property.
  139        * 
  140        * <p>
  141        * This accessor method returns a reference to the live list,
  142        * not a snapshot. Therefore any modification you make to the
  143        * returned list will be present inside the JAXB object.
  144        * This is why there is not a <CODE>set</CODE> method for the content property.
  145        * 
  146        * <p>
  147        * For example, to add a new item, do as follows:
  148        * <pre>
  149        *    getContent().add(newItem);
  150        * </pre>
  151        * 
  152        * 
  153        * <p>
  154        * Objects of the following type(s) are allowed in the list
  155        * {@link Element }
  156        * {@link String }
  157        * 
  158        * 
  159        */
  160       public List<Object> getContent() {
  161           if (content == null) {
  162               content = new ArrayList<Object>();
  163           }
  164           return this.content;
  165       }
  166   
  167   }

Save This Page
Home » openejb-3.1.2-src » org.apache » openejb » jee » jba » [javadoc | source]