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 TypeMethodDescriptionvoidaddChannelConversion(ChannelConversion channelConversion) voidaddMapping(Mapping mapping) voidaddProperty(String key, Object value) voidaddRequiredPlatform(Platform platform) voidexcludeChannelConversion(ChannelConversion channelConversion) voidexcludeMapping(Mapping mapping) voidexcludeRequiredPlatform(Platform platform) Provides theChannelConversions shipped with this instance.Provides theChannelConversions excluded by this instance.Provides theMappings excluded by this instance.Provides the requiredPlatforms excluded by this instance.Provides theMappings shipped with this instance.Provides thePlatforms required by this instance.static <T> voidChecks and casts the givenObject.static DynamicPluginLoads a YAML file of the following format:voidsetProperties(Configuration configuration) Provides relevantConfigurationproperties.
-
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 castedounless it isnull
-
addRequiredPlatform
-
excludeRequiredPlatform
-
getRequiredPlatforms
Description copied from interface:PluginProvides thePlatforms required by this instance.- Specified by:
getRequiredPlatformsin interfacePlugin- Returns:
- the
Platforms
-
getExcludedRequiredPlatforms
Description copied from interface:PluginProvides the requiredPlatforms excluded by this instance.- Specified by:
getExcludedRequiredPlatformsin interfacePlugin- Returns:
- the
Platforms
-
addMapping
-
excludeMapping
-
getMappings
Description copied from interface:PluginProvides theMappings shipped with this instance.- Specified by:
getMappingsin interfacePlugin- Returns:
- the
Mappings
-
getExcludedMappings
Description copied from interface:PluginProvides theMappings excluded by this instance.- Specified by:
getExcludedMappingsin interfacePlugin- Returns:
- the
Mappings
-
addChannelConversion
-
excludeChannelConversion
-
getChannelConversions
Description copied from interface:PluginProvides theChannelConversions shipped with this instance.- Specified by:
getChannelConversionsin interfacePlugin- Returns:
- the
ChannelConversions
-
getExcludedChannelConversions
Description copied from interface:PluginProvides theChannelConversions excluded by this instance.- Specified by:
getExcludedChannelConversionsin interfacePlugin- Returns:
- the
ChannelConversions
-
addProperty
-
setProperties
Description copied from interface:PluginProvides relevantConfigurationproperties.- Specified by:
setPropertiesin interfacePlugin- Parameters:
configuration- accepts the properties
-