This commit is contained in:
Lana Steuck 2016-06-02 21:15:03 +00:00
commit 58ebc7f831
41 changed files with 459 additions and 108 deletions

View File

@ -3,7 +3,7 @@ The GNU General Public License (GPL)
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies of this license
document, but changing it is not allowed.
@ -287,8 +287,8 @@ pointer to where the full notice is found.
more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -25,6 +25,9 @@
package com.sun.istack.internal.localization;
import java.util.Locale;
import java.util.ResourceBundle;
/**
* Localizable message.
*
@ -51,6 +54,9 @@ public interface Localizable {
public Object[] getArguments();
public String getResourceBundleName();
public default ResourceBundle getResourceBundle(Locale locale) {
return null;
}
/**
* Special constant that represents a message that

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -25,7 +25,11 @@
package com.sun.istack.internal.localization;
import com.sun.istack.internal.localization.LocalizableMessageFactory.ResourceBundleSupplier;
import java.util.Arrays;
import java.util.Locale;
import java.util.ResourceBundle;
/**
* @author WS Development Team
@ -33,17 +37,31 @@ import java.util.Arrays;
public final class LocalizableMessage implements Localizable {
private final String _bundlename;
private final ResourceBundleSupplier _rbSupplier;
private final String _key;
private final Object[] _args;
public LocalizableMessage(String bundlename, String key, Object... args) {
_bundlename = bundlename;
_rbSupplier = null;
_key = key;
if(args==null)
args = new Object[0];
_args = args;
}
public LocalizableMessage(String bundlename, ResourceBundleSupplier rbSupplier,
String key, Object... args) {
_bundlename = bundlename;
_rbSupplier = rbSupplier;
_key = key;
if(args==null)
args = new Object[0];
_args = args;
}
public String getKey() {
return _key;
}
@ -55,4 +73,12 @@ public final class LocalizableMessage implements Localizable {
public String getResourceBundleName() {
return _bundlename;
}
@Override
public ResourceBundle getResourceBundle(Locale locale) {
if (_rbSupplier == null)
return null;
return _rbSupplier.getResourceBundle(locale);
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -25,19 +25,37 @@
package com.sun.istack.internal.localization;
import java.util.Locale;
import java.util.ResourceBundle;
/**
* @author WS Development Team
*/
public class LocalizableMessageFactory {
private final String _bundlename;
private final ResourceBundleSupplier _rbSupplier;
public LocalizableMessageFactory(String bundlename) {
_bundlename = bundlename;
_rbSupplier = null;
}
public LocalizableMessageFactory(String bundlename, ResourceBundleSupplier rbSupplier) {
_bundlename = bundlename;
_rbSupplier = rbSupplier;
}
public Localizable getMessage(String key, Object... args) {
return new LocalizableMessage(_bundlename, key, args);
return new LocalizableMessage(_bundlename, _rbSupplier, key, args);
}
public interface ResourceBundleSupplier {
/**
* Gets the ResourceBundle.
* @param locale the requested bundle's locale
* @return ResourceBundle
*/
ResourceBundle getResourceBundle(Locale locale);
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -25,6 +25,7 @@
package com.sun.istack.internal.localization;
import com.sun.istack.internal.localization.LocalizableMessageFactory.ResourceBundleSupplier;
import java.text.MessageFormat;
import java.util.HashMap;
import java.util.Locale;
@ -61,12 +62,20 @@ public class Localizer {
// this message is not localizable
return (String) l.getArguments()[0];
}
String bundlename = l.getResourceBundleName();
try {
ResourceBundle bundle =
(ResourceBundle) _resourceBundles.get(bundlename);
if (bundle == null) {
bundle = l.getResourceBundle(_locale);
if (bundle != null) {
_resourceBundles.put(bundlename, bundle);
}
}
if (bundle == null) {
try {
bundle = ResourceBundle.getBundle(bundlename, _locale);
@ -151,5 +160,4 @@ public class Localizer {
}
return sb.toString();
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -29,16 +29,24 @@ import com.sun.istack.internal.localization.Localizable;
import com.sun.istack.internal.localization.LocalizableMessageFactory;
import com.sun.istack.internal.localization.Localizer;
import java.util.Locale;
import java.util.ResourceBundle;
/**
* Defines string formatting method for each constant in the resource file
*
*/
public final class LocalizationMessages {
private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.policy.privateutil.Localization");
private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.policy.privateutil.Localization";
private final static LocalizableMessageFactory messageFactory =
new LocalizableMessageFactory(BUNDLE_NAME, LocalizationMessages::getResourceBundle);
private final static Localizer localizer = new Localizer();
private static ResourceBundle getResourceBundle(Locale locale) {
return ResourceBundle.getBundle(BUNDLE_NAME, locale);
}
public static Localizable localizableWSP_0017_UNABLE_TO_ACCESS_POLICY_SOURCE_MODEL_PLUS_REASON(Object arg0, Object arg1) {
return messageFactory.getMessage("WSP_0017_UNABLE_TO_ACCESS_POLICY_SOURCE_MODEL_PLUS_REASON", arg0, arg1);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -29,16 +29,24 @@ import com.sun.istack.internal.localization.Localizable;
import com.sun.istack.internal.localization.LocalizableMessageFactory;
import com.sun.istack.internal.localization.Localizer;
import java.util.Locale;
import java.util.ResourceBundle;
/**
* Defines string formatting method for each constant in the resource file
*
*/
public final class AddressingMessages {
private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.addressing");
private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.addressing";
private final static LocalizableMessageFactory messageFactory =
new LocalizableMessageFactory(BUNDLE_NAME, AddressingMessages::getResourceBundle);
private final static Localizer localizer = new Localizer();
private static ResourceBundle getResourceBundle(Locale locale) {
return ResourceBundle.getBundle(BUNDLE_NAME, locale);
}
public static Localizable localizableNON_ANONYMOUS_RESPONSE_ONEWAY() {
return messageFactory.getMessage("nonAnonymous.response.oneway");
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -29,16 +29,24 @@ import com.sun.istack.internal.localization.Localizable;
import com.sun.istack.internal.localization.LocalizableMessageFactory;
import com.sun.istack.internal.localization.Localizer;
import java.util.Locale;
import java.util.ResourceBundle;
/**
* Defines string formatting method for each constant in the resource file
*
*/
public final class BindingApiMessages {
private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.bindingApi");
private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.bindingApi";
private final static LocalizableMessageFactory messageFactory =
new LocalizableMessageFactory(BUNDLE_NAME, BindingApiMessages::getResourceBundle);
private final static Localizer localizer = new Localizer();
private static ResourceBundle getResourceBundle(Locale locale) {
return ResourceBundle.getBundle(BUNDLE_NAME, locale);
}
public static Localizable localizableBINDING_API_NO_FAULT_MESSAGE_NAME() {
return messageFactory.getMessage("binding.api.no.fault.message.name");
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -29,16 +29,24 @@ import com.sun.istack.internal.localization.Localizable;
import com.sun.istack.internal.localization.LocalizableMessageFactory;
import com.sun.istack.internal.localization.Localizer;
import java.util.Locale;
import java.util.ResourceBundle;
/**
* Defines string formatting method for each constant in the resource file
*
*/
public final class ClientMessages {
private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.client");
private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.client";
private final static LocalizableMessageFactory messageFactory =
new LocalizableMessageFactory(BUNDLE_NAME, ClientMessages::getResourceBundle);
private final static Localizer localizer = new Localizer();
private static ResourceBundle getResourceBundle(Locale locale) {
return ResourceBundle.getBundle(BUNDLE_NAME, locale);
}
public static Localizable localizableFAILED_TO_PARSE(Object arg0, Object arg1) {
return messageFactory.getMessage("failed.to.parse", arg0, arg1);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -29,16 +29,24 @@ import com.sun.istack.internal.localization.Localizable;
import com.sun.istack.internal.localization.LocalizableMessageFactory;
import com.sun.istack.internal.localization.Localizer;
import java.util.Locale;
import java.util.ResourceBundle;
/**
* Defines string formatting method for each constant in the resource file
*
*/
public final class DispatchMessages {
private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.dispatch");
private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.dispatch";
private final static LocalizableMessageFactory messageFactory =
new LocalizableMessageFactory(BUNDLE_NAME, DispatchMessages::getResourceBundle);
private final static Localizer localizer = new Localizer();
private static ResourceBundle getResourceBundle(Locale locale) {
return ResourceBundle.getBundle(BUNDLE_NAME, locale);
}
public static Localizable localizableINVALID_NULLARG_XMLHTTP_REQUEST_METHOD(Object arg0, Object arg1) {
return messageFactory.getMessage("invalid.nullarg.xmlhttp.request.method", arg0, arg1);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -29,16 +29,24 @@ import com.sun.istack.internal.localization.Localizable;
import com.sun.istack.internal.localization.LocalizableMessageFactory;
import com.sun.istack.internal.localization.Localizer;
import java.util.Locale;
import java.util.ResourceBundle;
/**
* Defines string formatting method for each constant in the resource file
*
*/
public final class EncodingMessages {
private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.encoding");
private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.encoding";
private final static LocalizableMessageFactory messageFactory =
new LocalizableMessageFactory(BUNDLE_NAME, EncodingMessages::getResourceBundle);
private final static Localizer localizer = new Localizer();
private static ResourceBundle getResourceBundle(Locale locale) {
return ResourceBundle.getBundle(BUNDLE_NAME, locale);
}
public static Localizable localizableFAILED_TO_READ_RESPONSE(Object arg0) {
return messageFactory.getMessage("failed.to.read.response", arg0);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -29,16 +29,24 @@ import com.sun.istack.internal.localization.Localizable;
import com.sun.istack.internal.localization.LocalizableMessageFactory;
import com.sun.istack.internal.localization.Localizer;
import java.util.Locale;
import java.util.ResourceBundle;
/**
* Defines string formatting method for each constant in the resource file
*
*/
public final class HandlerMessages {
private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.handler");
private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.handler";
private final static LocalizableMessageFactory messageFactory =
new LocalizableMessageFactory(BUNDLE_NAME, HandlerMessages::getResourceBundle);
private final static Localizer localizer = new Localizer();
private static ResourceBundle getResourceBundle(Locale locale) {
return ResourceBundle.getBundle(BUNDLE_NAME, locale);
}
public static Localizable localizableHANDLER_MESSAGE_CONTEXT_INVALID_CLASS(Object arg0, Object arg1) {
return messageFactory.getMessage("handler.messageContext.invalid.class", arg0, arg1);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -29,16 +29,24 @@ import com.sun.istack.internal.localization.Localizable;
import com.sun.istack.internal.localization.LocalizableMessageFactory;
import com.sun.istack.internal.localization.Localizer;
import java.util.Locale;
import java.util.ResourceBundle;
/**
* Defines string formatting method for each constant in the resource file
*
*/
public final class HttpserverMessages {
private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.httpserver");
private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.httpserver";
private final static LocalizableMessageFactory messageFactory =
new LocalizableMessageFactory(BUNDLE_NAME, HttpserverMessages::getResourceBundle);
private final static Localizer localizer = new Localizer();
private static ResourceBundle getResourceBundle(Locale locale) {
return ResourceBundle.getBundle(BUNDLE_NAME, locale);
}
public static Localizable localizableUNEXPECTED_HTTP_METHOD(Object arg0) {
return messageFactory.getMessage("unexpected.http.method", arg0);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -29,16 +29,24 @@ import com.sun.istack.internal.localization.Localizable;
import com.sun.istack.internal.localization.LocalizableMessageFactory;
import com.sun.istack.internal.localization.Localizer;
import java.util.Locale;
import java.util.ResourceBundle;
/**
* Defines string formatting method for each constant in the resource file
*
*/
public final class ManagementMessages {
private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.management");
private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.management";
private final static LocalizableMessageFactory messageFactory =
new LocalizableMessageFactory(BUNDLE_NAME, ManagementMessages::getResourceBundle);
private final static Localizer localizer = new Localizer();
private static ResourceBundle getResourceBundle(Locale locale) {
return ResourceBundle.getBundle(BUNDLE_NAME, locale);
}
public static Localizable localizableWSM_1008_EXPECTED_INTEGER_DISPOSE_DELAY_VALUE(Object arg0) {
return messageFactory.getMessage("WSM_1008_EXPECTED_INTEGER_DISPOSE_DELAY_VALUE", arg0);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -29,16 +29,24 @@ import com.sun.istack.internal.localization.Localizable;
import com.sun.istack.internal.localization.LocalizableMessageFactory;
import com.sun.istack.internal.localization.Localizer;
import java.util.Locale;
import java.util.ResourceBundle;
/**
* Defines string formatting method for each constant in the resource file
*
*/
public final class ModelerMessages {
private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.modeler");
private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.modeler";
private final static LocalizableMessageFactory messageFactory =
new LocalizableMessageFactory(BUNDLE_NAME, ModelerMessages::getResourceBundle);
private final static Localizer localizer = new Localizer();
private static ResourceBundle getResourceBundle(Locale locale) {
return ResourceBundle.getBundle(BUNDLE_NAME, locale);
}
public static Localizable localizableNESTED_MODELER_ERROR(Object arg0) {
return messageFactory.getMessage("nestedModelerError", arg0);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -29,16 +29,24 @@ import com.sun.istack.internal.localization.Localizable;
import com.sun.istack.internal.localization.LocalizableMessageFactory;
import com.sun.istack.internal.localization.Localizer;
import java.util.Locale;
import java.util.ResourceBundle;
/**
* Defines string formatting method for each constant in the resource file
*
*/
public final class PolicyMessages {
private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.policy");
private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.policy";
private final static LocalizableMessageFactory messageFactory =
new LocalizableMessageFactory(BUNDLE_NAME, PolicyMessages::getResourceBundle);
private final static Localizer localizer = new Localizer();
private static ResourceBundle getResourceBundle(Locale locale) {
return ResourceBundle.getBundle(BUNDLE_NAME, locale);
}
public static Localizable localizableWSP_1007_POLICY_EXCEPTION_WHILE_FINISHING_PARSING_WSDL() {
return messageFactory.getMessage("WSP_1007_POLICY_EXCEPTION_WHILE_FINISHING_PARSING_WSDL");
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -29,16 +29,24 @@ import com.sun.istack.internal.localization.Localizable;
import com.sun.istack.internal.localization.LocalizableMessageFactory;
import com.sun.istack.internal.localization.Localizer;
import java.util.Locale;
import java.util.ResourceBundle;
/**
* Defines string formatting method for each constant in the resource file
*
*/
public final class ProviderApiMessages {
private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.providerApi");
private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.providerApi";
private final static LocalizableMessageFactory messageFactory =
new LocalizableMessageFactory(BUNDLE_NAME, ProviderApiMessages::getResourceBundle);
private final static Localizer localizer = new Localizer();
private static ResourceBundle getResourceBundle(Locale locale) {
return ResourceBundle.getBundle(BUNDLE_NAME, locale);
}
public static Localizable localizableNULL_ADDRESS_SERVICE_ENDPOINT() {
return messageFactory.getMessage("null.address.service.endpoint");
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -29,16 +29,24 @@ import com.sun.istack.internal.localization.Localizable;
import com.sun.istack.internal.localization.LocalizableMessageFactory;
import com.sun.istack.internal.localization.Localizer;
import java.util.Locale;
import java.util.ResourceBundle;
/**
* Defines string formatting method for each constant in the resource file
*
*/
public final class SenderMessages {
private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.sender");
private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.sender";
private final static LocalizableMessageFactory messageFactory =
new LocalizableMessageFactory(BUNDLE_NAME, SenderMessages::getResourceBundle);
private final static Localizer localizer = new Localizer();
private static ResourceBundle getResourceBundle(Locale locale) {
return ResourceBundle.getBundle(BUNDLE_NAME, locale);
}
public static Localizable localizableSENDER_REQUEST_ILLEGAL_VALUE_FOR_CONTENT_NEGOTIATION(Object arg0) {
return messageFactory.getMessage("sender.request.illegalValueForContentNegotiation", arg0);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -29,16 +29,24 @@ import com.sun.istack.internal.localization.Localizable;
import com.sun.istack.internal.localization.LocalizableMessageFactory;
import com.sun.istack.internal.localization.Localizer;
import java.util.Locale;
import java.util.ResourceBundle;
/**
* Defines string formatting method for each constant in the resource file
*
*/
public final class ServerMessages {
private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.server");
private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.server";
private final static LocalizableMessageFactory messageFactory =
new LocalizableMessageFactory(BUNDLE_NAME, ServerMessages::getResourceBundle);
private final static Localizer localizer = new Localizer();
private static ResourceBundle getResourceBundle(Locale locale) {
return ResourceBundle.getBundle(BUNDLE_NAME, locale);
}
public static Localizable localizableRUNTIME_PARSER_WSDL_INCORRECTSERVICE(Object arg0, Object arg1) {
return messageFactory.getMessage("runtime.parser.wsdl.incorrectservice", arg0, arg1);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -29,16 +29,24 @@ import com.sun.istack.internal.localization.Localizable;
import com.sun.istack.internal.localization.LocalizableMessageFactory;
import com.sun.istack.internal.localization.Localizer;
import java.util.Locale;
import java.util.ResourceBundle;
/**
* Defines string formatting method for each constant in the resource file
*
*/
public final class SoapMessages {
private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.soap");
private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.soap";
private final static LocalizableMessageFactory messageFactory =
new LocalizableMessageFactory(BUNDLE_NAME, SoapMessages::getResourceBundle);
private final static Localizer localizer = new Localizer();
private static ResourceBundle getResourceBundle(Locale locale) {
return ResourceBundle.getBundle(BUNDLE_NAME, locale);
}
public static Localizable localizableSOAP_FAULT_CREATE_ERR(Object arg0) {
return messageFactory.getMessage("soap.fault.create.err", arg0);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -29,16 +29,24 @@ import com.sun.istack.internal.localization.Localizable;
import com.sun.istack.internal.localization.LocalizableMessageFactory;
import com.sun.istack.internal.localization.Localizer;
import java.util.Locale;
import java.util.ResourceBundle;
/**
* Defines string formatting method for each constant in the resource file
*
*/
public final class StreamingMessages {
private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.streaming");
private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.streaming";
private final static LocalizableMessageFactory messageFactory =
new LocalizableMessageFactory(BUNDLE_NAME, StreamingMessages::getResourceBundle);
private final static Localizer localizer = new Localizer();
private static ResourceBundle getResourceBundle(Locale locale) {
return ResourceBundle.getBundle(BUNDLE_NAME, locale);
}
public static Localizable localizableFASTINFOSET_DECODING_NOT_ACCEPTED() {
return messageFactory.getMessage("fastinfoset.decodingNotAccepted");
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -29,16 +29,24 @@ import com.sun.istack.internal.localization.Localizable;
import com.sun.istack.internal.localization.LocalizableMessageFactory;
import com.sun.istack.internal.localization.Localizer;
import java.util.Locale;
import java.util.ResourceBundle;
/**
* Defines string formatting method for each constant in the resource file
*
*/
public final class TubelineassemblyMessages {
private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.tubelineassembly");
private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.tubelineassembly";
private final static LocalizableMessageFactory messageFactory =
new LocalizableMessageFactory(BUNDLE_NAME, TubelineassemblyMessages::getResourceBundle);
private final static Localizer localizer = new Localizer();
private static ResourceBundle getResourceBundle(Locale locale) {
return ResourceBundle.getBundle(BUNDLE_NAME, locale);
}
public static Localizable localizableMASM_0019_MSG_LOGGING_SYSTEM_PROPERTY_ILLEGAL_VALUE(Object arg0, Object arg1) {
return messageFactory.getMessage("MASM0019_MSG_LOGGING_SYSTEM_PROPERTY_ILLEGAL_VALUE", arg0, arg1);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -29,16 +29,24 @@ import com.sun.istack.internal.localization.Localizable;
import com.sun.istack.internal.localization.LocalizableMessageFactory;
import com.sun.istack.internal.localization.Localizer;
import java.util.Locale;
import java.util.ResourceBundle;
/**
* Defines string formatting method for each constant in the resource file
*
*/
public final class UtilMessages {
private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.util");
private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.util";
private final static LocalizableMessageFactory messageFactory =
new LocalizableMessageFactory(BUNDLE_NAME, UtilMessages::getResourceBundle);
private final static Localizer localizer = new Localizer();
private static ResourceBundle getResourceBundle(Locale locale) {
return ResourceBundle.getBundle(BUNDLE_NAME, locale);
}
public static Localizable localizableUTIL_LOCATION(Object arg0, Object arg1) {
return messageFactory.getMessage("util.location", arg0, arg1);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -29,16 +29,24 @@ import com.sun.istack.internal.localization.Localizable;
import com.sun.istack.internal.localization.LocalizableMessageFactory;
import com.sun.istack.internal.localization.Localizer;
import java.util.Locale;
import java.util.ResourceBundle;
/**
* Defines string formatting method for each constant in the resource file
*
*/
public final class WsdlmodelMessages {
private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.wsdlmodel");
private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.wsdlmodel";
private final static LocalizableMessageFactory messageFactory =
new LocalizableMessageFactory(BUNDLE_NAME, WsdlmodelMessages::getResourceBundle);
private final static Localizer localizer = new Localizer();
private static ResourceBundle getResourceBundle(Locale locale) {
return ResourceBundle.getBundle(BUNDLE_NAME, locale);
}
public static Localizable localizableWSDL_PORTADDRESS_EPRADDRESS_NOT_MATCH(Object arg0, Object arg1, Object arg2) {
return messageFactory.getMessage("wsdl.portaddress.epraddress.not.match", arg0, arg1, arg2);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -29,16 +29,24 @@ import com.sun.istack.internal.localization.Localizable;
import com.sun.istack.internal.localization.LocalizableMessageFactory;
import com.sun.istack.internal.localization.Localizer;
import java.util.Locale;
import java.util.ResourceBundle;
/**
* Defines string formatting method for each constant in the resource file
*
*/
public final class WsservletMessages {
private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.wsservlet");
private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.wsservlet";
private final static LocalizableMessageFactory messageFactory =
new LocalizableMessageFactory(BUNDLE_NAME, WsservletMessages::getResourceBundle);
private final static Localizer localizer = new Localizer();
private static ResourceBundle getResourceBundle(Locale locale) {
return ResourceBundle.getBundle(BUNDLE_NAME, locale);
}
public static Localizable localizableERROR_WSDL_PUBLISHER_CANNOT_READ_CONFIGURATION() {
return messageFactory.getMessage("error.wsdlPublisher.cannotReadConfiguration");
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -29,16 +29,24 @@ import com.sun.istack.internal.localization.Localizable;
import com.sun.istack.internal.localization.LocalizableMessageFactory;
import com.sun.istack.internal.localization.Localizer;
import java.util.Locale;
import java.util.ResourceBundle;
/**
* Defines string formatting method for each constant in the resource file
*
*/
public final class XmlmessageMessages {
private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.xmlmessage");
private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.xmlmessage";
private final static LocalizableMessageFactory messageFactory =
new LocalizableMessageFactory(BUNDLE_NAME, XmlmessageMessages::getResourceBundle);
private final static Localizer localizer = new Localizer();
private static ResourceBundle getResourceBundle(Locale locale) {
return ResourceBundle.getBundle(BUNDLE_NAME, locale);
}
public static Localizable localizableXML_NULL_HEADERS() {
return messageFactory.getMessage("xml.null.headers");
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -34,6 +34,8 @@ import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.util.Locale;
import java.util.ResourceBundle;
import javax.xml.ws.WebServiceException;
/**
@ -125,7 +127,8 @@ public abstract class JAXWSExceptionBase
args[i] = in.readObject();
}
}
msg = new LocalizableMessageFactory(resourceBundleName).getMessage(key,args);
msg = new LocalizableMessageFactory(resourceBundleName, this::getResourceBundle)
.getMessage(key,args);
}
private static Throwable findNestedException(Object[] args) {
@ -149,6 +152,16 @@ public abstract class JAXWSExceptionBase
*/
protected abstract String getDefaultResourceBundleName();
/*
* Returns the ResourceBundle in this module.
*
* Subclasses in a different module has to override this method.
*/
@Override
public ResourceBundle getResourceBundle(Locale locale) {
return ResourceBundle.getBundle(getDefaultResourceBundleName(), locale);
}
//
// Localizable delegation
//

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -27,6 +27,9 @@ package com.sun.tools.internal.ws.processor;
import com.sun.xml.internal.ws.util.exception.JAXWSExceptionBase;
import java.util.Locale;
import java.util.ResourceBundle;
/**
* ProcessorException represents an exception that occurred while processing
* a web service.
@ -52,4 +55,9 @@ public class ProcessorException extends JAXWSExceptionBase {
public String getDefaultResourceBundleName() {
return "com.sun.tools.internal.ws.resources.processor";
}
@Override
public ResourceBundle getResourceBundle(Locale locale) {
return ResourceBundle.getBundle(getDefaultResourceBundleName(), locale);
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -29,20 +29,29 @@ import com.sun.istack.internal.localization.Localizable;
import com.sun.istack.internal.localization.LocalizableMessageFactory;
import com.sun.istack.internal.localization.Localizer;
import java.util.Locale;
import java.util.ResourceBundle;
/**
* Defines string formatting method for each constant in the resource file
*
*/
public final class ConfigurationMessages {
private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.tools.internal.ws.resources.configuration");
private final static String BUNDLE_NAME = "com.sun.tools.internal.ws.resources.configuration";
private final static LocalizableMessageFactory messageFactory =
new LocalizableMessageFactory(BUNDLE_NAME, ConfigurationMessages::getResourceBundle);
private final static Localizer localizer = new Localizer();
private static ResourceBundle getResourceBundle(Locale locale) {
return ResourceBundle.getBundle(BUNDLE_NAME, locale);
}
public static Localizable localizableCONFIGURATION_NOT_BINDING_FILE(Object arg0) {
return messageFactory.getMessage("configuration.notBindingFile", arg0);
}
/**
* Ignoring: binding file "{0}". It is not a jaxws or a jaxb binding file.
*

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -29,16 +29,24 @@ import com.sun.istack.internal.localization.Localizable;
import com.sun.istack.internal.localization.LocalizableMessageFactory;
import com.sun.istack.internal.localization.Localizer;
import java.util.Locale;
import java.util.ResourceBundle;
/**
* Defines string formatting method for each constant in the resource file
*
*/
public final class GeneratorMessages {
private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.tools.internal.ws.resources.generator");
private final static String BUNDLE_NAME = "com.sun.tools.internal.ws.resources.generator";
private final static LocalizableMessageFactory messageFactory =
new LocalizableMessageFactory(BUNDLE_NAME, GeneratorMessages::getResourceBundle);
private final static Localizer localizer = new Localizer();
private static ResourceBundle getResourceBundle(Locale locale) {
return ResourceBundle.getBundle(BUNDLE_NAME, locale);
}
public static Localizable localizableGENERATOR_SERVICE_CLASS_ALREADY_EXIST(Object arg0, Object arg1) {
return messageFactory.getMessage("generator.service.classAlreadyExist", arg0, arg1);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -29,16 +29,24 @@ import com.sun.istack.internal.localization.Localizable;
import com.sun.istack.internal.localization.LocalizableMessageFactory;
import com.sun.istack.internal.localization.Localizer;
import java.util.Locale;
import java.util.ResourceBundle;
/**
* Defines string formatting method for each constant in the resource file
*
*/
public final class JavacompilerMessages {
private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.tools.internal.ws.resources.javacompiler");
private final static String BUNDLE_NAME = "com.sun.tools.internal.ws.resources.javacompiler";
private final static LocalizableMessageFactory messageFactory =
new LocalizableMessageFactory(BUNDLE_NAME, JavacompilerMessages::getResourceBundle);
private final static Localizer localizer = new Localizer();
private static ResourceBundle getResourceBundle(Locale locale) {
return ResourceBundle.getBundle(BUNDLE_NAME, locale);
}
public static Localizable localizableNO_JAVACOMPILER_ERROR() {
return messageFactory.getMessage("no.javacompiler.error");
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -29,16 +29,24 @@ import com.sun.istack.internal.localization.Localizable;
import com.sun.istack.internal.localization.LocalizableMessageFactory;
import com.sun.istack.internal.localization.Localizer;
import java.util.Locale;
import java.util.ResourceBundle;
/**
* Defines string formatting method for each constant in the resource file
*
*/
public final class ModelMessages {
private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.tools.internal.ws.resources.model");
private final static String BUNDLE_NAME = "com.sun.tools.internal.ws.resources.model";
private final static LocalizableMessageFactory messageFactory =
new LocalizableMessageFactory(BUNDLE_NAME, ModelMessages::getResourceBundle);
private final static Localizer localizer = new Localizer();
private static ResourceBundle getResourceBundle(Locale locale) {
return ResourceBundle.getBundle(BUNDLE_NAME, locale);
}
public static Localizable localizableMODEL_NESTED_MODEL_ERROR(Object arg0) {
return messageFactory.getMessage("model.nestedModelError", arg0);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -29,16 +29,24 @@ import com.sun.istack.internal.localization.Localizable;
import com.sun.istack.internal.localization.LocalizableMessageFactory;
import com.sun.istack.internal.localization.Localizer;
import java.util.Locale;
import java.util.ResourceBundle;
/**
* Defines string formatting method for each constant in the resource file
*
*/
public final class ModelerMessages {
private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.tools.internal.ws.resources.modeler");
private final static String BUNDLE_NAME = "com.sun.tools.internal.ws.resources.modeler";
private final static LocalizableMessageFactory messageFactory =
new LocalizableMessageFactory(BUNDLE_NAME, ModelerMessages::getResourceBundle);
private final static Localizer localizer = new Localizer();
private static ResourceBundle getResourceBundle(Locale locale) {
return ResourceBundle.getBundle(BUNDLE_NAME, locale);
}
public static Localizable localizableMIMEMODELER_INVALID_MIME_CONTENT_INVALID_SCHEMA_TYPE(Object arg0, Object arg1) {
return messageFactory.getMessage("mimemodeler.invalidMimeContent.invalidSchemaType", arg0, arg1);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -28,14 +28,21 @@ package com.sun.tools.internal.ws.resources;
import com.sun.istack.internal.localization.LocalizableMessageFactory;
import com.sun.istack.internal.localization.Localizer;
import java.util.Locale;
import java.util.ResourceBundle;
/**
* Defines string formatting method for each constant in the resource file
*
*/
public final class ProcessorMessages {
private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.tools.internal.ws.resources.processor");
private final static String BUNDLE_NAME = "com.sun.tools.internal.ws.resources.processor";
private final static LocalizableMessageFactory messageFactory =
new LocalizableMessageFactory(BUNDLE_NAME, ProcessorMessages::getResourceBundle);
private final static Localizer localizer = new Localizer();
private static ResourceBundle getResourceBundle(Locale locale) {
return ResourceBundle.getBundle(BUNDLE_NAME, locale);
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -29,16 +29,24 @@ import com.sun.istack.internal.localization.Localizable;
import com.sun.istack.internal.localization.LocalizableMessageFactory;
import com.sun.istack.internal.localization.Localizer;
import java.util.Locale;
import java.util.ResourceBundle;
/**
* Defines string formatting method for each constant in the resource file
*
*/
public final class UtilMessages {
private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.tools.internal.ws.resources.util");
private final static String BUNDLE_NAME = "com.sun.tools.internal.ws.resources.util";
private final static LocalizableMessageFactory messageFactory =
new LocalizableMessageFactory(BUNDLE_NAME, UtilMessages::getResourceBundle);
private final static Localizer localizer = new Localizer();
private static ResourceBundle getResourceBundle(Locale locale) {
return ResourceBundle.getBundle(BUNDLE_NAME, locale);
}
public static Localizable localizableSAX_2_DOM_NOTSUPPORTED_CREATEELEMENT(Object arg0) {
return messageFactory.getMessage("sax2dom.notsupported.createelement", arg0);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -29,16 +29,24 @@ import com.sun.istack.internal.localization.Localizable;
import com.sun.istack.internal.localization.LocalizableMessageFactory;
import com.sun.istack.internal.localization.Localizer;
import java.util.Locale;
import java.util.ResourceBundle;
/**
* Defines string formatting method for each constant in the resource file
*
*/
public final class WebserviceapMessages {
private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.tools.internal.ws.resources.webserviceap");
private final static String BUNDLE_NAME = "com.sun.tools.internal.ws.resources.webserviceap";
private final static LocalizableMessageFactory messageFactory =
new LocalizableMessageFactory(BUNDLE_NAME, WebserviceapMessages::getResourceBundle);
private final static Localizer localizer = new Localizer();
private static ResourceBundle getResourceBundle(Locale locale) {
return ResourceBundle.getBundle(BUNDLE_NAME, locale);
}
public static Localizable localizableWEBSERVICEAP_ENDPOINTINTERFACES_DO_NOT_MATCH(Object arg0, Object arg1) {
return messageFactory.getMessage("webserviceap.endpointinterfaces.do.not.match", arg0, arg1);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -29,16 +29,24 @@ import com.sun.istack.internal.localization.Localizable;
import com.sun.istack.internal.localization.LocalizableMessageFactory;
import com.sun.istack.internal.localization.Localizer;
import java.util.Locale;
import java.util.ResourceBundle;
/**
* Defines string formatting method for each constant in the resource file
*
*/
public final class WscompileMessages {
private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.tools.internal.ws.resources.wscompile");
private final static String BUNDLE_NAME = "com.sun.tools.internal.ws.resources.wscompile";
private final static LocalizableMessageFactory messageFactory =
new LocalizableMessageFactory(BUNDLE_NAME, WscompileMessages::getResourceBundle);
private final static Localizer localizer = new Localizer();
private static ResourceBundle getResourceBundle(Locale locale) {
return ResourceBundle.getBundle(BUNDLE_NAME, locale);
}
public static Localizable localizableWSIMPORT_ARCHIVING_ARTIFACTS(Object arg0) {
return messageFactory.getMessage("wsimport.archivingArtifacts", arg0);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -29,16 +29,24 @@ import com.sun.istack.internal.localization.Localizable;
import com.sun.istack.internal.localization.LocalizableMessageFactory;
import com.sun.istack.internal.localization.Localizer;
import java.util.Locale;
import java.util.ResourceBundle;
/**
* Defines string formatting method for each constant in the resource file
*
*/
public final class WsdlMessages {
private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.tools.internal.ws.resources.wsdl");
private final static String BUNDLE_NAME = "com.sun.tools.internal.ws.resources.wsdl";
private final static LocalizableMessageFactory messageFactory =
new LocalizableMessageFactory(BUNDLE_NAME, WsdlMessages::getResourceBundle);
private final static Localizer localizer = new Localizer();
private static ResourceBundle getResourceBundle(Locale locale) {
return ResourceBundle.getBundle(BUNDLE_NAME, locale);
}
public static Localizable localizablePARSING_ELEMENT_EXPECTED() {
return messageFactory.getMessage("parsing.elementExpected");
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -27,6 +27,9 @@ package com.sun.tools.internal.ws.util;
import com.sun.xml.internal.ws.util.exception.JAXWSExceptionBase;
import java.util.Locale;
import java.util.ResourceBundle;
/**
* @author WS Development Team
*/
@ -43,4 +46,9 @@ public class WSDLParseException extends JAXWSExceptionBase {
public String getDefaultResourceBundleName() {
return "com.sun.tools.internal.ws.resources.util";
}
@Override
public ResourceBundle getResourceBundle(Locale locale) {
return ResourceBundle.getBundle(getDefaultResourceBundleName(), locale);
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -28,6 +28,9 @@ package com.sun.tools.internal.ws.wsdl.framework;
import com.sun.istack.internal.localization.Localizable;
import com.sun.xml.internal.ws.util.exception.JAXWSExceptionBase;
import java.util.Locale;
import java.util.ResourceBundle;
/**
* An exception signalling a parsing error.
*
@ -50,4 +53,9 @@ public class ParseException extends JAXWSExceptionBase {
public String getDefaultResourceBundleName() {
return "com.sun.tools.internal.ws.resources.wsdl";
}
@Override
public ResourceBundle getResourceBundle(Locale locale) {
return ResourceBundle.getBundle(getDefaultResourceBundleName(), locale);
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -27,6 +27,9 @@ package com.sun.tools.internal.ws.wsdl.framework;
import com.sun.xml.internal.ws.util.exception.JAXWSExceptionBase;
import java.util.Locale;
import java.util.ResourceBundle;
/**
* An exception signalling that validation of an entity failed.
*
@ -45,4 +48,9 @@ public class ValidationException extends JAXWSExceptionBase {
public String getDefaultResourceBundleName() {
return "com.sun.tools.internal.ws.resources.wsdl";
}
@Override
public ResourceBundle getResourceBundle(Locale locale) {
return ResourceBundle.getBundle(getDefaultResourceBundleName(), locale);
}
}