Example Morpheus DataSet Providers - How can the DataSet be used in an Option List and Input?

We adjust our Plugins to API V1.0.3 and want to get rid off the Morpheus Option Source Plugin, because we understand that this method is deprecated. Crack us, if this is wrong …

We want to use the very good example of various DataSet Providers found here:

The Plugin can be created successfully and we can integrate it in our Appliance. Unfortunately, we do not know where to find the DataSets now, since they are not represented within an Option List Type Plugin nor anywhere else. That is okay, since we never used an OptionType or OptionSource within our Plugin.

But now we are confused about the deprecated “Option Source” and the new DataSet Provider and how to replace the one with the other while getting the same result: an Option List Type Plugin with the data from the DataSet Providers.

Can anyone help with a solution and tell us how to integrate the solution within the above mentioned example, so that we do not need the “Option Source Plugin” anymore?

Hi Kai,

Once the plugin JAR is uploaded, each Dataset can be found in the UI or retrieved via the API like this:

UI:

[appliance-url]/options/[namespace]/[key] OR /options/[namespace].[key]

API:

[appliance-url]/api/options/[namespace].[key]

For the example plugin specifically, see the table below:

Provider Namespace Key UI API
CollectionDatasetProvider example collectionDatasetExample [appliance]/options/example/collectionDatasetExample
OR
[appliance]/options/example.collectionDatasetExample
[appliance]/api/options/example.collectionDatasetExample
ExternalApiDatasetProvider example externalApiDatasetExample /options/example/externalApiDatasetExample
/options/example.externalApiDatasetExample
/api/options/example.externalApiDatasetExample
PluginApiDatasetProvider example pluginApiDatasetExample /options/example/pluginApiDatasetExample
/options/example.pluginApiDatasetExample
/api/options/example.pluginApiDatasetExample

Additional information:

  • When creating a new option type, with the example in mind, your payload would look something like this:
  • To convert an existing OptionSourceProvider into a DatasetProvider, you need to ensure that:
    • Each method name returned in your OptionSourceProvider has its own DatasetProvider implementation e.g. if TestOptionSourceProvider.getMethodNames() returns ['test1', 'test2', 'test3'] then the DatasetProvider version of this is to split each method into its own class (so 3 Dataset Providers in comparison to the old style of a single Option Source Provider)

Let me know if you have any questions :laughing:

2 Likes

Hi Uthman,

Thank you for providing the very good explanation which is also the solution to my problem. I have tested it with my Plugin and it works well.

Cheers,
Kai

2 Likes