Contents: MashupHub API Reference : Mashup Center 2.0
The fundamental extension components of a plugin, the editor, generation and collection components, are implementations of corresponding interfaces. The recommended practice is to implement each as a separate class. The interfaces that correspond to these components are the following:
- IEditor - defines methods invoked by the MashupHub framework to enable an editor extension component to render a user interface for creating or editing catalog objects. A base class, BaseEditor implements this interface and can be subclassed by editor extension components.
- IGenerator - defines methods to enable a generator extension component to respond to client requests to generate feeds or download files. A base class, BaseGenerator - implements this interface and can be subclassed by generator extension components.
- ICollection - defines methods to enable a collection extension component to provide the standard CRUD+F operations: create, read, update, delete, and find.
- Plugin class - Each plug- in also must have a subclass of Plugin. to implement activation and deactivation processing. There is a default instance of this base class automatically provided by MashupHub, so a plug-in writer needs to provide a specialized subclass only if custom activation or deactivation processing is required.
An editor is a class the implements the IEditor interface and creates a user interface to define a new object, such as a feed, widget, mashup page, mashup space or service.
A generator is a class that implements the IGenerator interface to generate a response appropriate to the object type of the plug-in. For a feed data source, it returns an Atom feed. For a REST service, it returns a REST response document and for mashup artifacts like mashup pages and widgets, it returns the binary object.
A collection extension is a class that implements the ICollection interface to handle Atom Publishing Protocol and OpenSearch operations on objects of the type managed by the plugin.
User Interface Helper Classes The plugin framework provides helper classes to aid editor components in showing their user interfaces. These are called ViewBeans, and are used by user interface components, like Java Server Pages (JSP), to communicate model data with the server components of the plug-in. They allow attributes to be defined, set and read and provide other utility aids. MashupHub provides a set of ViewBeans to address basic JSP approaches, AJAX interactions and commonly used Web forms.
Extension component general helper classes
The plugin framework also provides helper classes to simplify development and promote consistency with the system plugins.
- provides services for collection extensions components that are handling APP requests. Services include checking and establishing Access Control Lists, and building searches.
Parent topic: Plugin interfaces : Mashup Center 2.0