Thu, 31 Aug 2017 15:18:52 +0800
merge
1 /*
2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
26 package com.sun.xml.internal.ws.developer;
28 import com.sun.xml.internal.ws.api.FeatureConstructor;
30 import javax.xml.ws.WebServiceFeature;
32 import com.sun.org.glassfish.gmbal.ManagedAttribute;
33 import com.sun.org.glassfish.gmbal.ManagedData;
36 /**
37 * Addressing Feature representing MemberSubmission Version.
38 *
39 * @author Rama Pulavarthi
40 */
42 @ManagedData
43 public class MemberSubmissionAddressingFeature extends WebServiceFeature {
44 /**
45 * Constant value identifying the MemberSubmissionAddressingFeature
46 */
47 public static final String ID = "http://java.sun.com/xml/ns/jaxws/2004/08/addressing";
49 /**
50 * Constant ID for the <code>required</code> feature parameter
51 */
52 public static final String IS_REQUIRED = "ADDRESSING_IS_REQUIRED";
54 private boolean required;
56 /**
57 * Create an MemberSubmissionAddressingFeature
58 * The instance created will be enabled.
59 */
60 public MemberSubmissionAddressingFeature() {
61 this.enabled = true;
62 }
64 /**
65 * Create an MemberSubmissionAddressingFeature
66 *
67 * @param enabled specifies whether this feature should
68 * be enabled or not.
69 */
70 public MemberSubmissionAddressingFeature(boolean enabled) {
71 this.enabled = enabled;
72 }
74 /**
75 * Create an <code>MemberSubmissionAddressingFeature</code>
76 *
77 * @param enabled specifies whether this feature should
78 * be enabled or not.
79 * @param required specifies the value that will be used
80 * for the <code>required</code> attribute on the
81 * <code>wsaw:UsingAddressing</code> element.
82 */
83 public MemberSubmissionAddressingFeature(boolean enabled, boolean required) {
84 this.enabled = enabled;
85 this.required = required;
86 }
88 /**
89 * Create an <code>MemberSubmissionAddressingFeature</code>
90 *
91 * @param enabled specifies whether this feature should
92 * be enabled or not.
93 * @param required specifies the value that will be used
94 * for the <code>required</code> attribute on the
95 * <code>wsaw:UsingAddressing</code> element.
96 * @param validation specifies the value that will be used
97 * for validation for the incoming messages. If LAX, messages are not strictly checked for conformance with the spec.
98 */
99 @FeatureConstructor({"enabled","required","validation"})
100 public MemberSubmissionAddressingFeature(boolean enabled, boolean required, MemberSubmissionAddressing.Validation validation) {
101 this.enabled = enabled;
102 this.required = required;
103 this.validation = validation;
104 }
107 @ManagedAttribute
108 public String getID() {
109 return ID;
110 }
112 @ManagedAttribute
113 public boolean isRequired() {
114 return required;
115 }
117 public void setRequired(boolean required) {
118 this.required = required;
119 }
121 private MemberSubmissionAddressing.Validation validation = MemberSubmissionAddressing.Validation.LAX;
122 public void setValidation(MemberSubmissionAddressing.Validation validation) {
123 this.validation = validation;
125 }
127 @ManagedAttribute
128 public MemberSubmissionAddressing.Validation getValidation() {
129 return validation;
130 }
131 }