src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlMTOM.java

Tue, 09 Apr 2013 14:51:13 +0100

author
alanb
date
Tue, 09 Apr 2013 14:51:13 +0100
changeset 368
0989ad8c0860
child 374
72e03566f0a6
permissions
-rw-r--r--

8010393: Update JAX-WS RI to 2.2.9-b12941
Reviewed-by: alanb, erikj
Contributed-by: miroslav.kos@oracle.com, martin.grebac@oracle.com

alanb@368 1 /*
alanb@368 2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
alanb@368 3 *
alanb@368 4 * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
alanb@368 5 *
alanb@368 6 * The contents of this file are subject to the terms of either the GNU
alanb@368 7 * General Public License Version 2 only ("GPL") or the Common Development
alanb@368 8 * and Distribution License("CDDL") (collectively, the "License"). You
alanb@368 9 * may not use this file except in compliance with the License. You can
alanb@368 10 * obtain a copy of the License at
alanb@368 11 * http://glassfish.java.net/public/CDDL+GPL_1_1.html
alanb@368 12 * or packager/legal/LICENSE.txt. See the License for the specific
alanb@368 13 * language governing permissions and limitations under the License.
alanb@368 14 *
alanb@368 15 * When distributing the software, include this License Header Notice in each
alanb@368 16 * file and include the License file at packager/legal/LICENSE.txt.
alanb@368 17 *
alanb@368 18 * GPL Classpath Exception:
alanb@368 19 * Oracle designates this particular file as subject to the "Classpath"
alanb@368 20 * exception as provided by Oracle in the GPL Version 2 section of the License
alanb@368 21 * file that accompanied this code.
alanb@368 22 *
alanb@368 23 * Modifications:
alanb@368 24 * If applicable, add the following below the License Header, with the fields
alanb@368 25 * enclosed by brackets [] replaced by your own identifying information:
alanb@368 26 * "Portions Copyright [year] [name of copyright owner]"
alanb@368 27 *
alanb@368 28 * Contributor(s):
alanb@368 29 * If you wish your version of this file to be governed by only the CDDL or
alanb@368 30 * only the GPL Version 2, indicate your decision by adding "[Contributor]
alanb@368 31 * elects to include this software in this distribution under the [CDDL or GPL
alanb@368 32 * Version 2] license." If you don't indicate a single choice of license, a
alanb@368 33 * recipient has the option to distribute your version of this file under
alanb@368 34 * either the CDDL, the GPL Version 2 or to extend the choice of license to
alanb@368 35 * its licensees as provided above. However, if you add GPL Version 2 code
alanb@368 36 * and therefore, elected the GPL Version 2 license, then the option applies
alanb@368 37 * only if the new code is made subject to such option by the copyright
alanb@368 38 * holder.
alanb@368 39 */
alanb@368 40 package com.oracle.xmlns.internal.webservices.jaxws_databinding;
alanb@368 41 import javax.xml.bind.annotation.XmlAccessType;
alanb@368 42 import javax.xml.bind.annotation.XmlAccessorType;
alanb@368 43 import javax.xml.bind.annotation.XmlAttribute;
alanb@368 44 import javax.xml.bind.annotation.XmlRootElement;
alanb@368 45 import javax.xml.bind.annotation.XmlType;
alanb@368 46 import javax.xml.ws.soap.MTOM;
alanb@368 47 import java.lang.annotation.Annotation;
alanb@368 48
alanb@368 49 import static com.oracle.xmlns.internal.webservices.jaxws_databinding.Util.nullSafe;
alanb@368 50
alanb@368 51
alanb@368 52 /**
alanb@368 53 * This file was generated by JAXB-RI v2.2.6 and afterwards modified
alanb@368 54 * to implement appropriate Annotation
alanb@368 55 *
alanb@368 56 * <p>Java class for anonymous complex type.
alanb@368 57 *
alanb@368 58 * <p>The following schema fragment specifies the expected content contained within this class.
alanb@368 59 *
alanb@368 60 * <pre>
alanb@368 61 * &lt;complexType>
alanb@368 62 * &lt;complexContent>
alanb@368 63 * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
alanb@368 64 * &lt;attribute name="enabled" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
alanb@368 65 * &lt;attribute name="threshold" type="{http://www.w3.org/2001/XMLSchema}int" default="0" />
alanb@368 66 * &lt;/restriction>
alanb@368 67 * &lt;/complexContent>
alanb@368 68 * &lt;/complexType>
alanb@368 69 * </pre>
alanb@368 70 *
alanb@368 71 *
alanb@368 72 */
alanb@368 73 @XmlAccessorType(XmlAccessType.FIELD)
alanb@368 74 @XmlType(name = "")
alanb@368 75 @XmlRootElement(name = "mtom")
alanb@368 76 public class XmlMTOM implements MTOM {
alanb@368 77
alanb@368 78 @XmlAttribute(name = "enabled")
alanb@368 79 protected Boolean enabled;
alanb@368 80 @XmlAttribute(name = "threshold")
alanb@368 81 protected Integer threshold;
alanb@368 82
alanb@368 83 /**
alanb@368 84 * Gets the value of the enabled property.
alanb@368 85 *
alanb@368 86 * @return
alanb@368 87 * possible object is
alanb@368 88 * {@link Boolean }
alanb@368 89 *
alanb@368 90 */
alanb@368 91 public boolean isEnabled() {
alanb@368 92 if (enabled == null) {
alanb@368 93 return true;
alanb@368 94 } else {
alanb@368 95 return enabled;
alanb@368 96 }
alanb@368 97 }
alanb@368 98
alanb@368 99 /**
alanb@368 100 * Sets the value of the enabled property.
alanb@368 101 *
alanb@368 102 * @param value
alanb@368 103 * allowed object is
alanb@368 104 * {@link Boolean }
alanb@368 105 *
alanb@368 106 */
alanb@368 107 public void setEnabled(Boolean value) {
alanb@368 108 this.enabled = value;
alanb@368 109 }
alanb@368 110
alanb@368 111 /**
alanb@368 112 * Gets the value of the threshold property.
alanb@368 113 *
alanb@368 114 * @return
alanb@368 115 * possible object is
alanb@368 116 * {@link Integer }
alanb@368 117 *
alanb@368 118 */
alanb@368 119 public int getThreshold() {
alanb@368 120 if (threshold == null) {
alanb@368 121 return 0;
alanb@368 122 } else {
alanb@368 123 return threshold;
alanb@368 124 }
alanb@368 125 }
alanb@368 126
alanb@368 127 /**
alanb@368 128 * Sets the value of the threshold property.
alanb@368 129 *
alanb@368 130 * @param value
alanb@368 131 * allowed object is
alanb@368 132 * {@link Integer }
alanb@368 133 *
alanb@368 134 */
alanb@368 135 public void setThreshold(Integer value) {
alanb@368 136 this.threshold = value;
alanb@368 137 }
alanb@368 138
alanb@368 139 @Override
alanb@368 140 public boolean enabled() {
alanb@368 141 return nullSafe(enabled, Boolean.TRUE);
alanb@368 142 }
alanb@368 143
alanb@368 144 @Override
alanb@368 145 public int threshold() {
alanb@368 146 return nullSafe(threshold, 0);
alanb@368 147 }
alanb@368 148
alanb@368 149 @Override
alanb@368 150 public Class<? extends Annotation> annotationType() {
alanb@368 151 return MTOM.class;
alanb@368 152 }
alanb@368 153 }

mercurial