Class WeldPortableExtensions

java.lang.Object
org.jboss.as.weld.deployment.WeldPortableExtensions

@Deprecated public class WeldPortableExtensions extends Object
Deprecated.
Use WeldCapability to get access to the functionality of this class.
Container class that is attached to the top level deployment that holds all portable and build compatible extensions metadata.

A CDI extension may be available to multiple deployment class loaders, however for each PE we only want to register a single instance.

This container provides a mechanism for making sure that only a single PE/BCE of a given type is registered.

Author:
Stuart Douglas
  • Field Details

    • ATTACHMENT_KEY

      public static final org.jboss.as.server.deployment.AttachmentKey<WeldPortableExtensions> ATTACHMENT_KEY
      Deprecated.
  • Constructor Details

    • WeldPortableExtensions

      public WeldPortableExtensions()
      Deprecated.
  • Method Details

    • getPortableExtensions

      public static WeldPortableExtensions getPortableExtensions(org.jboss.as.server.deployment.DeploymentUnit deploymentUnit)
      Deprecated.
    • tryRegisterExtension

      public void tryRegisterExtension(Class<?> extensionClass, org.jboss.as.server.deployment.DeploymentUnit deploymentUnit) throws org.jboss.as.server.deployment.DeploymentUnitProcessingException
      Deprecated.
      Throws:
      org.jboss.as.server.deployment.DeploymentUnitProcessingException
    • registerExtensionInstance

      public void registerExtensionInstance(jakarta.enterprise.inject.spi.Extension extension, org.jboss.as.server.deployment.DeploymentUnit deploymentUnit)
      Deprecated.
    • registerBuildCompatibleExtension

      public void registerBuildCompatibleExtension(Class<? extends jakarta.enterprise.inject.build.compatible.spi.BuildCompatibleExtension> extension)
      Deprecated.
    • registerLiteExtensionTranslatorIfNeeded

      public void registerLiteExtensionTranslatorIfNeeded(Function<List<Class<? extends jakarta.enterprise.inject.build.compatible.spi.BuildCompatibleExtension>>,jakarta.enterprise.inject.spi.Extension> extensionCreator, org.jboss.as.server.deployment.DeploymentUnit deploymentUnit) throws org.jboss.weld.exceptions.IllegalArgumentException
      Deprecated.
      If there was at least one build compatible extension discovered or registered, this method will add a portable extension allowing their execution. It is a no-op if there are no build compatible extensions.
      Parameters:
      extensionCreator - a function that can create an instance of the {LiteExtensionTranslator} from given collection of found BCEs
      Throws:
      org.jboss.weld.exceptions.IllegalArgumentException - if the deployment unit parameter equals null
    • getExtensions

      public Collection<org.jboss.weld.bootstrap.spi.Metadata<jakarta.enterprise.inject.spi.Extension>> getExtensions()
      Deprecated.
    • getBuildCompatibleExtensions

      public List<Class<? extends jakarta.enterprise.inject.build.compatible.spi.BuildCompatibleExtension>> getBuildCompatibleExtensions()
      Deprecated.