public interface ConfigSource extends DataSource
It had two following methods that return Jackson's instances till v0.9, but they are removed so that Jackson on the core side can be hidden from plugins.
Iterable<Map.Entry<String, JsonNode>> getAttributes()
ObjectNode getObjectNode()
Modifier and Type | Method and Description |
---|---|
ConfigSource |
deepCopy()
Creates a deep copy of itself.
|
ConfigSource |
getNested(String attrName)
Returns a nested value under
attrName . |
ConfigSource |
getNestedOrGetEmpty(String attrName)
Returns a nested value under
attrName . |
ConfigSource |
getNestedOrSetEmpty(String attrName)
Returns a nested value under
attrName . |
default <T> T |
loadConfig(Class<T> taskType)
Deprecated.
Use
embulk-util-config instead. |
ConfigSource |
merge(DataSource other)
Merges another
ConfigSource into itself. |
ConfigSource |
remove(String attrName)
Removes the attribute named
attrName . |
ConfigSource |
set(String attrName,
Object v)
Sets a value for
attrName . |
ConfigSource |
setAll(DataSource other)
Sets all attributes in
other into itself. |
ConfigSource |
setNested(String attrName,
DataSource v)
Sets a nested value for
attrName . |
@Deprecated default <T> T loadConfig(Class<T> taskType)
embulk-util-config
instead.PluginTask
.
This method will be deprecated. Loading configs will be replaced by another library
embulk-util-config
on plugin's side.
T
- the task class to load this configuration astaskType
- the task class to load this configuration asConfigSource getNested(String attrName)
attrName
.getNested
in interface DataSource
attrName
- name of the nested attribute to look forattrName
ConfigSource getNestedOrSetEmpty(String attrName)
attrName
. Sets an empty object node "{}"
there if it is empty.getNestedOrSetEmpty
in interface DataSource
attrName
- name of the nested attribute to look forattrName
ConfigSource getNestedOrGetEmpty(String attrName)
attrName
. Returns an empty object node "{}"
there if it is empty.getNestedOrGetEmpty
in interface DataSource
attrName
- name of the nested attribute to look forattrName
ConfigSource set(String attrName, Object v)
attrName
.set
in interface DataSource
attrName
- name of the attribute to set the value atv
- the value Object
to setConfigSource setNested(String attrName, DataSource v)
attrName
.setNested
in interface DataSource
attrName
- name of the attribute to set the nested value atv
- the nested value to setConfigSource setAll(DataSource other)
other
into itself.setAll
in interface DataSource
other
- the other ConfigSource
to setConfigSource remove(String attrName)
attrName
.remove
in interface DataSource
attrName
- name of the attribute to removeConfigSource deepCopy()
deepCopy
in interface DataSource
ConfigSource
instance that is deep-copied from itselfConfigSource merge(DataSource other)
ConfigSource
into itself.merge
in interface DataSource
other
- the other ConfigSource
to mergeConfigSource
is merged