Package com.fasterxml.jackson.databind

Examples of com.fasterxml.jackson.databind.InjectableValues$Std


        .addDeserializer(MajorType.class, new MajorTypeSerDe.De());
       
       
    mapper.registerModule(deserModule);
    mapper.registerSubtypes(PhysicalOperatorUtil.getSubTypes(config));
    InjectableValues injectables = new InjectableValues.Std() //
            .addValue(StorageEngineRegistry.class, engineRegistry) //
        .addValue(DrillbitEndpoint.class, endpoint); //

    this.mapper = mapper;
    this.physicalPlanReader = mapper.reader(PhysicalPlan.class).with(injectables);
View Full Code Here


        .addDeserializer(MajorType.class, new MajorTypeSerDe.De());


    mapper.registerModule(deserModule);
    mapper.registerSubtypes(PhysicalOperatorUtil.getSubTypes(config));
    InjectableValues injectables = new InjectableValues.Std() //
            .addValue(StoragePluginRegistry.class, pluginRegistry) //
        .addValue(DrillbitEndpoint.class, endpoint); //

    this.mapper = mapper;
    this.physicalPlanReader = mapper.reader(PhysicalPlan.class).with(injectables);
View Full Code Here

    );

    for (final Module jacksonModule : new FirehoseModule().getJacksonModules()) {
      jsonMapper.registerModule(jacksonModule);
    }
    InjectableValues inject = new InjectableValues.Std()
        .addValue(ObjectMapper.class, jsonMapper);
    final String json = jsonMapper.writeValueAsString(task);

    Thread.sleep(100); // Just want to run the clock a bit to make sure the task id doesn't change
    final IndexTask task2 = jsonMapper.reader(Task.class).with(inject).readValue(json);
View Full Code Here

        this.om = new ObjectMapper();
        this.om.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES,
                false);
        this.om.configure(
                DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_AS_NULL, true);
        InjectableValues inject = new InjectableValues.Std().addValue(
                "locales", builder.locales);
        this.om.setInjectableValues(inject);
    }
View Full Code Here

                    + " but there was no message body.", 200, uri.toURL());
        }

        String body = WebServiceClient.getSuccessBody(response, uri);

        InjectableValues inject = new InjectableValues.Std().addValue(
                "locales", this.locales);
        ObjectMapper mapper = new ObjectMapper();
        mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES,
                false);
View Full Code Here

    @Test
    public void testSerialization() throws IOException {
        ObjectMapper mapper = new ObjectMapper();
        mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES,
                false);
        InjectableValues inject = new InjectableValues.Std().addValue(
                "locales", new ArrayList<String>());
        InsightsResponse response = mapper.reader(InsightsResponse.class)
                .with(inject).readValue(this.insightsBody);
        JsonNode expectedNode = mapper.readValue(this.insightsBody,
                JsonNode.class);
View Full Code Here

                "            \"indexSuffixFormatter\":{\"type\": \"date\", \"properties\":{\"dateFormat\":\"YYYYMMdd\"}}\n" +
                "        }\n" +
                "    }";
        final ObjectMapper jsonMapper = new DefaultObjectMapper();
        jsonMapper.registerSubtypes(new NamedType(ElasticSearchSink.class, "elasticsearch"));
        jsonMapper.setInjectableValues(new InjectableValues() {
            @Override
            public Object findInjectableValue(
                    Object valueId,
                    DeserializationContext ctxt,
                    BeanProperty forProperty,
View Full Code Here

                "    \"indexTypeMap\":{\"routingkey1\":\"index1:type1\", \"routingkey2\":\"index2:type2\"},\n" +
                "    \"idFields\":{\"routingkey\": [\"f1\", \"f2\", \"ts_minute\"]},\n" +
                "    \"timestamp\": {\"field\":\"ts\"},\n" +
                "    \"indexSuffixFormatter\":{\"type\": \"date\", \"properties\":{\"dateFormat\":\"YYYYMMdd\"}}\n" +
                "}";
        jsonMapper.setInjectableValues(new InjectableValues() {
                    @Override
                    public Object findInjectableValue(
                            Object valueId,
                            DeserializationContext ctxt,
                            BeanProperty forProperty,
View Full Code Here

        ObjectMapper mapper = new DefaultObjectMapper();
        final Map<String, Object> injectables = Maps.newHashMap();

        injectables.put("test", "test");
        injectables.put("b", "binjected");
        mapper.setInjectableValues(new InjectableValues() {
            @Override
            public Object findInjectableValue(
                    Object valueId, DeserializationContext ctxt, BeanProperty forProperty, Object beanInstance
            ) {
                return injectables.get(valueId);
View Full Code Here

TOP

Related Classes of com.fasterxml.jackson.databind.InjectableValues$Std

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.