public class XmlExtensionModelLoader extends ExtensionModelLoader
ExtensionModelLoader
for those plugins that have an ID that matches with DESCRIBER_ID
,
which implies that are extensions built through XML.Modifier and Type | Field and Description |
---|---|
static String |
DESCRIBER_ID
The ID which represents
this loader that will be used to execute the lookup when reading the descriptor file. |
static String |
RESOURCE_DECLARATION
Attribute to look for in the parametrized attributes picked up from the descriptor.
|
static String |
RESOURCE_XML
Attribute to look for in the parametrized attributes picked up from the descriptor.
|
static String |
VALIDATE_XML
Attribute to look for in the parametrized attributes picked up from the descriptor.
|
Constructor and Description |
---|
XmlExtensionModelLoader() |
Modifier and Type | Method and Description |
---|---|
protected void |
configureContextBeforeDeclaration(ExtensionLoadingContext context)
Allows to add pre configured the given
context before it's fed into ExtensionModelLoader.declareExtension(ExtensionLoadingContext) . |
protected void |
declareExtension(ExtensionLoadingContext context)
This method uses the
ExtensionDeclarer found through ExtensionLoadingContext.getExtensionDeclarer()
to define the ExtensionModel to be loaded. |
String |
getId() |
loadExtensionModel
public static final String RESOURCE_XML
public static final String VALIDATE_XML
public static final String RESOURCE_DECLARATION
MetadataType
of all public static final String DESCRIBER_ID
this
loader that will be used to execute the lookup when reading the descriptor file.public String getId()
getId
in class ExtensionModelLoader
ExtensionModelLoader
. Non null neither blank.
The ID must be unique among all ExtensionModelLoader
.protected void declareExtension(ExtensionLoadingContext context)
ExtensionModelLoader
ExtensionDeclarer
found through ExtensionLoadingContext.getExtensionDeclarer()
to define the ExtensionModel
to be loaded.
IMPORTANT: When this method is executed, the runtime automatically sets the current thread's context classloader
to ExtensionLoadingContext.getExtensionClassLoader()
. The previous TCCL is restored after this method's execution.
This method should only be invoked by the runtime. Do not invoke manually.
declareExtension
in class ExtensionModelLoader
context
- the context that will be used for the declarationprotected void configureContextBeforeDeclaration(ExtensionLoadingContext context)
context
before it's fed into ExtensionModelLoader.declareExtension(ExtensionLoadingContext)
.
This is the ideal place to register custom parameters, enrichers, validators, etc.configureContextBeforeDeclaration
in class ExtensionModelLoader
context
- the context that will be used for the declarationCopyright © 2018. All rights reserved.