001: /**
002: * Licensed to the Apache Software Foundation (ASF) under one
003: * or more contributor license agreements. See the NOTICE file
004: * distributed with this work for additional information
005: * regarding copyright ownership. The ASF licenses this file
006: * to you under the Apache License, Version 2.0 (the
007: * "License"); you may not use this file except in compliance
008: * with the License. You may obtain a copy of the License at
009: *
010: * http://www.apache.org/licenses/LICENSE-2.0
011: *
012: * Unless required by applicable law or agreed to in writing,
013: * software distributed under the License is distributed on an
014: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015: * KIND, either express or implied. See the License for the
016: * specific language governing permissions and limitations
017: * under the License.
018: */package org.apache.cxf.ws.addressing;
019:
020: import java.util.ResourceBundle;
021:
022: import javax.xml.namespace.QName;
023:
024: import org.apache.cxf.common.i18n.BundleUtils;
025: import org.apache.cxf.common.util.PackageUtils;
026:
027: /**
028: * Encapsulation of version-specific WS-Addressing constants.
029: */
030: public class AddressingConstantsImpl implements AddressingConstants {
031:
032: private static final ResourceBundle BUNDLE = BundleUtils
033: .getBundle(AddressingConstantsImpl.class);
034:
035: public AddressingConstantsImpl() {
036: }
037:
038: /**
039: * @return namespace defined by the normative WS-Addressing Core schema
040: */
041: public String getNamespaceURI() {
042: return Names.WSA_NAMESPACE_NAME;
043: }
044:
045: /**
046: * @return namespace defined by the normative WS-Addressing WSDL bindings
047: * schema
048: */
049: public String getWSDLNamespaceURI() {
050: return Names.WSA_NAMESPACE_WSDL_NAME;
051: }
052:
053: /**
054: * @return QName of the WSDL extensiblity element
055: */
056: public QName getWSDLExtensibilityQName() {
057: return Names.WSAW_USING_ADDRESSING_QNAME;
058: }
059:
060: /**
061: * @return QName of the wsaw:Action element
062: */
063: public QName getWSDLActionQName() {
064: return Names.WSAW_ACTION_QNAME;
065: }
066:
067: /**
068: * @return Anonymous address URI
069: */
070: public String getAnonymousURI() {
071: return Names.WSA_ANONYMOUS_ADDRESS;
072: }
073:
074: /**
075: * @return None address URI
076: */
077: public String getNoneURI() {
078: return Names.WSA_NONE_ADDRESS;
079: }
080:
081: /**
082: * @return QName of the From addressing header
083: */
084: public QName getFromQName() {
085: return Names.WSA_FROM_QNAME;
086: }
087:
088: /**
089: * @return QName of the To addressing header
090: */
091: public QName getToQName() {
092: return Names.WSA_TO_QNAME;
093: }
094:
095: /**
096: * @return QName of the ReplyTo addressing header
097: */
098: public QName getReplyToQName() {
099: return Names.WSA_REPLYTO_QNAME;
100: }
101:
102: /**
103: * @return QName of the FaultTo addressing header
104: */
105: public QName getFaultToQName() {
106: return Names.WSA_FAULTTO_QNAME;
107: }
108:
109: /**
110: * @return QName of the Action addressing header
111: */
112: public QName getActionQName() {
113: return Names.WSA_ACTION_QNAME;
114: }
115:
116: /**
117: * @return QName of the MessageID addressing header
118: */
119: public QName getMessageIDQName() {
120: return Names.WSA_MESSAGEID_QNAME;
121: }
122:
123: /**
124: * @return Default value for RelationshipType indicating a reply
125: * to the related message
126: */
127: public String getRelationshipReply() {
128: return Names.WSA_RELATIONSHIP_REPLY;
129: }
130:
131: /**
132: * @return QName of the RelatesTo addressing header
133: */
134: public QName getRelatesToQName() {
135: return Names.WSA_RELATESTO_QNAME;
136: }
137:
138: /**
139: * @return QName of the Relationship addressing header
140: */
141: public QName getRelationshipTypeQName() {
142: return Names.WSA_RELATIONSHIPTYPE_QNAME;
143: }
144:
145: /**
146: * @return QName of the Metadata
147: */
148: public QName getMetadataQName() {
149: return Names.WSA_METADATA_QNAME;
150: }
151:
152: /**
153: * @return QName of the Address
154: */
155: public QName getAddressQName() {
156: return Names.WSA_ADDRESS_QNAME;
157: }
158:
159: /**
160: * @return package name of the implementation
161: */
162: public String getPackageName() {
163: return PackageUtils
164: .getPackageName(AddressingConstantsImpl.class);
165: }
166:
167: /**
168: * @return QName of the reference parameter marker
169: */
170: public QName getIsReferenceParameterQName() {
171: return Names.WSA_IS_REFERENCE_PARAMETER_QNAME;
172: }
173:
174: /**
175: * @return QName of the Invalid Message Addressing Property fault subcode
176: */
177: public QName getInvalidMapQName() {
178: return Names.INVALID_MAP_QNAME;
179: }
180:
181: /**
182: * @return QName of the Message Addressing Property Required fault subcode
183: */
184: public QName getMapRequiredQName() {
185: return Names.MAP_REQUIRED_QNAME;
186: }
187:
188: /**
189: * @return QName of the Destination Unreachable fault subcode
190: */
191: public QName getDestinationUnreachableQName() {
192: return Names.DESTINATION_UNREACHABLE_QNAME;
193: }
194:
195: /**
196: * @return QName of the Action Not Supported fault subcode
197: */
198: public QName getActionNotSupportedQName() {
199: return Names.ACTION_NOT_SUPPORTED_QNAME;
200: }
201:
202: /**
203: * @return QName of the Endpoint Unavailable fault subcode
204: */
205: public QName getEndpointUnavailableQName() {
206: return Names.ENDPOINT_UNAVAILABLE_QNAME;
207: }
208:
209: /**
210: * @return Default Fault Action
211: */
212: public String getDefaultFaultAction() {
213: return Names.WSA_DEFAULT_FAULT_ACTION;
214: }
215:
216: /**
217: * @return Action Not Supported text
218: */
219: public String getActionNotSupportedText() {
220: return BUNDLE.getString("ACTION_NOT_SUPPORTED_MSG");
221: }
222:
223: /**
224: * @return Destination Unreachable text
225: */
226: public String getDestinationUnreachableText() {
227: return BUNDLE.getString("DESTINATION_UNREACHABLE_MSG");
228: }
229:
230: /**
231: * @return Endpoint Unavailable text
232: */
233: public String getEndpointUnavailableText() {
234: return BUNDLE.getString("ENDPOINT_UNAVAILABLE_MSG");
235: }
236:
237: /**
238: * @return Invalid Message Addressing Property text
239: */
240: public String getInvalidMapText() {
241: return BUNDLE.getString("INVALID_MAP_MSG");
242: }
243:
244: /**
245: * @return Message Addressing Property Required text
246: */
247: public String getMapRequiredText() {
248: return BUNDLE.getString("MAP_REQUIRED_MSG");
249: }
250:
251: /**
252: * @return Duplicate Message ID text
253: */
254: public String getDuplicateMessageIDText() {
255: return BUNDLE.getString("DUPLICATE_MESSAGE_ID_MSG");
256: }
257: }
|