com.anaptecs.spring.base.serializers.TechBaseModuleFactory Maven / Gradle / Ivy
/*
* anaptecs GmbH, Ricarda-Huch-Str. 71, 72760 Reutlingen, Germany
*
* Copyright 2004 - 2019. All rights reserved.
*/
package com.anaptecs.spring.base.serializers;
import com.fasterxml.jackson.databind.Module;
import com.fasterxml.jackson.databind.module.SimpleModule;
/**
* Factory assembles all configured serializers / deserializers into a module.
*/
public class TechBaseModuleFactory {
/**
* Method creates a module that consists of all serializers / deserializers for data types.
*/
public static Module createDataTypeSerializerModule( ) {
// Create module for serializers / deserializers that are located in this package
SimpleModule lModule = new SimpleModule("DataTypeSerializerModule." + TechBaseModuleFactory.class.getName());
// Add serializers and deserializers for data types
// Return created module.
return lModule;
}
/**
* Method creates a module that consists of all serializers / deserializers for enums.
*/
public static Module createEnumSerializerModule( ) {
// Create module for serializers / deserializers that are located in this package
SimpleModule lModule = new SimpleModule("EnumSerializerModule." + TechBaseModuleFactory.class.getName());
// Add serializers and deserializers for enumerations
// Return created module.
return lModule;
}
}