Is it posible to add properties to the properties file and use them from the plugin?--My scenario is a communication platform and aI want to configure in the properties file origin and destination of the plugin's messages.
You received this message because you are subscribed to the Google Groups "pf4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pf4j+uns...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I need to add two properties for every plugin in my application. That means, in the plugin initialization I need to set two properties for a messaging functionality between plugins in my application.I solved creating a new PluginDescriptorFinder which reads these properties and extending PluginDescriptor. I also override
protected ExtensionFactory createExtensionFactory() and protected PluginDescriptorFinder createPluginDescriptorFinder() in the DefaultPluginManager
Do you think it could be useful to have a FlexiblePluginDescriptor to have dynamic load of properties?. It would use a Map to store properties and could set default properties as it is doing now and extra properties in the Map.
It could be a
ExtendedPluginDescriptor with the methods getProperty(String key) setProperty(String key, Object value)
and a ExtendedPluginDescriptorFinder to set it.