Package org.apache.wayang.core.plugin
Class DynamicPlugin
java.lang.Object
org.apache.wayang.core.plugin.DynamicPlugin
- All Implemented Interfaces:
Plugin
This
Plugin
can be arbitrarily customized.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addChannelConversion
(ChannelConversion channelConversion) void
addMapping
(Mapping mapping) void
addProperty
(String key, Object value) void
addRequiredPlatform
(Platform platform) void
excludeChannelConversion
(ChannelConversion channelConversion) void
excludeMapping
(Mapping mapping) void
excludeRequiredPlatform
(Platform platform) Provides theChannelConversion
s shipped with this instance.Provides theChannelConversion
s excluded by this instance.Provides theMapping
s excluded by this instance.Provides the requiredPlatform
s excluded by this instance.Provides theMapping
s shipped with this instance.Provides thePlatform
s required by this instance.static <T> void
Checks and casts the givenObject
.static DynamicPlugin
Loads a YAML file of the following format:void
setProperties
(Configuration configuration) Provides relevantConfiguration
properties.
-
Constructor Details
-
DynamicPlugin
public DynamicPlugin()
-
-
Method Details
-
loadYaml
Loads a YAML file of the following format:# mappings to be loaded by this plugin mappings: include: - <expression that evaluates to a Mapping instance or Collection of such> - ... exclude: - <expression that evaluates to a Mapping instance or Collection of such> - ... # channel conversions to be loaded by this plugin conversions: include: - <expression that evaulates to a ChannelConversion instance or Collection of such> - .. exclude: - <expression that evaulates to a ChannelConversion instance or Collection of such> - .. # properties configured by this plugin properties: <property name>: <property value> # required platforms platforms: include: - <expression that evaluates to a Platform instance or Collection of such> - .. exclude: - <expression that evaluates to a Platform instance or Collection of such> - ..
- Parameters:
yamlUrl
- an URL to a YAML file of the above format- Returns:
- the configured instance
- See Also:
-
ifPresent
- Parameters:
o
- to be castedt
- to that should be castedconsumer
- accepts the castedo
unless it isnull
-
addRequiredPlatform
-
excludeRequiredPlatform
-
getRequiredPlatforms
Description copied from interface:Plugin
Provides thePlatform
s required by this instance.- Specified by:
getRequiredPlatforms
in interfacePlugin
- Returns:
- the
Platform
s
-
getExcludedRequiredPlatforms
Description copied from interface:Plugin
Provides the requiredPlatform
s excluded by this instance.- Specified by:
getExcludedRequiredPlatforms
in interfacePlugin
- Returns:
- the
Platform
s
-
addMapping
-
excludeMapping
-
getMappings
Description copied from interface:Plugin
Provides theMapping
s shipped with this instance.- Specified by:
getMappings
in interfacePlugin
- Returns:
- the
Mapping
s
-
getExcludedMappings
Description copied from interface:Plugin
Provides theMapping
s excluded by this instance.- Specified by:
getExcludedMappings
in interfacePlugin
- Returns:
- the
Mapping
s
-
addChannelConversion
-
excludeChannelConversion
-
getChannelConversions
Description copied from interface:Plugin
Provides theChannelConversion
s shipped with this instance.- Specified by:
getChannelConversions
in interfacePlugin
- Returns:
- the
ChannelConversion
s
-
getExcludedChannelConversions
Description copied from interface:Plugin
Provides theChannelConversion
s excluded by this instance.- Specified by:
getExcludedChannelConversions
in interfacePlugin
- Returns:
- the
ChannelConversion
s
-
addProperty
-
setProperties
Description copied from interface:Plugin
Provides relevantConfiguration
properties.- Specified by:
setProperties
in interfacePlugin
- Parameters:
configuration
- accepts the properties
-