/walkingkooka-plugin

Plugins are components that satisfy an interface

Primary LanguageJavaApache License 2.0Apache-2.0

Build Status Coverage Status License Language grade: Java Total alerts J2CL compatible

walkingkooka-plugin

Plugins are components that satisfy an interface and may be retrieved by a PluginName from a PluginProvider. The primary goal of a PluginProvider is to JAR FILE supporting hot redeployment mostly controlled by the user via some admin type console or UI. There are many Provider(s) in other repos they defer mostly in that they are always present on the classpath and not dynamically discoverable or provided.

A selector is a simple text based expression that is intended to select a plugin-component by name and optional parameters.

An example is that of a SpreadsheetFormatterSelector which can be used to select any available SpreadsheetFormatter.

  • automatic
  • date-format-pattern yyyy/mm/dd
  • date-time-format-pattern yyyy/mm/dd hh:mm:ss
  • number-format-pattern 0.00
  • text-format-pattern @
  • time-format-pattern hh:mm:ss

Selectors are composed of a mini language which supports the following features with examples.

  • $environment-value May be used to retrieve a environment including the enclosing SpreadsheetMetadata
  • string literals, eg: "Hello123"
  • double literals, eg: 2.5
  • plugin-component-by-name This is useful for assembling compound components, eg
    • color-formatter 1 text-format-pattern("@")
    • link-formatter https://example.com text-format-pattern("@") create a link using the provided url with the value formatted using text-format pattern "@".