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

io.katharsis.module.CoreModule Maven / Gradle / Ivy

There is a newer version: 2.6.3
Show newest version
package io.katharsis.module;

import io.katharsis.errorhandling.mapper.DefaultExceptionMapperLookup;
import io.katharsis.resource.field.ResourceFieldNameTransformer;
import io.katharsis.resource.information.AnnotationResourceInformationBuilder;
import io.katharsis.resource.registry.DefaultResourceLookup;

/**
 * Register the Katharsis core feature set as module.
 */
public class CoreModule extends SimpleModule {

	public static final String MODULE_NAME = "core";

	public CoreModule(String resourceSearchPackage, ResourceFieldNameTransformer resourceFieldNameTransformer) {
		super(MODULE_NAME);
		this.addResourceLookup(new DefaultResourceLookup(resourceSearchPackage));
		this.addResourceInformationBuilder(new AnnotationResourceInformationBuilder(resourceFieldNameTransformer));
		this.addExceptionMapperLookup(new DefaultExceptionMapperLookup(resourceSearchPackage));
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy