Search in sources :

Example 6 with ExtensionLoadingContext

use of org.mule.runtime.extension.api.loader.ExtensionLoadingContext in project mule by mulesoft.

the class ExtensionResourcesGeneratorAnnotationProcessor method getExtensionModelLoader.

@Override
protected ExtensionModelLoader getExtensionModelLoader() {
    return new DefaultJavaExtensionModelLoader() {

        @Override
        protected void configureContextBeforeDeclaration(ExtensionLoadingContext context) {
            super.configureContextBeforeDeclaration(context);
            context.addCustomDeclarationEnricher(new DescriptionDeclarationEnricher());
            context.addCustomValidator(new ExportedPackagesValidator());
        }
    };
}
Also used : ExportedPackagesValidator(org.mule.runtime.module.extension.internal.resources.validator.ExportedPackagesValidator) ExtensionLoadingContext(org.mule.runtime.extension.api.loader.ExtensionLoadingContext) DescriptionDeclarationEnricher(org.mule.runtime.module.extension.internal.capability.xml.description.DescriptionDeclarationEnricher) DefaultJavaExtensionModelLoader(org.mule.runtime.module.extension.api.loader.java.DefaultJavaExtensionModelLoader)

Example 7 with ExtensionLoadingContext

use of org.mule.runtime.extension.api.loader.ExtensionLoadingContext in project mule by mulesoft.

the class SoapExtensionResourcesGeneratorAnnotationProcessor method getExtensionModelLoader.

@Override
protected ExtensionModelLoader getExtensionModelLoader() {
    return new SoapExtensionModelLoader() {

        @Override
        protected void configureContextBeforeDeclaration(ExtensionLoadingContext context) {
            super.configureContextBeforeDeclaration(context);
            context.addCustomDeclarationEnricher(new DescriptionDeclarationEnricher());
        }
    };
}
Also used : SoapExtensionModelLoader(org.mule.runtime.module.extension.soap.api.loader.SoapExtensionModelLoader) ExtensionLoadingContext(org.mule.runtime.extension.api.loader.ExtensionLoadingContext) DescriptionDeclarationEnricher(org.mule.runtime.module.extension.internal.capability.xml.description.DescriptionDeclarationEnricher)

Aggregations

ExtensionLoadingContext (org.mule.runtime.extension.api.loader.ExtensionLoadingContext)7 ExtensionDeclarer (org.mule.runtime.api.meta.model.declaration.fluent.ExtensionDeclarer)3 DeclarationEnricherPhase (org.mule.runtime.extension.api.loader.DeclarationEnricherPhase)3 ExtensionTypeDescriptorModelProperty (org.mule.runtime.module.extension.internal.loader.java.type.property.ExtensionTypeDescriptorModelProperty)3 Optional (java.util.Optional)2 ClassTypeLoader (org.mule.metadata.api.ClassTypeLoader)2 MetadataType (org.mule.metadata.api.model.MetadataType)2 ObjectType (org.mule.metadata.api.model.ObjectType)2 ExtensionModel (org.mule.runtime.api.meta.model.ExtensionModel)2 ExtensionDeclaration (org.mule.runtime.api.meta.model.declaration.fluent.ExtensionDeclaration)2 SourceDeclaration (org.mule.runtime.api.meta.model.declaration.fluent.SourceDeclaration)2 IdempotentDeclarationWalker (org.mule.runtime.extension.api.declaration.fluent.util.IdempotentDeclarationWalker)2 ExtensionsTypeLoaderFactory (org.mule.runtime.extension.api.declaration.type.ExtensionsTypeLoaderFactory)2 DeclarationEnricher (org.mule.runtime.extension.api.loader.DeclarationEnricher)2 INITIALIZE (org.mule.runtime.extension.api.loader.DeclarationEnricherPhase.INITIALIZE)2 Type (org.mule.runtime.module.extension.api.loader.java.type.Type)2 DescriptionDeclarationEnricher (org.mule.runtime.module.extension.internal.capability.xml.description.DescriptionDeclarationEnricher)2 String.format (java.lang.String.format)1 Arrays.stream (java.util.Arrays.stream)1 HashMap (java.util.HashMap)1