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.xml.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 PolicyMessages {

  41     private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.policy";
  42     private final static LocalizableMessageFactory messageFactory =
  43         new LocalizableMessageFactory(BUNDLE_NAME, PolicyMessages::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 localizableWSP_1007_POLICY_EXCEPTION_WHILE_FINISHING_PARSING_WSDL() {
  51         return messageFactory.getMessage("WSP_1007_POLICY_EXCEPTION_WHILE_FINISHING_PARSING_WSDL");








  52     }
  53 
  54     /**
  55      * WSP1007: Policy exception occurred when finishing WSDL parsing.
  56      *
  57      */
  58     public static String WSP_1007_POLICY_EXCEPTION_WHILE_FINISHING_PARSING_WSDL() {
  59         return localizer.localize(localizableWSP_1007_POLICY_EXCEPTION_WHILE_FINISHING_PARSING_WSDL());
  60     }
  61 
  62     public static Localizable localizableWSP_1002_UNABLE_TO_MARSHALL_POLICY_OR_POLICY_REFERENCE() {
  63         return messageFactory.getMessage("WSP_1002_UNABLE_TO_MARSHALL_POLICY_OR_POLICY_REFERENCE");
  64     }
  65 
  66     /**
  67      * WSP1002: Unable to marshall policy or it's reference. See original exception for more details.
  68      *
  69      */
  70     public static String WSP_1002_UNABLE_TO_MARSHALL_POLICY_OR_POLICY_REFERENCE() {
  71         return localizer.localize(localizableWSP_1002_UNABLE_TO_MARSHALL_POLICY_OR_POLICY_REFERENCE());
  72     }
  73 
  74     public static Localizable localizableWSP_1015_SERVER_SIDE_ASSERTION_VALIDATION_FAILED(Object arg0, Object arg1) {
  75         return messageFactory.getMessage("WSP_1015_SERVER_SIDE_ASSERTION_VALIDATION_FAILED", arg0, arg1);
  76     }
  77 
  78     /**
  79      * WSP1015: Server side assertion validation failed for "{0}" assertion. Assertion was evaluated as "{1}".
  80      *
  81      */
  82     public static String WSP_1015_SERVER_SIDE_ASSERTION_VALIDATION_FAILED(Object arg0, Object arg1) {
  83         return localizer.localize(localizableWSP_1015_SERVER_SIDE_ASSERTION_VALIDATION_FAILED(arg0, arg1));
  84     }
  85 
  86     public static Localizable localizableWSP_1017_MAP_UPDATE_FAILED() {
  87         return messageFactory.getMessage("WSP_1017_MAP_UPDATE_FAILED");
  88     }
  89 
  90     /**
  91      * WSP1048: Policy map setup failed - exception occurred while trying to modify policy map content.
  92      *
  93      */
  94     public static String WSP_1017_MAP_UPDATE_FAILED() {
  95         return localizer.localize(localizableWSP_1017_MAP_UPDATE_FAILED());
  96     }
  97 
  98     public static Localizable localizableWSP_1010_NO_POLICIES_DEFINED() {
  99         return messageFactory.getMessage("WSP_1010_NO_POLICIES_DEFINED");
 100     }
 101 
 102     /**
 103      * WSP1010: No policies defined.
 104      *
 105      */
 106     public static String WSP_1010_NO_POLICIES_DEFINED() {
 107         return localizer.localize(localizableWSP_1010_NO_POLICIES_DEFINED());
 108     }
 109 
 110     public static Localizable localizableWSP_1008_NOT_MARSHALLING_WSDL_SUBJ_NULL(Object arg0) {
 111         return messageFactory.getMessage("WSP_1008_NOT_MARSHALLING_WSDL_SUBJ_NULL", arg0);
 112     }
 113 
 114     /**
 115      * WSP1008: Not marshalling policy, wsdl subject is null for "{0}".
 116      *
 117      */
 118     public static String WSP_1008_NOT_MARSHALLING_WSDL_SUBJ_NULL(Object arg0) {
 119         return localizer.localize(localizableWSP_1008_NOT_MARSHALLING_WSDL_SUBJ_NULL(arg0));
 120     }
 121 
 122     public static Localizable localizableWSP_1009_NOT_MARSHALLING_ANY_POLICIES_POLICY_MAP_IS_NULL() {
 123         return messageFactory.getMessage("WSP_1009_NOT_MARSHALLING_ANY_POLICIES_POLICY_MAP_IS_NULL");
 124     }
 125 
 126     /**
 127      * WSP1009: Policy map was null, not marshalling any policies.
 128      *
 129      */
 130     public static String WSP_1009_NOT_MARSHALLING_ANY_POLICIES_POLICY_MAP_IS_NULL() {
 131         return localizer.localize(localizableWSP_1009_NOT_MARSHALLING_ANY_POLICIES_POLICY_MAP_IS_NULL());
 132     }
 133 
 134     public static Localizable localizableWSP_1020_DUPLICATE_ID(Object arg0) {
 135         return messageFactory.getMessage("WSP_1020_DUPLICATE_ID", arg0);
 136     }
 137 
 138     /**
 139      * WSP1020: Found two policies in one document with the same id: "{0}".
 140      *
 141      */
 142     public static String WSP_1020_DUPLICATE_ID(Object arg0) {
 143         return localizer.localize(localizableWSP_1020_DUPLICATE_ID(arg0));
 144     }
 145 
 146     public static Localizable localizableWSP_1003_UNABLE_TO_CHECK_ELEMENT_NAME(Object arg0, Object arg1) {
 147         return messageFactory.getMessage("WSP_1003_UNABLE_TO_CHECK_ELEMENT_NAME", arg0, arg1);
 148     }
 149 
 150     /**
 151      * WSP1003: Unable to check element name for class "{0}" and WSDL name "{1}".
 152      *
 153      */
 154     public static String WSP_1003_UNABLE_TO_CHECK_ELEMENT_NAME(Object arg0, Object arg1) {
 155         return localizer.localize(localizableWSP_1003_UNABLE_TO_CHECK_ELEMENT_NAME(arg0, arg1));
 156     }
 157 
 158     public static Localizable localizableWSP_1013_EXCEPTION_WHEN_READING_POLICY_ELEMENT(Object arg0) {
 159         return messageFactory.getMessage("WSP_1013_EXCEPTION_WHEN_READING_POLICY_ELEMENT", arg0);
 160     }
 161 
 162     /**
 163      * WSP1013: Exception occurred while reading policy element. Following was read so far: {0}.
 164      *
 165      */
 166     public static String WSP_1013_EXCEPTION_WHEN_READING_POLICY_ELEMENT(Object arg0) {
 167         return localizer.localize(localizableWSP_1013_EXCEPTION_WHEN_READING_POLICY_ELEMENT(arg0));
 168     }
 169 
 170     public static Localizable localizableWSP_1006_POLICY_MAP_EXTENDER_CAN_NOT_BE_NULL() {
 171         return messageFactory.getMessage("WSP_1006_POLICY_MAP_EXTENDER_CAN_NOT_BE_NULL");
 172     }
 173 
 174     /**
 175      * WSP1006: Policy map extender can not be null.
 176      *
 177      */
 178     public static String WSP_1006_POLICY_MAP_EXTENDER_CAN_NOT_BE_NULL() {
 179         return localizer.localize(localizableWSP_1006_POLICY_MAP_EXTENDER_CAN_NOT_BE_NULL());
 180     }
 181 
 182     public static Localizable localizableWSP_1018_FAILED_TO_MARSHALL_POLICY(Object arg0) {
 183         return messageFactory.getMessage("WSP_1018_FAILED_TO_MARSHALL_POLICY", arg0);
 184     }
 185 
 186     /**
 187      * WSP1018: Failed to marshal policy "{0}".
 188      *
 189      */
 190     public static String WSP_1018_FAILED_TO_MARSHALL_POLICY(Object arg0) {
 191         return localizer.localize(localizableWSP_1018_FAILED_TO_MARSHALL_POLICY(arg0));
 192     }
 193 
 194     public static Localizable localizableWSP_1005_POLICY_REFERENCE_DOES_NOT_EXIST(Object arg0) {
 195         return messageFactory.getMessage("WSP_1005_POLICY_REFERENCE_DOES_NOT_EXIST", arg0);
 196     }
 197 
 198     /**
 199      * WSP1005: Failed to find policy referenced by URI "{0}".
 200      *
 201      */
 202     public static String WSP_1005_POLICY_REFERENCE_DOES_NOT_EXIST(Object arg0) {
 203         return localizer.localize(localizableWSP_1005_POLICY_REFERENCE_DOES_NOT_EXIST(arg0));
 204     }
 205 
 206     public static Localizable localizableWSP_1016_POLICY_ID_NULL_OR_DUPLICATE(Object arg0) {
 207         return messageFactory.getMessage("WSP_1016_POLICY_ID_NULL_OR_DUPLICATE", arg0);
 208     }
 209 
 210     /**
 211      * WSP1016: The policy is not added because it has no ID or a policy with the same ID was already added: {0}.
 212      *
 213      */
 214     public static String WSP_1016_POLICY_ID_NULL_OR_DUPLICATE(Object arg0) {
 215         return localizer.localize(localizableWSP_1016_POLICY_ID_NULL_OR_DUPLICATE(arg0));
 216     }
 217 
 218     public static Localizable localizableWSP_1014_CAN_NOT_FIND_POLICY(Object arg0) {
 219         return messageFactory.getMessage("WSP_1014_CAN_NOT_FIND_POLICY", arg0);
 220     }
 221 
 222     /**
 223      * WSP1014: Can not find policy "{0}" that is referenced in from the WSDL. Please, check your policy references in the WSDL.
 224      *
 225      */
 226     public static String WSP_1014_CAN_NOT_FIND_POLICY(Object arg0) {
 227         return localizer.localize(localizableWSP_1014_CAN_NOT_FIND_POLICY(arg0));
 228     }
 229 
 230     public static Localizable localizableWSP_1012_FAILED_CONFIGURE_WSDL_MODEL() {
 231         return messageFactory.getMessage("WSP_1012_FAILED_CONFIGURE_WSDL_MODEL");
 232     }
 233 
 234     /**
 235      * WSP1012: Failed to configure wsdl model.
 236      *
 237      */
 238     public static String WSP_1012_FAILED_CONFIGURE_WSDL_MODEL() {
 239         return localizer.localize(localizableWSP_1012_FAILED_CONFIGURE_WSDL_MODEL());
 240     }
 241 
 242     public static Localizable localizableWSP_1021_FAULT_NOT_BOUND(Object arg0) {
 243         return messageFactory.getMessage("WSP_1021_FAULT_NOT_BOUND", arg0);
 244     }
 245 
 246     /**
 247      * WSP1021: Fault "{0}" not bound. Check names in port and binding definitions.
 248      *
 249      */
 250     public static String WSP_1021_FAULT_NOT_BOUND(Object arg0) {
 251         return localizer.localize(localizableWSP_1021_FAULT_NOT_BOUND(arg0));
 252     }
 253 
 254     public static Localizable localizableWSP_1011_FAILED_TO_RETRIEVE_EFFECTIVE_POLICY_FOR_SUBJECT(Object arg0) {
 255         return messageFactory.getMessage("WSP_1011_FAILED_TO_RETRIEVE_EFFECTIVE_POLICY_FOR_SUBJECT", arg0);
 256     }
 257 
 258     /**
 259      * WSP1011: Failed to retrieve effective policy for subject: {0}.
 260      *
 261      */
 262     public static String WSP_1011_FAILED_TO_RETRIEVE_EFFECTIVE_POLICY_FOR_SUBJECT(Object arg0) {
 263         return localizer.localize(localizableWSP_1011_FAILED_TO_RETRIEVE_EFFECTIVE_POLICY_FOR_SUBJECT(arg0));
 264     }
 265 
 266     public static Localizable localizableWSP_1019_CREATE_EMPTY_POLICY_MAP() {
 267         return messageFactory.getMessage("WSP_1019_CREATE_EMPTY_POLICY_MAP");
 268     }
 269 
 270     /**
 271      * WSP1019: Failed to find any configuration file. Creating new empty policy map.
 272      *
 273      */
 274     public static String WSP_1019_CREATE_EMPTY_POLICY_MAP() {
 275         return localizer.localize(localizableWSP_1019_CREATE_EMPTY_POLICY_MAP());
 276     }
 277 
 278     public static Localizable localizableWSP_1001_XML_EXCEPTION_WHEN_PROCESSING_POLICY_REFERENCE() {
 279         return messageFactory.getMessage("WSP_1001_XML_EXCEPTION_WHEN_PROCESSING_POLICY_REFERENCE");
 280     }
 281 
 282     /**
 283      * WSP1001: XMLStreamException occurred when reading policy reference element.
 284      *
 285      */
 286     public static String WSP_1001_XML_EXCEPTION_WHEN_PROCESSING_POLICY_REFERENCE() {
 287         return localizer.localize(localizableWSP_1001_XML_EXCEPTION_WHEN_PROCESSING_POLICY_REFERENCE());
 288     }
 289 
 290     public static Localizable localizableWSP_1004_POLICY_URIS_CAN_NOT_BE_NULL() {
 291         return messageFactory.getMessage("WSP_1004_POLICY_URIS_CAN_NOT_BE_NULL");





 292     }
 293 
 294     /**
 295      * WSP1004: Policy URIs can not be null.
 296      *
 297      */
 298     public static String WSP_1004_POLICY_URIS_CAN_NOT_BE_NULL() {
 299         return localizer.localize(localizableWSP_1004_POLICY_URIS_CAN_NOT_BE_NULL());
 300     }
 301 
 302 }
--- EOF ---