1 /*
   2  * Copyright (c) 1997, 2016, 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 com.sun.istack.internal.localization.Localizable;
  29 import com.sun.istack.internal.localization.LocalizableMessageFactory;

  30 import com.sun.istack.internal.localization.Localizer;
  31 
  32 import java.util.Locale;
  33 import java.util.ResourceBundle;
  34 
  35 
  36 /**
  37  * Defines string formatting method for each constant in the resource file
  38  *
  39  */
  40 public final class ModelMessages {

  41     private final static String BUNDLE_NAME = "com.sun.tools.internal.ws.resources.model";
  42     private final static LocalizableMessageFactory messageFactory =
  43         new LocalizableMessageFactory(BUNDLE_NAME, ModelMessages::getResourceBundle);
  44     private final static Localizer localizer = new Localizer();
  45 
  46     private static ResourceBundle getResourceBundle(Locale locale) {
  47         return ResourceBundle.getBundle(BUNDLE_NAME, locale);
  48     }
  49 
  50     public static Localizable localizableMODEL_NESTED_MODEL_ERROR(Object arg0) {
  51         return messageFactory.getMessage("model.nestedModelError", arg0);








  52     }
  53 
  54     /**
  55      * model error: {0}
  56      *
  57      */
  58     public static String MODEL_NESTED_MODEL_ERROR(Object arg0) {
  59         return localizer.localize(localizableMODEL_NESTED_MODEL_ERROR(arg0));
  60     }
  61 
  62     public static Localizable localizableMODEL_EXCEPTION_NOTUNIQUE(Object arg0, Object arg1) {
  63         return messageFactory.getMessage("model.exception.notunique", arg0, arg1);
  64     }
  65 
  66     /**
  67      * Failed to generate Java signature: duplicate exception names {0}. Use JAXWS binding customization to rename the wsdl:part "{1}"
  68      *
  69      */
  70     public static String MODEL_EXCEPTION_NOTUNIQUE(Object arg0, Object arg1) {
  71         return localizer.localize(localizableMODEL_EXCEPTION_NOTUNIQUE(arg0, arg1));
  72     }
  73 
  74     public static Localizable localizableMODEL_SCHEMA_INVALID_WILDCARD_ALL_COMPOSITOR(Object arg0) {
  75         return messageFactory.getMessage("model.schema.invalidWildcard.allCompositor", arg0);
  76     }
  77 
  78     /**
  79      * xsd:all compositor not supported for the wildcard in schema type: "{0}"
  80      *
  81      */
  82     public static String MODEL_SCHEMA_INVALID_WILDCARD_ALL_COMPOSITOR(Object arg0) {
  83         return localizer.localize(localizableMODEL_SCHEMA_INVALID_WILDCARD_ALL_COMPOSITOR(arg0));
  84     }
  85 
  86     public static Localizable localizableMODEL_SCHEMA_SIMPLE_TYPE_WITH_FACETS(Object arg0) {
  87         return messageFactory.getMessage("model.schema.simpleTypeWithFacets", arg0);
  88     }
  89 
  90     /**
  91      * facet "{0}" not supported on simple type: "{0}"
  92      *
  93      */
  94     public static String MODEL_SCHEMA_SIMPLE_TYPE_WITH_FACETS(Object arg0) {
  95         return localizer.localize(localizableMODEL_SCHEMA_SIMPLE_TYPE_WITH_FACETS(arg0));
  96     }
  97 
  98     public static Localizable localizableMODEL_SCHEMA_UNION_NOT_SUPPORTED(Object arg0) {
  99         return messageFactory.getMessage("model.schema.unionNotSupported", arg0);
 100     }
 101 
 102     /**
 103      * simpleType: "{0}" derivation by xsd:union not supported
 104      *
 105      */
 106     public static String MODEL_SCHEMA_UNION_NOT_SUPPORTED(Object arg0) {
 107         return localizer.localize(localizableMODEL_SCHEMA_UNION_NOT_SUPPORTED(arg0));
 108     }
 109 
 110     public static Localizable localizableMODEL_COMPLEX_TYPE_SIMPLE_CONTENT_RESERVED_NAME(Object arg0) {
 111         return messageFactory.getMessage("model.complexType.simpleContent.reservedName", arg0);
 112     }
 113 
 114     /**
 115      * 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.
 116      *
 117      */
 118     public static String MODEL_COMPLEX_TYPE_SIMPLE_CONTENT_RESERVED_NAME(Object arg0) {
 119         return localizer.localize(localizableMODEL_COMPLEX_TYPE_SIMPLE_CONTENT_RESERVED_NAME(arg0));
 120     }
 121 
 122     public static Localizable localizableMODEL_IMPORTER_INVALID_ID(Object arg0, Object arg1) {
 123         return messageFactory.getMessage("model.importer.invalidId", arg0, arg1);
 124     }
 125 
 126     /**
 127      * invalid id "{1} in model document (line {0})
 128      *
 129      */
 130     public static String MODEL_IMPORTER_INVALID_ID(Object arg0, Object arg1) {
 131         return localizer.localize(localizableMODEL_IMPORTER_INVALID_ID(arg0, arg1));
 132     }
 133 
 134     public static Localizable localizableMODEL_SCHEMA_JAXB_EXCEPTION_MESSAGE(Object arg0) {
 135         return messageFactory.getMessage("model.schema.jaxbException.message", arg0);
 136     }
 137 
 138     /**
 139      * "{0}"
 140      *
 141      */
 142     public static String MODEL_SCHEMA_JAXB_EXCEPTION_MESSAGE(Object arg0) {
 143         return localizer.localize(localizableMODEL_SCHEMA_JAXB_EXCEPTION_MESSAGE(arg0));
 144     }
 145 
 146     public static Localizable localizableMODEL_INVALID_MESSAGE_TYPE(Object arg0) {
 147         return messageFactory.getMessage("model.invalid.message.type", arg0);
 148     }
 149 
 150     /**
 151      * invalid message type: {0}
 152      *
 153      */
 154     public static String MODEL_INVALID_MESSAGE_TYPE(Object arg0) {
 155         return localizer.localize(localizableMODEL_INVALID_MESSAGE_TYPE(arg0));
 156     }
 157 
 158     public static Localizable localizableCONSOLE_ERROR_REPORTER_UNKNOWN_LOCATION() {
 159         return messageFactory.getMessage("ConsoleErrorReporter.UnknownLocation");
 160     }
 161 
 162     /**
 163      * unknown location
 164      *
 165      */
 166     public static String CONSOLE_ERROR_REPORTER_UNKNOWN_LOCATION() {
 167         return localizer.localize(localizableCONSOLE_ERROR_REPORTER_UNKNOWN_LOCATION());
 168     }
 169 
 170     public static Localizable localizableMODEL_EXPORTER_UNSUPPORTED_CLASS(Object arg0) {
 171         return messageFactory.getMessage("model.exporter.unsupportedClass", arg0);
 172     }
 173 
 174     /**
 175      * model exporter: unsupported class: {0}

 176      *
 177      */
 178     public static String MODEL_EXPORTER_UNSUPPORTED_CLASS(Object arg0) {
 179         return localizer.localize(localizableMODEL_EXPORTER_UNSUPPORTED_CLASS(arg0));
 180     }
 181 
 182     public static Localizable localizableMODEL_SCHEMA_ELEMENT_NOT_FOUND(Object arg0) {
 183         return messageFactory.getMessage("model.schema.elementNotFound", arg0);
 184     }
 185 
 186     /**
 187      * Element "{0}" not found.
 188      *
 189      */
 190     public static String MODEL_SCHEMA_ELEMENT_NOT_FOUND(Object arg0) {
 191         return localizer.localize(localizableMODEL_SCHEMA_ELEMENT_NOT_FOUND(arg0));
 192     }
 193 
 194     public static Localizable localizableMODEL_UNIQUENESS_JAVASTRUCTURETYPE(Object arg0, Object arg1) {
 195         return messageFactory.getMessage("model.uniqueness.javastructuretype", arg0, arg1);
 196     }
 197 
 198     /**
 199      * uniqueness constraint violation, duplicate member "{0}" added to JavaStructureType "{1}"



 200      *
 201      */
 202     public static String MODEL_UNIQUENESS_JAVASTRUCTURETYPE(Object arg0, Object arg1) {
 203         return localizer.localize(localizableMODEL_UNIQUENESS_JAVASTRUCTURETYPE(arg0, arg1));
 204     }
 205 
 206     public static Localizable localizableMODEL_SAXPARSER_EXCEPTION(Object arg0, Object arg1) {
 207         return messageFactory.getMessage("model.saxparser.exception", arg0, arg1);
 208     }
 209 
 210     /**
 211      * {0}
 212      * {1}
 213      *
 214      */
 215     public static String MODEL_SAXPARSER_EXCEPTION(Object arg0, Object arg1) {
 216         return localizer.localize(localizableMODEL_SAXPARSER_EXCEPTION(arg0, arg1));
 217     }
 218 
 219     public static Localizable localizableMODEL_SCHEMA_UNSUPPORTED_TYPE(Object arg0, Object arg1, Object arg2) {
 220         return messageFactory.getMessage("model.schema.unsupportedType", arg0, arg1, arg2);
 221     }
 222 
 223     /**
 224      * unsupported type ({0}): "{1}" (namespace: {2})
 225      *
 226      */
 227     public static String MODEL_SCHEMA_UNSUPPORTED_TYPE(Object arg0, Object arg1, Object arg2) {
 228         return localizer.localize(localizableMODEL_SCHEMA_UNSUPPORTED_TYPE(arg0, arg1, arg2));
 229     }
 230 
 231     public static Localizable localizableMODEL_SCHEMA_LIST_NOT_SUPPORTED(Object arg0) {
 232         return messageFactory.getMessage("model.schema.listNotSupported", arg0);
 233     }
 234 
 235     /**
 236      * simpleType: "{0}" derivation by xsd:list not supported
 237      *
 238      */
 239     public static String MODEL_SCHEMA_LIST_NOT_SUPPORTED(Object arg0) {
 240         return localizer.localize(localizableMODEL_SCHEMA_LIST_NOT_SUPPORTED(arg0));
 241     }
 242 
 243     public static Localizable localizableMODEL_ARRAYWRAPPER_NO_PARENT() {
 244         return messageFactory.getMessage("model.arraywrapper.no.parent");
 245     }
 246 
 247     /**
 248      * LiteralArrayWrapper cannot have a parent type
 249      *
 250      */
 251     public static String MODEL_ARRAYWRAPPER_NO_PARENT() {
 252         return localizer.localize(localizableMODEL_ARRAYWRAPPER_NO_PARENT());
 253     }
 254 
 255     public static Localizable localizableMODEL_PARENT_TYPE_ALREADY_SET(Object arg0, Object arg1, Object arg2) {
 256         return messageFactory.getMessage("model.parent.type.already.set", arg0, arg1, arg2);
 257     }
 258 
 259     /**
 260      * parent of type "{0}" already set to "{1}", new value = "{2}"
 261      *
 262      */
 263     public static String MODEL_PARENT_TYPE_ALREADY_SET(Object arg0, Object arg1, Object arg2) {
 264         return localizer.localize(localizableMODEL_PARENT_TYPE_ALREADY_SET(arg0, arg1, arg2));
 265     }
 266 
 267     public static Localizable localizableMODEL_ARRAYWRAPPER_NO_SUBTYPES() {
 268         return messageFactory.getMessage("model.arraywrapper.no.subtypes");
 269     }
 270 
 271     /**
 272      * LiteralArrayWrapper cannot have subtypes
 273      *
 274      */
 275     public static String MODEL_ARRAYWRAPPER_NO_SUBTYPES() {
 276         return localizer.localize(localizableMODEL_ARRAYWRAPPER_NO_SUBTYPES());
 277     }
 278 
 279     public static Localizable localizableMODEL_IMPORTER_INVALID_MINOR_MINOR_OR_PATCH_VERSION(Object arg0, Object arg1, Object arg2) {
 280         return messageFactory.getMessage("model.importer.invalidMinorMinorOrPatchVersion", arg0, arg1, arg2);
 281     }
 282 
 283     /**
 284      * model version "{1}" newer than runtime version "{2}" (line {0}): need to upgrade to a newer runtime
 285      *
 286      */
 287     public static String MODEL_IMPORTER_INVALID_MINOR_MINOR_OR_PATCH_VERSION(Object arg0, Object arg1, Object arg2) {
 288         return localizer.localize(localizableMODEL_IMPORTER_INVALID_MINOR_MINOR_OR_PATCH_VERSION(arg0, arg1, arg2));
 289     }
 290 
 291     public static Localizable localizableMODEL_SCHEMA_CIRCULARITY(Object arg0) {
 292         return messageFactory.getMessage("model.schema.circularity", arg0);
 293     }
 294 
 295     /**
 296      * circularity detected in schema: "{0}"
 297      *
 298      */
 299     public static String MODEL_SCHEMA_CIRCULARITY(Object arg0) {
 300         return localizer.localize(localizableMODEL_SCHEMA_CIRCULARITY(arg0));
 301     }
 302 
 303     public static Localizable localizableMODEL_ARRAYWRAPPER_MEMBER_ALREADY_SET() {
 304         return messageFactory.getMessage("model.arraywrapper.member.already.set");
 305     }
 306 
 307     /**
 308      * LiteralArrayWrapper element member already set.
 309      *
 310      */
 311     public static String MODEL_ARRAYWRAPPER_MEMBER_ALREADY_SET() {
 312         return localizer.localize(localizableMODEL_ARRAYWRAPPER_MEMBER_ALREADY_SET());
 313     }
 314 
 315     public static Localizable localizableMODEL_IMPORTER_INVALID_CLASS(Object arg0, Object arg1) {
 316         return messageFactory.getMessage("model.importer.invalidClass", arg0, arg1);
 317     }
 318 
 319     /**
 320      * invalid class name "{1}" in model document (line {0})
 321      *
 322      */
 323     public static String MODEL_IMPORTER_INVALID_CLASS(Object arg0, Object arg1) {
 324         return localizer.localize(localizableMODEL_IMPORTER_INVALID_CLASS(arg0, arg1));
 325     }
 326 
 327     public static Localizable localizableMODEL_IMPORTER_INVALID_VERSION(Object arg0, Object arg1) {
 328         return messageFactory.getMessage("model.importer.invalidVersion", arg0, arg1);
 329     }
 330 
 331     /**
 332      * invalid version "{1}" in model document (line {0})
 333      *
 334      */
 335     public static String MODEL_IMPORTER_INVALID_VERSION(Object arg0, Object arg1) {
 336         return localizer.localize(localizableMODEL_IMPORTER_INVALID_VERSION(arg0, arg1));
 337     }
 338 
 339     public static Localizable localizableCONSOLE_ERROR_REPORTER_LINE_X_OF_Y(Object arg0, Object arg1) {
 340         return messageFactory.getMessage("ConsoleErrorReporter.LineXOfY", arg0, arg1);
 341     }
 342 
 343     /**
 344      *   line {0} of {1}
 345      *
 346      */
 347     public static String CONSOLE_ERROR_REPORTER_LINE_X_OF_Y(Object arg0, Object arg1) {
 348         return localizer.localize(localizableCONSOLE_ERROR_REPORTER_LINE_X_OF_Y(arg0, arg1));
 349     }
 350 
 351     public static Localizable localizableMODEL_PARAMETER_NOTUNIQUE(Object arg0, Object arg1) {
 352         return messageFactory.getMessage("model.parameter.notunique", arg0, arg1);
 353     }
 354 
 355     /**
 356      * Failed to generate Java signature: duplicate parameter name "{0}". Try one of these
 357      *  1. Use JAXWS binding customization to rename the wsdl:part "{1}"
 358      *  2. Run wsimport with -extension switch.
 359      *
 360      */
 361     public static String MODEL_PARAMETER_NOTUNIQUE(Object arg0, Object arg1) {
 362         return localizer.localize(localizableMODEL_PARAMETER_NOTUNIQUE(arg0, arg1));
 363     }
 364 
 365     public static Localizable localizableMODEL_SCHEMA_INVALID_SIMPLE_TYPE_INVALID_ITEM_TYPE(Object arg0, Object arg1) {
 366         return messageFactory.getMessage("model.schema.invalidSimpleType.invalidItemType", arg0, arg1);
 367     }
 368 
 369     /**
 370      * in simpleType: "{0}", itemType "{1}" can not be derived by list
 371      *
 372      */
 373     public static String MODEL_SCHEMA_INVALID_SIMPLE_TYPE_INVALID_ITEM_TYPE(Object arg0, Object arg1) {
 374         return localizer.localize(localizableMODEL_SCHEMA_INVALID_SIMPLE_TYPE_INVALID_ITEM_TYPE(arg0, arg1));
 375     }
 376 
 377     public static Localizable localizableMODEL_UNIQUENESS() {
 378         return messageFactory.getMessage("model.uniqueness");
 379     }
 380 
 381     /**
 382      * uniqueness constraint violation
 383      *
 384      */
 385     public static String MODEL_UNIQUENESS() {
 386         return localizer.localize(localizableMODEL_UNIQUENESS());
 387     }
 388 
 389     public static Localizable localizable_002F_002F_REPLACEMENT() {
 390         return messageFactory.getMessage("//replacement");
 391     }
 392 
 393     /**
 394      * for Uxxx codes
 395      *
 396      */
 397     public static String _002F_002F_REPLACEMENT() {
 398         return localizer.localize(localizable_002F_002F_REPLACEMENT());
 399     }
 400 
 401     public static Localizable localizableMODEL_SCHEMA_INVALID_SIMPLE_TYPE_NO_ITEM_LITERAL_TYPE(Object arg0, Object arg1) {
 402         return messageFactory.getMessage("model.schema.invalidSimpleType.noItemLiteralType", arg0, arg1);
 403     }
 404 
 405     /**
 406      * in simpleType: "{0}", xsd:list itemType "{1}" is invalid
 407      *
 408      */
 409     public static String MODEL_SCHEMA_INVALID_SIMPLE_TYPE_NO_ITEM_LITERAL_TYPE(Object arg0, Object arg1) {
 410         return localizer.localize(localizableMODEL_SCHEMA_INVALID_SIMPLE_TYPE_NO_ITEM_LITERAL_TYPE(arg0, arg1));
 411     }
 412 
 413     public static Localizable localizableMODEL_ARRAYWRAPPER_ONLY_ONE_MEMBER() {
 414         return messageFactory.getMessage("model.arraywrapper.only.one.member");
 415     }
 416 
 417     /**
 418      * LiteralArrayWrapper may only have one element member.
 419      *
 420      */
 421     public static String MODEL_ARRAYWRAPPER_ONLY_ONE_MEMBER() {
 422         return localizer.localize(localizableMODEL_ARRAYWRAPPER_ONLY_ONE_MEMBER());
 423     }
 424 
 425     public static Localizable localizableMODEL_PARAMETER_NOTUNIQUE_WRAPPER(Object arg0, Object arg1) {
 426         return messageFactory.getMessage("model.parameter.notunique.wrapper", arg0, arg1);
 427     }
 428 
 429     /**
 430      * Failed to generate Java signature: duplicate parameter name "{0}". Try one of these
 431      *  1. Use JAXWS binding customization to rename the wsdl:part "{1}"
 432      *  2. Run wsimport with -extension switch.
 433      *  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.
 434      *
 435      */
 436     public static String MODEL_PARAMETER_NOTUNIQUE_WRAPPER(Object arg0, Object arg1) {
 437         return localizer.localize(localizableMODEL_PARAMETER_NOTUNIQUE_WRAPPER(arg0, arg1));
 438     }
 439 
 440     public static Localizable localizableMODEL_SCHEMA_NOT_IMPLEMENTED(Object arg0) {
 441         return messageFactory.getMessage("model.schema.notImplemented", arg0);
 442     }
 443 
 444     /**
 445      * unsupported XML Schema feature ({0})
 446      *
 447      */
 448     public static String MODEL_SCHEMA_NOT_IMPLEMENTED(Object arg0) {
 449         return localizer.localize(localizableMODEL_SCHEMA_NOT_IMPLEMENTED(arg0));
 450     }
 451 
 452     public static Localizable localizableMODEL_SCHEMA_INVALID_LITERAL_IN_ENUMERATION_ANONYMOUS(Object arg0) {
 453         return messageFactory.getMessage("model.schema.invalidLiteralInEnumeration.anonymous", arg0);
 454     }
 455 
 456     /**
 457      * invalid literal "{0}" in anonymous enumeration
 458      *
 459      */
 460     public static String MODEL_SCHEMA_INVALID_LITERAL_IN_ENUMERATION_ANONYMOUS(Object arg0) {
 461         return localizer.localize(localizableMODEL_SCHEMA_INVALID_LITERAL_IN_ENUMERATION_ANONYMOUS(arg0));
 462     }
 463 
 464     public static Localizable localizableMODEL_PART_NOT_UNIQUE(Object arg0, Object arg1) {
 465         return messageFactory.getMessage("model.part.notUnique", arg0, arg1);
 466     }
 467 
 468     /**
 469      * parts in wsdl:message "{0}", reference "{1}", they must reference unique global elements.


 470      *
 471      */
 472     public static String MODEL_PART_NOT_UNIQUE(Object arg0, Object arg1) {
 473         return localizer.localize(localizableMODEL_PART_NOT_UNIQUE(arg0, arg1));
 474     }
 475 
 476     public static Localizable localizableMODEL_ARRAYWRAPPER_NO_CONTENT_MEMBER() {
 477         return messageFactory.getMessage("model.arraywrapper.no.content.member");





 478     }
 479 
 480     /**
 481      * LiteralArrayWrapper cannot have a content member
 482      *
 483      */
 484     public static String MODEL_ARRAYWRAPPER_NO_CONTENT_MEMBER() {
 485         return localizer.localize(localizableMODEL_ARRAYWRAPPER_NO_CONTENT_MEMBER());
 486     }
 487 
 488 }
--- EOF ---