Ignore:
Timestamp:
2017-12-23T02:40:43+01:00 (6 years ago)
Author:
Don-vip
Message:

see #15682 - upgrade to JSR 374 (JSON Processing) API 1.1.2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/glassfish/json/JsonMessages.java

    r6756 r13231  
    22 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    33 *
    4  * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved.
     4 * Copyright (c) 2013-2017 Oracle and/or its affiliates. All rights reserved.
    55 *
    66 * The contents of this file are subject to the terms of either the GNU
     
    99 * may not use this file except in compliance with the License.  You can
    1010 * obtain a copy of the License at
    11  * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
    12  * or packager/legal/LICENSE.txt.  See the License for the specific
     11 * https://oss.oracle.com/licenses/CDDL+GPL-1.1
     12 * or LICENSE.txt.  See the License for the specific
    1313 * language governing permissions and limitations under the License.
    1414 *
    1515 * When distributing the software, include this License Header Notice in each
    16  * file and include the License file at packager/legal/LICENSE.txt.
     16 * file and include the License file at LICENSE.txt.
    1717 *
    1818 * GPL Classpath Exception:
     
    4646import java.text.MessageFormat;
    4747import java.util.ResourceBundle;
     48import javax.json.JsonObject;
     49import javax.json.JsonValue;
    4850
    4951/**
     
    5658            ResourceBundle.getBundle("org.glassfish.json.messages");
    5759
     60    // global/shared messages
     61    static String INTERNAL_ERROR() {
     62        return localize("internal.error");
     63    }
     64
    5865    // tokenizer messages
    5966    static String TOKENIZER_UNEXPECTED_CHAR(int unexpected, JsonLocation location) {
     
    9198    }
    9299
     100    static String PARSER_GETARRAY_ERR(JsonParser.Event event) {
     101        return localize("parser.getArray.err", event);
     102    }
     103
     104    static String PARSER_GETOBJECT_ERR(JsonParser.Event event) {
     105        return localize("parser.getObject.err", event);
     106    }
     107
     108    static String PARSER_GETVALUE_ERR(JsonParser.Event event) {
     109        return localize("parser.getValue.err", event);
     110    }
     111
     112    static String PARSER_GETVALUESTREAM_ERR() {
     113        return localize("parser.getValueStream.err");
     114    }
     115
    93116    static String PARSER_EXPECTED_EOF(JsonTokenizer.JsonToken token) {
    94117        return localize("parser.expected.eof", token);
     
    103126    }
    104127
     128    static String PARSER_STATE_ERR(JsonValue.ValueType type) {
     129        return localize("parser.state.err", type);
     130    }
     131
     132    static String PARSER_SCOPE_ERR(JsonValue value) {
     133        return localize("parser.scope.err", value);
     134    }
     135
     136    static String PARSER_INPUT_ENC_DETECT_FAILED() {
     137        return localize("parser.input.enc.detect.failed");
     138    }
     139
     140    static String PARSER_INPUT_ENC_DETECT_IOERR() {
     141        return localize("parser.input.enc.detect.ioerr");
     142    }
    105143
    106144    // generator messages
     
    140178    }
    141179
    142 
    143180    // reader messages
    144181    static String READER_READ_ALREADY_CALLED() {
     
    146183    }
    147184
    148     static String READER_EXPECTED_ARRAY_GOT_OBJECT() {
    149         return localize("reader.expected.array.got.object");
    150     }
    151 
    152     static String READER_EXPECTED_OBJECT_GOT_ARRAY() {
    153         return localize("reader.expected.object.got.array");
    154     }
    155 
    156185
    157186    // obj builder messages
     
    184213    static String ARRBUILDER_ARRAY_BUILDER_NULL() {
    185214        return localize("arrbuilder.array.builder.null");
     215    }
     216
     217    static String ARRBUILDER_VALUELIST_NULL(int index, int size) {
     218        return localize("arrbuilder.valuelist.null", index, size);
     219    }
     220
     221    // json pointer messages
     222    static String POINTER_FORMAT_INVALID() {
     223        return localize("pointer.format.invalid");
     224    }
     225
     226    static String POINTER_MAPPING_MISSING(JsonObject object, String key) {
     227        return localize("pointer.mapping.missing", object, key);
     228    }
     229
     230    static String POINTER_REFERENCE_INVALID(JsonValue.ValueType type) {
     231        return localize("pointer.reference.invalid", type.name());
     232    }
     233
     234    static String POINTER_ARRAY_INDEX_ERR(String token) {
     235        return localize("pointer.array.index.err", token);
     236    }
     237
     238    static String POINTER_ARRAY_INDEX_ILLEGAL(String token) {
     239        return localize("pointer.array.index.illegal", token);
     240    }
     241
     242    // nodereference messages
     243    static String NODEREF_VALUE_ADD_ERR() {
     244        return localize("noderef.value.add.err");
     245    }
     246
     247    static String NODEREF_VALUE_CANNOT_REMOVE() {
     248        return localize("noderef.value.cannot.remove");
     249    }
     250
     251    static String NODEREF_OBJECT_MISSING(String key) {
     252        return localize("noderef.object.missing", key);
     253    }
     254
     255    static String NODEREF_ARRAY_INDEX_ERR(int index, int size) {
     256        return localize("noderef.array.index.err", index, size);
     257    }
     258
     259    // json patch messages
     260    static String PATCH_MUST_BE_ARRAY() {
     261        return localize("patch.must.be.array");
     262    }
     263
     264    static String PATCH_MOVE_PROPER_PREFIX(String from, String path) {
     265        return localize("patch.move.proper.prefix", from, path);
     266    }
     267
     268    static String PATCH_MOVE_TARGET_NULL(String from) {
     269        return localize("patch.move.target.null", from);
     270    }
     271
     272    static String PATCH_TEST_FAILED(String path, String value) {
     273        return localize("patch.test.failed", path, value);
     274    }
     275
     276    static String PATCH_ILLEGAL_OPERATION(String operation) {
     277        return localize("patch.illegal.operation", operation);
     278    }
     279
     280    static String PATCH_MEMBER_MISSING(String operation, String member) {
     281        return localize("patch.member.missing", operation, member);
    186282    }
    187283
Note: See TracChangeset for help on using the changeset viewer.