Overview
Several approaches are possible:
- Create a super-interface, CatalogPlugin, that contains all the method signatures needed for any plugin. Have an abstract base class, CatalogPluginImpl, that has a "pass-through" implementation for each method. Extend the abstract base for a new plugin.
- Create an interface, CatalogPlugin, that conforms to the Catalog Framework but does not directly implement it. If the Catalog Framework need to change or grow, an intermediate adapter can transform requests into a format the CatalogPlugin expects and understands.
In either case, the ordering problem can be solved using one of the following strategies:
- Have the CatalogPlugin expose data that can be used for sorting plugin execution in the correct order. Make this configurable via blueprint.
- Allow a collection of CatalogPlugin's be composed into a single, CompoundPlugin, which can be configured as needed (i.e. execute child plugins in order, etc) via blueprint.