class ExtensionPointContext<A extends Action> extends InvokationContext<A>
Modifier and Type | Field and Description |
---|---|
private ClientContext |
clientContext |
private ErrorHandler<? super A> |
errorHandler |
private ErrorHandlerFactory<? super A> |
errorHandlerFactory |
private Registry.RegisteredExtensionPoint<A> |
extensionPoint |
private boolean |
hasCreatedRenderer |
private Registry |
registry |
private Renderer<? super A> |
renderer |
Constructor and Description |
---|
ExtensionPointContext(Registry registry,
ClientContext clientContext,
Registry.RegisteredExtensionPoint<A> extensionPoint,
ErrorHandlerFactory<? super A> errorHandlerFactory) |
Modifier and Type | Method and Description |
---|---|
protected void |
clearError()
Clear the registered error for the current extension or extension point.
|
protected A[] |
getActions()
Always null, since this is an extension point context.
|
Object |
getAttribute(String name)
Always null, since this is an extension point context.
|
ClassLoader |
getClassLoader()
The class loader is the class loader that loaded the action
class of the extension point.
|
ClientContext |
getClientContext()
Get the client context that was passed to the
Registry.useExtensions(ClientContext, ExtensionsFilter, String...) |
protected ErrorHandler<? super A> |
getErrorHandler()
Get the error handler used in this context.
|
Extension<A> |
getExtension()
Always null, since this is an extension point context.
|
ExtensionPoint<? super A> |
getExtensionPoint()
Get information about the extension point.
|
protected Registry |
getRegistry()
Get the registry where this invokation originated from.
|
protected Renderer<? super A> |
getRenderer()
If the extension point defines a renderer factory, creates
a new renderer unless one already exists.
|
private void |
handleError(String message,
Throwable t) |
protected void |
prepareRendererFactory()
Prepare the renderer factory if the extension or extension
point has one.
|
protected void |
setError(A action,
Throwable t)
Register an error for the current extension or extension point.
|
private final ClientContext clientContext
private final Registry registry
private final Registry.RegisteredExtensionPoint<A extends Action> extensionPoint
private final ErrorHandlerFactory<? super A extends Action> errorHandlerFactory
private boolean hasCreatedRenderer
private ErrorHandler<? super A extends Action> errorHandler
ExtensionPointContext(Registry registry, ClientContext clientContext, Registry.RegisteredExtensionPoint<A> extensionPoint, ErrorHandlerFactory<? super A> errorHandlerFactory)
public ClientContext getClientContext()
InvokationContext
Registry.useExtensions(ClientContext, ExtensionsFilter, String...)
method.getClientContext
in class InvokationContext<A extends Action>
public ExtensionPoint<? super A> getExtensionPoint()
InvokationContext
getExtensionPoint
in class InvokationContext<A extends Action>
public Extension<A> getExtension()
getExtension
in class InvokationContext<A extends Action>
public ClassLoader getClassLoader()
getClassLoader
in class InvokationContext<A extends Action>
public Object getAttribute(String name)
getAttribute
in class InvokationContext<A extends Action>
name
- The name of the attributeRegistry.getAttribute(String, String)
protected Registry getRegistry()
InvokationContext
getRegistry
in class InvokationContext<A extends Action>
protected void prepareRendererFactory()
InvokationContext
prepareRendererFactory
in class InvokationContext<A extends Action>
protected Renderer<? super A> getRenderer()
getRenderer
in class InvokationContext<A extends Action>
protected A[] getActions()
getActions
in class InvokationContext<A extends Action>
protected void setError(A action, Throwable t)
InvokationContext
Registry.getLastExtensionError(String)
and Registry.getLastExtensionPointError(String)
setError
in class InvokationContext<A extends Action>
action
- The action that caused the errort
- The errorprotected void clearError()
InvokationContext
clearError
in class InvokationContext<A extends Action>
protected ErrorHandler<? super A> getErrorHandler()
InvokationContext
getErrorHandler
in class InvokationContext<A extends Action>