Package com.github.fge.msgsimple.bundle

Examples of com.github.fge.msgsimple.bundle.MessageBundle


         */
        final String key = "missingDivisors";
        final String value = "integer value is not a multiple of all divisors";
        final MessageSource source = MapMessageSource.newBuilder()
            .put(key, value).build();
        final MessageBundle bundle
            = MessageBundles.getBundle(JsonSchemaValidationBundle.class)
            .thaw().appendSource(source).freeze();

        /*
         * Build a custom validation configuration: add our custom library and
View Full Code Here


         */
        final String key = "missingDivisors";
        final String value = "integer value is not a multiple of all divisors";
        final MessageSource source = MapMessageSource.newBuilder()
            .put(key, value).build();
        final MessageBundle bundle
            = MessageBundles.getBundle(JsonSchemaValidationBundle.class)
            .thaw().appendSource(source).freeze();

        /*
         * Build a custom validation configuration: add our custom library and
View Full Code Here

    {
        final JsonNode schemaNode
            = JsonLoader.fromResource("/other/issue102.json");
        final JsonSchemaFactory factory = JsonSchemaFactory.byDefault();
        final JsonValidator validator = factory.getValidator();
        final MessageBundle bundle
            = MessageBundles.getBundle(JsonSchemaValidationBundle.class);

        try {
            validator.validate(schemaNode,
                JacksonUtils.nodeFactory().nullNode());
            fail("No exception thrown!");
        } catch (ProcessingException e) {
            final URI uri = URI.create("#/oneOf/1");
            final ProcessingMessage message = e.getProcessingMessage();
            final String expectedMessage
                = bundle.printf("err.common.validationLoop", uri, "");
            assertMessage(message)
                .hasMessage(expectedMessage)
                .hasField("alreadyVisited", uri)
                .hasField("instancePointer", JsonPointer.empty().toString())
                .hasField("validationPath",
View Full Code Here

         */
        final String key = "invalidUUID";
        final String value = "input is not a valid UUID";
        final MessageSource source = MapMessageSource.newBuilder()
            .put(key, value).build();
        final MessageBundle bundle
            = MessageBundles.getBundle(JsonSchemaValidationBundle.class)
            .thaw().appendSource(source).freeze();

        /*
         * Build our dedicated validation configuration
View Full Code Here

         */
        final String key = "invalidUUID";
        final String value = "input is not a valid UUID";
        final MessageSource source = MapMessageSource.newBuilder()
            .put(key, value).build();
        final MessageBundle bundle
            = MessageBundles.getBundle(JsonSchemaValidationBundle.class)
            .thaw().appendSource(source).freeze();

        /*
         * Build our dedicated validation configuration
View Full Code Here

     *
     * @param cfg the validation configuration to use
     */
    public SyntaxValidator(final ValidationConfiguration cfg)
    {
        final MessageBundle syntaxMessages = cfg.getSyntaxMessages();
        final ProcessorMap<JsonRef, ValueHolder<SchemaTree>, ValueHolder<SchemaTree>>
            map = new ProcessorMap<JsonRef, ValueHolder<SchemaTree>, ValueHolder<SchemaTree>>(FUNCTION);

        Dictionary<SyntaxChecker> dict;
        dict = cfg.getDefaultLibrary().getSyntaxCheckers();
View Full Code Here

TOP

Related Classes of com.github.fge.msgsimple.bundle.MessageBundle

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.