public interface ExtensionPoint<A extends Action>
Action it is possible to add to it. This
is done with the
getActionClass(). It is also possible
to define a default render class and if an extension is allowed
to override it or not.
Extension points can, for example, be created:
- Programmatically, using
- Loaded from extension definition XML files using a
- Or, in any other way by providing a custom implementation of this interface
Before extension points can be used the must be registered with
Registry.registerExtensionPoint(ExtensionPoint, ClassLoader). Extensions to
an extension point are registered in the same registry with
Registry.registerExtension(Extension, ClassLoader). To load and use all
registered extensions use
Registry.useExtensions(ClientContext, ExtensionsFilter, String...).
Modifier and Type Method Description
()If an extension is allowed to override the renderer factory with an implementation of its own.
()Get the class object that represents the type of action that can be added to this extension point.
()Get a description of the extension point.
ErrorHandlerFactory<? super A>
()Get the error handler factory that should be used with this extension point.
()Get the ID of the extension point.
()Get the name of the extension point.
RendererFactory<? super A>
()This is an optional factory for creating
getIdString getId()Get the ID of the extension point.
- A non-null unique identifier value
getNameString getName()Get the name of the extension point. This is just for display purposes and the value is optional. If no name is given the ID can be used instead.
getDescriptionString getDescription()Get a description of the extension point. This value is optional but we recommend that the description contains a text documenting the extension point and has information that is useful for everyone who wants to implement extensions for the extension point. This should include context specific information.
- An optional description
getActionClassGet the class object that represents the type of action that can be added to this extension point. The class must implement the
Actioninterface. Extensions that are extending this extension point must provide an
ActionFactorythat is capable of creating instances of the specified class.
- The class of the actions that can be used on this extension point (required)
getRendererFactoryThis is an optional factory for creating
Rendererinstances. Renderers are not a required part of the extension system, but will make it easier to write the code for extension points.
- A renderer factory or null
allowRendererOverrideboolean allowRendererOverride()If an extension is allowed to override the renderer factory with an implementation of its own. This can be seen as a possibility where extensions can create their own look and feel. If strict compliance is needed overriding should of course not be allowed.
- TRUE to allow extensions to override, FALSE otherwise
getErrorHandlerFactoryGet the error handler factory that should be used with this extension point.
- An error handler factory, or null to use the system default