public final class ConfigMapperFactory extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ConfigMapperFactory.Builder
Builds
ConfigMapperFactory . |
Modifier and Type | Method and Description |
---|---|
static ConfigMapperFactory.Builder |
builder()
Creates a
ConfigMapperFactory.Builder to build ConfigMapperFactory . |
ConfigMapper |
createConfigMapper()
Creates a
ConfigMapper to maps org.embulk.config.ConfigSource into a task-defining interface that inherits Task . |
TaskMapper |
createTaskMapper()
Creates a
TaskMapper to maps org.embulk.config.TaskSource into a task-defining interface that inherits Task . |
ConfigDiff |
newConfigDiff()
Creates an empty
ConfigDiff instance. |
ConfigSource |
newConfigSource()
Creates an empty
ConfigSource instance. |
TaskReport |
newTaskReport()
Creates an empty
TaskReport instance. |
TaskSource |
newTaskSource()
Creates an empty
TaskSource instance. |
ConfigDiff |
rebuildConfigDiff(ConfigDiff configDiff)
Rebuilds
ConfigDiff with the context of this embulk-util-config . |
TaskReport |
rebuildTaskReport(TaskReport taskReport)
Rebuilds
TaskReport with the context of this embulk-util-config . |
static ConfigMapperFactory |
with(Module... modules)
Creates a
ConfigMapperFactory with required and specified Jackson Module s. |
static ConfigMapperFactory |
with(Validator validator,
Module... modules)
|
static ConfigMapperFactory |
withDefault()
Creates a
ConfigMapperFactory with required and default Jackson Module s. |
public static ConfigMapperFactory.Builder builder()
ConfigMapperFactory.Builder
to build ConfigMapperFactory
.public static ConfigMapperFactory with(Validator validator, Module... modules)
public static ConfigMapperFactory with(Module... modules)
ConfigMapperFactory
with required and specified Jackson Module
s.public static ConfigMapperFactory withDefault()
ConfigMapperFactory
with required and default Jackson Module
s.public ConfigMapper createConfigMapper()
ConfigMapper
to maps org.embulk.config.ConfigSource
into a task-defining interface that inherits Task
.public TaskMapper createTaskMapper()
TaskMapper
to maps org.embulk.config.TaskSource
into a task-defining interface that inherits Task
.public ConfigDiff newConfigDiff()
ConfigDiff
instance.
It is to replace Exec.newConfigDiff()
.
public ConfigSource newConfigSource()
ConfigSource
instance.
It is to replace Exec.newConfigSource()
.
public TaskReport newTaskReport()
TaskReport
instance.
It is to replace Exec.newTaskReport()
.
public TaskSource newTaskSource()
TaskSource
instance.
It is to replace Exec.newTaskSource()
.
public ConfigDiff rebuildConfigDiff(ConfigDiff configDiff)
ConfigDiff
with the context of this embulk-util-config
.
ConfigDiff
passed from embulk-core
is built with the context of
embulk-core
. It is usually fine, but sometimes, it could be problematic because the given
ConfigDiff
is built with Jackson on the embulk-core
side.
For example, when converting a ConfigDiff
instance to a Jackson object,
such as JsonNode
like below, it fails.
configDiff.get(JsonNode.class, "field");
Rebuilding the given ConfigDiff
instance would mitigate such a problem.
configDiff
- a ConfigDiff
instance to rebuildConfigDiff
instance rebuiltpublic TaskReport rebuildTaskReport(TaskReport taskReport)
TaskReport
with the context of this embulk-util-config
.
TaskReport
passed from embulk-core
is built with the context of
embulk-core
. It is usually fine, but sometimes, it could be problematic because the given
TaskReport
is built with Jackson on the embulk-core
side.
For example, when converting a TaskReport
instance to a Jackson object,
such as JsonNode
like below, it fails.
taskReport.get(JsonNode.class, "field");
Rebuilding the given TaskReport
instance would mitigate such a problem.
taskReport
- a TaskReport
instance to rebuildTaskReport
instance rebuilt