Class CustomProductVersionSorter

java.lang.Object
io.bdeploy.api.plugin.v1.CustomProductVersionSorter

public class CustomProductVersionSorter extends Object
Provides a custom sorting algorithm for product versions.

CustomProductVersionSorter in global plugins are ignored. Only per-product plugins are allowed to contribute one CustomProductVersionSorter. If a product ships multiple plugins with a CustomProductVersionSorter, the behavior is undefined (i.e. one of the versions is used).

The CustomProductVersionSorter implementation is always taken from the plugin with the highest version number. This is independent of the product version number, as the CustomProductVersionSorter is the one determining the highest version number.

  • Constructor Details

    • CustomProductVersionSorter

      public CustomProductVersionSorter(Comparator<String> sorter)
  • Method Details

    • getSorter

      public Comparator<String> getSorter()
      Returns:
      an instance of a Java Comparator which is used on the server side for sorting. This field is only available on the server which loaded the plugin.