|
1 /* |
|
2 * Copyright (c) 1997, 2010, 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 */ |
|
25 |
|
26 |
|
27 package com.sun.xml.internal.ws.resources; |
|
28 |
|
29 import com.sun.xml.internal.ws.util.localization.Localizable; |
|
30 import com.sun.xml.internal.ws.util.localization.LocalizableMessageFactory; |
|
31 import com.sun.xml.internal.ws.util.localization.Localizer; |
|
32 |
|
33 |
|
34 /** |
|
35 * Defines string formatting method for each constant in the resource file |
|
36 * |
|
37 */ |
|
38 public final class ProviderApiMessages { |
|
39 |
|
40 private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.providerApi"); |
|
41 private final static Localizer localizer = new Localizer(); |
|
42 |
|
43 public static Localizable localizableNULL_ADDRESS_SERVICE_ENDPOINT() { |
|
44 return messageFactory.getMessage("null.address.service.endpoint"); |
|
45 } |
|
46 |
|
47 /** |
|
48 * Address in an EPR cannot be null, when serviceName or portName is null |
|
49 * |
|
50 */ |
|
51 public static String NULL_ADDRESS_SERVICE_ENDPOINT() { |
|
52 return localizer.localize(localizableNULL_ADDRESS_SERVICE_ENDPOINT()); |
|
53 } |
|
54 |
|
55 public static Localizable localizableNO_WSDL_NO_PORT(Object arg0) { |
|
56 return messageFactory.getMessage("no.wsdl.no.port", arg0); |
|
57 } |
|
58 |
|
59 /** |
|
60 * WSDL Metadata not available to create the proxy, either Service instance or ServiceEndpointInterface {0} should have WSDL information |
|
61 * |
|
62 */ |
|
63 public static String NO_WSDL_NO_PORT(Object arg0) { |
|
64 return localizer.localize(localizableNO_WSDL_NO_PORT(arg0)); |
|
65 } |
|
66 |
|
67 public static Localizable localizableNULL_SERVICE() { |
|
68 return messageFactory.getMessage("null.service"); |
|
69 } |
|
70 |
|
71 /** |
|
72 * serviceName can't be null when portName is specified |
|
73 * |
|
74 */ |
|
75 public static String NULL_SERVICE() { |
|
76 return localizer.localize(localizableNULL_SERVICE()); |
|
77 } |
|
78 |
|
79 public static Localizable localizableNULL_ADDRESS() { |
|
80 return messageFactory.getMessage("null.address"); |
|
81 } |
|
82 |
|
83 /** |
|
84 * Address in an EPR cannot be null |
|
85 * |
|
86 */ |
|
87 public static String NULL_ADDRESS() { |
|
88 return localizer.localize(localizableNULL_ADDRESS()); |
|
89 } |
|
90 |
|
91 public static Localizable localizableNULL_PORTNAME() { |
|
92 return messageFactory.getMessage("null.portname"); |
|
93 } |
|
94 |
|
95 /** |
|
96 * EPR doesn't have EndpointName in the Metadata |
|
97 * |
|
98 */ |
|
99 public static String NULL_PORTNAME() { |
|
100 return localizer.localize(localizableNULL_PORTNAME()); |
|
101 } |
|
102 |
|
103 public static Localizable localizableNOTFOUND_SERVICE_IN_WSDL(Object arg0, Object arg1) { |
|
104 return messageFactory.getMessage("notfound.service.in.wsdl", arg0, arg1); |
|
105 } |
|
106 |
|
107 /** |
|
108 * Service: {0} not found in WSDL: {1} |
|
109 * |
|
110 */ |
|
111 public static String NOTFOUND_SERVICE_IN_WSDL(Object arg0, Object arg1) { |
|
112 return localizer.localize(localizableNOTFOUND_SERVICE_IN_WSDL(arg0, arg1)); |
|
113 } |
|
114 |
|
115 public static Localizable localizableNULL_EPR() { |
|
116 return messageFactory.getMessage("null.epr"); |
|
117 } |
|
118 |
|
119 /** |
|
120 * EndpointReference is null |
|
121 * |
|
122 */ |
|
123 public static String NULL_EPR() { |
|
124 return localizer.localize(localizableNULL_EPR()); |
|
125 } |
|
126 |
|
127 public static Localizable localizableNULL_WSDL() { |
|
128 return messageFactory.getMessage("null.wsdl"); |
|
129 } |
|
130 |
|
131 /** |
|
132 * EPR doesn't have WSDL Metadata which is needed for the current operation |
|
133 * |
|
134 */ |
|
135 public static String NULL_WSDL() { |
|
136 return localizer.localize(localizableNULL_WSDL()); |
|
137 } |
|
138 |
|
139 public static Localizable localizableNOTFOUND_PORT_IN_WSDL(Object arg0, Object arg1, Object arg2) { |
|
140 return messageFactory.getMessage("notfound.port.in.wsdl", arg0, arg1, arg2); |
|
141 } |
|
142 |
|
143 /** |
|
144 * Port: {0} not a valid port in Service: {1} in WSDL: {2} |
|
145 * |
|
146 */ |
|
147 public static String NOTFOUND_PORT_IN_WSDL(Object arg0, Object arg1, Object arg2) { |
|
148 return localizer.localize(localizableNOTFOUND_PORT_IN_WSDL(arg0, arg1, arg2)); |
|
149 } |
|
150 |
|
151 public static Localizable localizableERROR_WSDL(Object arg0) { |
|
152 return messageFactory.getMessage("error.wsdl", arg0); |
|
153 } |
|
154 |
|
155 /** |
|
156 * Error in parsing WSDL: {0} |
|
157 * |
|
158 */ |
|
159 public static String ERROR_WSDL(Object arg0) { |
|
160 return localizer.localize(localizableERROR_WSDL(arg0)); |
|
161 } |
|
162 |
|
163 } |