I have an existing PortObject implementation which is in use by my current nodes and workflows already, let's call it AncientPortObject. Due to necessary changes and improvements I need a new implementation of this PortObject, let's call it ImprovedPortObject. The improvements are completely internal, and both PortObjects expose the same API, so they are basically interchangable from a receiving node's perspective.
Now, I would like existing nodes to accept input from AncientPortObject and ImprovedPortObject as well.
My idea was the following:
- Add an abstract class or interface PhilippsAbstractPortObject which is implemented by the old and new port objects and pull up the common API
- Change existing nodes so that they require the PhilippsAbstractPortObject as input now instead of AncientPortObject, so they are able to handle the old and the new format
- Newly implemented nodes produce ImprovedPortObject instances
Until here, things seemed logical. After implementing my changes however, I get the following error when starting KNIME:
ERROR ModalContext PortTypeRegistry CODING PROBLEM Port object class 'blabla.PhilippsAbstractPortObject' is not registered at the extension point org.knime.core.PortType.
So, I obviously I need to register the PhilippsAbstractPortObject in the extension point. No big deal. But, I notice, the extension point wants me to register *Serializer classes as well. That doesn't make sense to me, as I would never serialize/deserialize the PhilippsAbstractPortObject itself.
So, taking one step back and a deep breath I have some general doubts: Is this idea on addressing things reasonable at all? Is this a stupid idea to handle my issue? Any suggestions or best practices?
-- Philipp