static class Registry.RegisteredExtensionPoint<A extends Action> extends Object implements ExtensionPoint<A>
Modifier and Type | Field and Description |
---|---|
private Class<A> |
actionClass |
private boolean |
allowRendererOverride |
private ClassLoader |
classLoader |
private String |
description |
private ErrorHandlerFactory<? super A> |
errorHandlerFactory |
private Map<String,Registry.RegisteredExtension<A>> |
extensions |
private String |
id |
private Throwable |
lastError |
private A |
lastErrorAction |
private String |
name |
private RendererFactory<? super A> |
rendererFactory |
Constructor and Description |
---|
RegisteredExtensionPoint(ExtensionPoint<A> ep,
ClassLoader classLoader)
Create a new registered extension point by copying the
information from the parameter.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
addExtension(Registry.RegisteredExtension<A> extension)
Add an extension to this extension point.
|
boolean |
allowRendererOverride()
If an extension is allowed to override the renderer factory with an
implementation of its own.
|
(package private) void |
clearError() |
Class<A> |
getActionClass()
Get the class object that represents the type of action that
can be added to this extension point.
|
(package private) ClassLoader |
getClassLoader() |
String |
getDescription()
Get a description of the extension point.
|
ErrorHandlerFactory<? super A> |
getErrorHandlerFactory()
Get the error handler factory that should be used with this
extension point.
|
(package private) Collection<Registry.RegisteredExtension<A>> |
getExtensions()
Get all extensions registered with this extension point.
|
String |
getId()
Get the ID of the extension point.
|
(package private) Throwable |
getLastError() |
String |
getName()
Get the name of the extension point.
|
RendererFactory<? super A> |
getRendererFactory()
This is an optional factory for creating
Renderer
instances. |
(package private) void |
removeExtension(String id)
Remove the extension with a given ID.
|
(package private) void |
setError(A action,
Throwable t) |
String |
toString() |
(package private) void |
update(ExtensionPoint<A> ep,
ClassLoader classLoader)
Update the registered information.
|
private final String id
private final Map<String,Registry.RegisteredExtension<A extends Action>> extensions
private String name
private String description
private RendererFactory<? super A extends Action> rendererFactory
private boolean allowRendererOverride
private ErrorHandlerFactory<? super A extends Action> errorHandlerFactory
private ClassLoader classLoader
private Throwable lastError
RegisteredExtensionPoint(ExtensionPoint<A> ep, ClassLoader classLoader)
public String getId()
ExtensionPoint
getId
in interface ExtensionPoint<A extends Action>
public String getName()
ExtensionPoint
getName
in interface ExtensionPoint<A extends Action>
public String getDescription()
ExtensionPoint
getDescription
in interface ExtensionPoint<A extends Action>
public Class<A> getActionClass()
ExtensionPoint
Action
interface. Extensions that are extending this
extension point must provide an ActionFactory
that is capable
of creating instances of the specified class.getActionClass
in interface ExtensionPoint<A extends Action>
public RendererFactory<? super A> getRendererFactory()
ExtensionPoint
Renderer
instances. Renderers are not a required part of the extension
system, but will make it easier to write the code for extension
points.getRendererFactory
in interface ExtensionPoint<A extends Action>
public boolean allowRendererOverride()
ExtensionPoint
allowRendererOverride
in interface ExtensionPoint<A extends Action>
public ErrorHandlerFactory<? super A> getErrorHandlerFactory()
ExtensionPoint
getErrorHandlerFactory
in interface ExtensionPoint<A extends Action>
void update(ExtensionPoint<A> ep, ClassLoader classLoader)
void addExtension(Registry.RegisteredExtension<A> extension)
void removeExtension(String id)
Collection<Registry.RegisteredExtension<A>> getExtensions()
ClassLoader getClassLoader()
void clearError()
Throwable getLastError()