1 /*
   2  * Copyright (c) 1997, 2017, 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 package com.sun.tools.internal.ws.resources;
  27 
  28 import java.util.Locale;
  29 import java.util.ResourceBundle;
  30 import com.sun.istack.internal.localization.Localizable;
  31 import com.sun.istack.internal.localization.LocalizableMessageFactory;
  32 import com.sun.istack.internal.localization.LocalizableMessageFactory.ResourceBundleSupplier;
  33 import com.sun.istack.internal.localization.Localizer;
  34 



  35 
  36 /**
  37  * Defines string formatting method for each constant in the resource file
  38  *
  39  */
  40 public final class ModelMessages {
  41 
  42     private final static String BUNDLE_NAME = "com.sun.tools.internal.ws.resources.model";
  43     private final static LocalizableMessageFactory MESSAGE_FACTORY = new LocalizableMessageFactory(BUNDLE_NAME, new ModelMessages.BundleSupplier());
  44     private final static Localizer LOCALIZER = new Localizer();

  45 
  46     public static Localizable localizableMODEL_IMPORTER_INVALID_MINOR_MINOR_OR_PATCH_VERSION(Object arg0, Object arg1, Object arg2) {
  47         return MESSAGE_FACTORY.getMessage("model.importer.invalidMinorMinorOrPatchVersion", arg0, arg1, arg2);
  48     }
  49 
  50     /**
  51      * model version "{1}" newer than runtime version "{2}" (line {0}): need to upgrade to a newer runtime
  52      *
  53      */
  54     public static String MODEL_IMPORTER_INVALID_MINOR_MINOR_OR_PATCH_VERSION(Object arg0, Object arg1, Object arg2) {
  55         return LOCALIZER.localize(localizableMODEL_IMPORTER_INVALID_MINOR_MINOR_OR_PATCH_VERSION(arg0, arg1, arg2));
  56     }
  57 
  58     public static Localizable localizableMODEL_SCHEMA_UNSUPPORTED_TYPE(Object arg0, Object arg1, Object arg2) {
  59         return MESSAGE_FACTORY.getMessage("model.schema.unsupportedType", arg0, arg1, arg2);
  60     }
  61 
  62     /**
  63      * unsupported type ({0}): "{1}" (namespace: {2})
  64      *
  65      */
  66     public static String MODEL_SCHEMA_UNSUPPORTED_TYPE(Object arg0, Object arg1, Object arg2) {
  67         return LOCALIZER.localize(localizableMODEL_SCHEMA_UNSUPPORTED_TYPE(arg0, arg1, arg2));
  68     }
  69 
  70     public static Localizable localizableMODEL_IMPORTER_INVALID_CLASS(Object arg0, Object arg1) {
  71         return MESSAGE_FACTORY.getMessage("model.importer.invalidClass", arg0, arg1);
  72     }
  73 
  74     /**
  75      * invalid class name "{1}" in model document (line {0})
  76      *
  77      */
  78     public static String MODEL_IMPORTER_INVALID_CLASS(Object arg0, Object arg1) {
  79         return LOCALIZER.localize(localizableMODEL_IMPORTER_INVALID_CLASS(arg0, arg1));
  80     }
  81 
  82     public static Localizable localizableMODEL_ARRAYWRAPPER_NO_SUBTYPES() {
  83         return MESSAGE_FACTORY.getMessage("model.arraywrapper.no.subtypes");
  84     }
  85 
  86     /**
  87      * LiteralArrayWrapper cannot have subtypes
  88      *
  89      */
  90     public static String MODEL_ARRAYWRAPPER_NO_SUBTYPES() {
  91         return LOCALIZER.localize(localizableMODEL_ARRAYWRAPPER_NO_SUBTYPES());
  92     }
  93 
  94     public static Localizable localizableMODEL_UNIQUENESS_JAVASTRUCTURETYPE(Object arg0, Object arg1) {
  95         return MESSAGE_FACTORY.getMessage("model.uniqueness.javastructuretype", arg0, arg1);
  96     }
  97 
  98     /**
  99      * uniqueness constraint violation, duplicate member "{0}" added to JavaStructureType "{1}"
 100      *
 101      */
 102     public static String MODEL_UNIQUENESS_JAVASTRUCTURETYPE(Object arg0, Object arg1) {
 103         return LOCALIZER.localize(localizableMODEL_UNIQUENESS_JAVASTRUCTURETYPE(arg0, arg1));
 104     }
 105 
 106     public static Localizable localizableMODEL_SCHEMA_INVALID_SIMPLE_TYPE_INVALID_ITEM_TYPE(Object arg0, Object arg1) {
 107         return MESSAGE_FACTORY.getMessage("model.schema.invalidSimpleType.invalidItemType", arg0, arg1);
 108     }
 109 
 110     /**
 111      * in simpleType: "{0}", itemType "{1}" can not be derived by list
 112      *
 113      */
 114     public static String MODEL_SCHEMA_INVALID_SIMPLE_TYPE_INVALID_ITEM_TYPE(Object arg0, Object arg1) {
 115         return LOCALIZER.localize(localizableMODEL_SCHEMA_INVALID_SIMPLE_TYPE_INVALID_ITEM_TYPE(arg0, arg1));
 116     }
 117 
 118     public static Localizable localizableMODEL_IMPORTER_INVALID_VERSION(Object arg0, Object arg1) {
 119         return MESSAGE_FACTORY.getMessage("model.importer.invalidVersion", arg0, arg1);
 120     }
 121 
 122     /**
 123      * invalid version "{1}" in model document (line {0})
 124      *
 125      */
 126     public static String MODEL_IMPORTER_INVALID_VERSION(Object arg0, Object arg1) {
 127         return LOCALIZER.localize(localizableMODEL_IMPORTER_INVALID_VERSION(arg0, arg1));
 128     }
 129 
 130     public static Localizable localizableMODEL_EXPORTER_UNSUPPORTED_CLASS(Object arg0) {
 131         return MESSAGE_FACTORY.getMessage("model.exporter.unsupportedClass", arg0);
 132     }
 133 
 134     /**
 135      * model exporter: unsupported class: {0}
 136      *
 137      */
 138     public static String MODEL_EXPORTER_UNSUPPORTED_CLASS(Object arg0) {
 139         return LOCALIZER.localize(localizableMODEL_EXPORTER_UNSUPPORTED_CLASS(arg0));
 140     }
 141 
 142     public static Localizable localizableMODEL_NESTED_MODEL_ERROR(Object arg0) {
 143         return MESSAGE_FACTORY.getMessage("model.nestedModelError", arg0);
 144     }
 145 
 146     /**
 147      * model error: {0}
 148      *
 149      */
 150     public static String MODEL_NESTED_MODEL_ERROR(Object arg0) {
 151         return LOCALIZER.localize(localizableMODEL_NESTED_MODEL_ERROR(arg0));
 152     }
 153 
 154     public static Localizable localizableMODEL_EXCEPTION_NOTUNIQUE(Object arg0, Object arg1) {
 155         return MESSAGE_FACTORY.getMessage("model.exception.notunique", arg0, arg1);
 156     }
 157 
 158     /**
 159      * Failed to generate Java signature: duplicate exception names {0}. Use JAXWS binding customization to rename the wsdl:part "{1}"
 160      *
 161      */
 162     public static String MODEL_EXCEPTION_NOTUNIQUE(Object arg0, Object arg1) {
 163         return LOCALIZER.localize(localizableMODEL_EXCEPTION_NOTUNIQUE(arg0, arg1));
 164     }
 165 
 166     public static Localizable localizableMODEL_ARRAYWRAPPER_ONLY_ONE_MEMBER() {
 167         return MESSAGE_FACTORY.getMessage("model.arraywrapper.only.one.member");
 168     }
 169 
 170     /**
 171      * LiteralArrayWrapper may only have one element member.
 172      *
 173      */
 174     public static String MODEL_ARRAYWRAPPER_ONLY_ONE_MEMBER() {
 175         return LOCALIZER.localize(localizableMODEL_ARRAYWRAPPER_ONLY_ONE_MEMBER());
 176     }
 177 
 178     public static Localizable localizableMODEL_SAXPARSER_EXCEPTION(Object arg0, Object arg1) {
 179         return MESSAGE_FACTORY.getMessage("model.saxparser.exception", arg0, arg1);
 180     }
 181 
 182     /**
 183      * {0}
 184      * {1}
 185      *
 186      */
 187     public static String MODEL_SAXPARSER_EXCEPTION(Object arg0, Object arg1) {
 188         return LOCALIZER.localize(localizableMODEL_SAXPARSER_EXCEPTION(arg0, arg1));
 189     }
 190 
 191     public static Localizable localizableMODEL_IMPORTER_INVALID_ID(Object arg0, Object arg1) {
 192         return MESSAGE_FACTORY.getMessage("model.importer.invalidId", arg0, arg1);
 193     }
 194 
 195     /**
 196      * invalid id "{1} in model document (line {0})
 197      *
 198      */
 199     public static String MODEL_IMPORTER_INVALID_ID(Object arg0, Object arg1) {
 200         return LOCALIZER.localize(localizableMODEL_IMPORTER_INVALID_ID(arg0, arg1));
 201     }
 202 
 203     public static Localizable localizableMODEL_PARAMETER_NOTUNIQUE_WRAPPER(Object arg0, Object arg1) {
 204         return MESSAGE_FACTORY.getMessage("model.parameter.notunique.wrapper", arg0, arg1);
 205     }
 206 
 207     /**
 208      * Failed to generate Java signature: duplicate parameter name "{0}". Try one of these
 209      *  1. Use JAXWS binding customization to rename the wsdl:part "{1}"
 210      *  2. Run wsimport with -extension switch.
 211      *  3. This is wrapper style operation, to resolve parameter name conflict, you can also try disabling wrapper style by using <jaxws:enableWrapperStyle>false</jaxws:enableWrapperStyle> wsdl customization.
 212      *
 213      */
 214     public static String MODEL_PARAMETER_NOTUNIQUE_WRAPPER(Object arg0, Object arg1) {
 215         return LOCALIZER.localize(localizableMODEL_PARAMETER_NOTUNIQUE_WRAPPER(arg0, arg1));
 216     }
 217 
 218     public static Localizable localizableMODEL_SCHEMA_ELEMENT_NOT_FOUND(Object arg0) {
 219         return MESSAGE_FACTORY.getMessage("model.schema.elementNotFound", arg0);
 220     }
 221 
 222     /**
 223      * Element "{0}" not found.

 224      *
 225      */
 226     public static String MODEL_SCHEMA_ELEMENT_NOT_FOUND(Object arg0) {
 227         return LOCALIZER.localize(localizableMODEL_SCHEMA_ELEMENT_NOT_FOUND(arg0));
 228     }
 229 
 230     public static Localizable localizableMODEL_SCHEMA_UNION_NOT_SUPPORTED(Object arg0) {
 231         return MESSAGE_FACTORY.getMessage("model.schema.unionNotSupported", arg0);
 232     }
 233 
 234     /**
 235      * simpleType: "{0}" derivation by xsd:union not supported
 236      *
 237      */
 238     public static String MODEL_SCHEMA_UNION_NOT_SUPPORTED(Object arg0) {
 239         return LOCALIZER.localize(localizableMODEL_SCHEMA_UNION_NOT_SUPPORTED(arg0));
 240     }
 241 
 242     public static Localizable localizableCONSOLE_ERROR_REPORTER_UNKNOWN_LOCATION() {
 243         return MESSAGE_FACTORY.getMessage("ConsoleErrorReporter.UnknownLocation");
 244     }
 245 
 246     /**
 247      * unknown location
 248      *
 249      */
 250     public static String CONSOLE_ERROR_REPORTER_UNKNOWN_LOCATION() {
 251         return LOCALIZER.localize(localizableCONSOLE_ERROR_REPORTER_UNKNOWN_LOCATION());
 252     }
 253 
 254     public static Localizable localizableMODEL_SCHEMA_INVALID_LITERAL_IN_ENUMERATION_ANONYMOUS(Object arg0) {
 255         return MESSAGE_FACTORY.getMessage("model.schema.invalidLiteralInEnumeration.anonymous", arg0);
 256     }
 257 
 258     /**
 259      * invalid literal "{0}" in anonymous enumeration
 260      *
 261      */
 262     public static String MODEL_SCHEMA_INVALID_LITERAL_IN_ENUMERATION_ANONYMOUS(Object arg0) {
 263         return LOCALIZER.localize(localizableMODEL_SCHEMA_INVALID_LITERAL_IN_ENUMERATION_ANONYMOUS(arg0));
 264     }
 265 
 266     public static Localizable localizableMODEL_ARRAYWRAPPER_NO_CONTENT_MEMBER() {
 267         return MESSAGE_FACTORY.getMessage("model.arraywrapper.no.content.member");
 268     }
 269 
 270     /**
 271      * LiteralArrayWrapper cannot have a content member
 272      *
 273      */
 274     public static String MODEL_ARRAYWRAPPER_NO_CONTENT_MEMBER() {
 275         return LOCALIZER.localize(localizableMODEL_ARRAYWRAPPER_NO_CONTENT_MEMBER());
 276     }
 277 
 278     public static Localizable localizableMODEL_ARRAYWRAPPER_MEMBER_ALREADY_SET() {
 279         return MESSAGE_FACTORY.getMessage("model.arraywrapper.member.already.set");
 280     }
 281 
 282     /**
 283      * LiteralArrayWrapper element member already set.
 284      *
 285      */
 286     public static String MODEL_ARRAYWRAPPER_MEMBER_ALREADY_SET() {
 287         return LOCALIZER.localize(localizableMODEL_ARRAYWRAPPER_MEMBER_ALREADY_SET());
 288     }
 289 
 290     public static Localizable localizableMODEL_INVALID_MESSAGE_TYPE(Object arg0) {
 291         return MESSAGE_FACTORY.getMessage("model.invalid.message.type", arg0);
 292     }
 293 
 294     /**
 295      * invalid message type: {0}
 296      *
 297      */
 298     public static String MODEL_INVALID_MESSAGE_TYPE(Object arg0) {
 299         return LOCALIZER.localize(localizableMODEL_INVALID_MESSAGE_TYPE(arg0));
 300     }
 301 
 302     public static Localizable localizableMODEL_SCHEMA_CIRCULARITY(Object arg0) {
 303         return MESSAGE_FACTORY.getMessage("model.schema.circularity", arg0);
 304     }
 305 
 306     /**
 307      * circularity detected in schema: "{0}"
 308      *
 309      */
 310     public static String MODEL_SCHEMA_CIRCULARITY(Object arg0) {
 311         return LOCALIZER.localize(localizableMODEL_SCHEMA_CIRCULARITY(arg0));
 312     }
 313 
 314     public static Localizable localizableMODEL_SCHEMA_INVALID_SIMPLE_TYPE_NO_ITEM_LITERAL_TYPE(Object arg0, Object arg1) {
 315         return MESSAGE_FACTORY.getMessage("model.schema.invalidSimpleType.noItemLiteralType", arg0, arg1);
 316     }
 317 
 318     /**
 319      * in simpleType: "{0}", xsd:list itemType "{1}" is invalid
 320      *
 321      */
 322     public static String MODEL_SCHEMA_INVALID_SIMPLE_TYPE_NO_ITEM_LITERAL_TYPE(Object arg0, Object arg1) {
 323         return LOCALIZER.localize(localizableMODEL_SCHEMA_INVALID_SIMPLE_TYPE_NO_ITEM_LITERAL_TYPE(arg0, arg1));
 324     }
 325 
 326     public static Localizable localizableMODEL_SCHEMA_LIST_NOT_SUPPORTED(Object arg0) {
 327         return MESSAGE_FACTORY.getMessage("model.schema.listNotSupported", arg0);
 328     }
 329 
 330     /**
 331      * simpleType: "{0}" derivation by xsd:list not supported
 332      *
 333      */
 334     public static String MODEL_SCHEMA_LIST_NOT_SUPPORTED(Object arg0) {
 335         return LOCALIZER.localize(localizableMODEL_SCHEMA_LIST_NOT_SUPPORTED(arg0));
 336     }
 337 
 338     public static Localizable localizable_002F_002F_REPLACEMENT() {
 339         return MESSAGE_FACTORY.getMessage("//replacement");
 340     }
 341 
 342     /**
 343      * for Uxxx codes
 344      *
 345      */
 346     public static String _002F_002F_REPLACEMENT() {
 347         return LOCALIZER.localize(localizable_002F_002F_REPLACEMENT());
 348     }
 349 
 350     public static Localizable localizableMODEL_PART_NOT_UNIQUE(Object arg0, Object arg1) {
 351         return MESSAGE_FACTORY.getMessage("model.part.notUnique", arg0, arg1);
 352     }
 353 
 354     /**
 355      * parts in wsdl:message "{0}", reference "{1}", they must reference unique global elements.
 356      *
 357      */
 358     public static String MODEL_PART_NOT_UNIQUE(Object arg0, Object arg1) {
 359         return LOCALIZER.localize(localizableMODEL_PART_NOT_UNIQUE(arg0, arg1));
 360     }
 361 
 362     public static Localizable localizableMODEL_ARRAYWRAPPER_NO_PARENT() {
 363         return MESSAGE_FACTORY.getMessage("model.arraywrapper.no.parent");
 364     }
 365 
 366     /**
 367      * LiteralArrayWrapper cannot have a parent type


 368      *
 369      */
 370     public static String MODEL_ARRAYWRAPPER_NO_PARENT() {
 371         return LOCALIZER.localize(localizableMODEL_ARRAYWRAPPER_NO_PARENT());
 372     }
 373 
 374     public static Localizable localizableMODEL_COMPLEX_TYPE_SIMPLE_CONTENT_RESERVED_NAME(Object arg0) {
 375         return MESSAGE_FACTORY.getMessage("model.complexType.simpleContent.reservedName", arg0);
 376     }
 377 
 378     /**
 379      * invalid attribute name: "_value" in complexType: "{0}", _value is JAXWS reserved name, this name is generated in the generated javabean class to hold content value in the generated javabean class for complexType/simpleContent.
 380      *
 381      */
 382     public static String MODEL_COMPLEX_TYPE_SIMPLE_CONTENT_RESERVED_NAME(Object arg0) {
 383         return LOCALIZER.localize(localizableMODEL_COMPLEX_TYPE_SIMPLE_CONTENT_RESERVED_NAME(arg0));
 384     }
 385 
 386     public static Localizable localizableMODEL_SCHEMA_SIMPLE_TYPE_WITH_FACETS(Object arg0) {
 387         return MESSAGE_FACTORY.getMessage("model.schema.simpleTypeWithFacets", arg0);
 388     }
 389 
 390     /**
 391      * facet "{0}" not supported on simple type: "{0}"
 392      *
 393      */
 394     public static String MODEL_SCHEMA_SIMPLE_TYPE_WITH_FACETS(Object arg0) {
 395         return LOCALIZER.localize(localizableMODEL_SCHEMA_SIMPLE_TYPE_WITH_FACETS(arg0));
 396     }
 397 
 398     public static Localizable localizableMODEL_SCHEMA_NOT_IMPLEMENTED(Object arg0) {
 399         return MESSAGE_FACTORY.getMessage("model.schema.notImplemented", arg0);
 400     }
 401 
 402     /**
 403      * unsupported XML Schema feature ({0})
 404      *
 405      */
 406     public static String MODEL_SCHEMA_NOT_IMPLEMENTED(Object arg0) {
 407         return LOCALIZER.localize(localizableMODEL_SCHEMA_NOT_IMPLEMENTED(arg0));
 408     }
 409 
 410     public static Localizable localizableMODEL_SCHEMA_JAXB_EXCEPTION_MESSAGE(Object arg0) {
 411         return MESSAGE_FACTORY.getMessage("model.schema.jaxbException.message", arg0);
 412     }
 413 
 414     /**
 415      * "{0}"
 416      *
 417      */
 418     public static String MODEL_SCHEMA_JAXB_EXCEPTION_MESSAGE(Object arg0) {
 419         return LOCALIZER.localize(localizableMODEL_SCHEMA_JAXB_EXCEPTION_MESSAGE(arg0));
 420     }
 421 
 422     public static Localizable localizableMODEL_UNIQUENESS() {
 423         return MESSAGE_FACTORY.getMessage("model.uniqueness");
 424     }
 425 
 426     /**
 427      * uniqueness constraint violation
 428      *
 429      */
 430     public static String MODEL_UNIQUENESS() {
 431         return LOCALIZER.localize(localizableMODEL_UNIQUENESS());
 432     }
 433 
 434     public static Localizable localizableMODEL_SCHEMA_INVALID_WILDCARD_ALL_COMPOSITOR(Object arg0) {
 435         return MESSAGE_FACTORY.getMessage("model.schema.invalidWildcard.allCompositor", arg0);
 436     }
 437 
 438     /**
 439      * xsd:all compositor not supported for the wildcard in schema type: "{0}"



 440      *
 441      */
 442     public static String MODEL_SCHEMA_INVALID_WILDCARD_ALL_COMPOSITOR(Object arg0) {
 443         return LOCALIZER.localize(localizableMODEL_SCHEMA_INVALID_WILDCARD_ALL_COMPOSITOR(arg0));
 444     }
 445 
 446     public static Localizable localizableCONSOLE_ERROR_REPORTER_LINE_X_OF_Y(Object arg0, Object arg1) {
 447         return MESSAGE_FACTORY.getMessage("ConsoleErrorReporter.LineXOfY", arg0, arg1);
 448     }
 449 
 450     /**
 451      *   line {0} of {1}
 452      *
 453      */
 454     public static String CONSOLE_ERROR_REPORTER_LINE_X_OF_Y(Object arg0, Object arg1) {
 455         return LOCALIZER.localize(localizableCONSOLE_ERROR_REPORTER_LINE_X_OF_Y(arg0, arg1));
 456     }
 457 
 458     public static Localizable localizableMODEL_PARENT_TYPE_ALREADY_SET(Object arg0, Object arg1, Object arg2) {
 459         return MESSAGE_FACTORY.getMessage("model.parent.type.already.set", arg0, arg1, arg2);
 460     }
 461 
 462     /**
 463      * parent of type "{0}" already set to "{1}", new value = "{2}"
 464      *
 465      */
 466     public static String MODEL_PARENT_TYPE_ALREADY_SET(Object arg0, Object arg1, Object arg2) {
 467         return LOCALIZER.localize(localizableMODEL_PARENT_TYPE_ALREADY_SET(arg0, arg1, arg2));
 468     }
 469 
 470     public static Localizable localizableMODEL_PARAMETER_NOTUNIQUE(Object arg0, Object arg1) {
 471         return MESSAGE_FACTORY.getMessage("model.parameter.notunique", arg0, arg1);
 472     }
 473 
 474     /**
 475      * Failed to generate Java signature: duplicate parameter name "{0}". Try one of these
 476      *  1. Use JAXWS binding customization to rename the wsdl:part "{1}"
 477      *  2. Run wsimport with -extension switch.
 478      *
 479      */
 480     public static String MODEL_PARAMETER_NOTUNIQUE(Object arg0, Object arg1) {
 481         return LOCALIZER.localize(localizableMODEL_PARAMETER_NOTUNIQUE(arg0, arg1));
 482     }
 483 
 484     private static class BundleSupplier
 485         implements ResourceBundleSupplier
 486     {
 487 
 488 
 489         public ResourceBundle getResourceBundle(Locale locale) {
 490             return ResourceBundle.getBundle(BUNDLE_NAME, locale);
 491         }
 492 






 493     }
 494 
 495 }
--- EOF ---