All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.developframework.kite.jackson.JacksonFramework Maven / Gradle / Ivy

There is a newer version: 1.0.1
Show newest version
package com.github.developframework.kite.jackson;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.github.developframework.kite.core.Framework;
import com.github.developframework.kite.core.KiteConfiguration;
import com.github.developframework.kite.core.Producer;
import com.github.developframework.kite.core.data.DataModel;
import com.github.developframework.kite.core.strategy.KitePropertyNamingStrategy;
import com.github.developframework.kite.core.structs.TemplatePackage;
import lombok.RequiredArgsConstructor;

import java.util.List;

/**
 * 由jackson框架实现
 *
 * @author qiushui on 2021-06-29.
 */
@RequiredArgsConstructor
public class JacksonFramework implements Framework {

    private final ObjectMapper objectMapper;

    @Override
    public KitePropertyNamingStrategy namingStrategy() {
        return new JacksonKitePropertyNamingStrategy();
    }

    @Override
    public ObjectMapper getCore() {
        return objectMapper;
    }

    @Override
    public Producer buildProducer(KiteConfiguration configuration, DataModel dataModel, String namespace, String templateId) {
        return new JacksonProducer(configuration, dataModel, namespace, templateId);
    }

    @Override
    public Producer buildProducer(KiteConfiguration configuration, DataModel dataModel, List templatePackages) {
        return new JacksonProducer(configuration, dataModel, templatePackages);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy