Class AzureHttpFunction

All Implemented Interfaces:
io.micronaut.core.naming.Described, io.micronaut.core.naming.Named, io.micronaut.core.order.Ordered, Feature, AzureCloudFeature, AzureMicronautRuntimeFeature, CloudFeature, FunctionFeature, MicronautRuntimeFeature

@Requires(property="micronaut.starter.feature.azure.function.http.enabled", value="true", defaultValue="true") @Singleton public class AzureHttpFunction extends AbstractAzureFunction implements Feature
Feature implementation for Azure HTTP Functions support in Micronaut applications.

Adds the necessary dependencies for Azure HTTP Function runtime and testing, and provides templates for generating test classes in Java, Kotlin, Groovy, and KoTest.

  • Field Details

  • Constructor Details

  • Method Details

    • getName

      @NonNull public @NonNull String getName()
      Description copied from interface: Feature
      The name of the feature. It must be unique.
      Specified by:
      getName in interface Feature
      Specified by:
      getName in interface io.micronaut.core.naming.Named
      Overrides:
      getName in class AbstractAzureFunction
      Returns:
      the name of the feature
    • isVisible

      public boolean isVisible()
      Description copied from interface: Feature
      Some features should not be visible to the user because they are a common parent of other selectable features, or they should always be applied, or any other reason.
      Specified by:
      isVisible in interface Feature
      Returns:
      True if the feature should be able to be selected by the user
    • javaJUnitTemplate

      protected com.fizzed.rocker.RockerModel javaJUnitTemplate(Project project)
      Description copied from class: AbstractAzureFunction
      Returns the Java JUnit template for the Azure Function.
      Overrides:
      javaJUnitTemplate in class AbstractAzureFunction
      Parameters:
      project - The project metadata
      Returns:
      The RockerModel for Java JUnit
    • kotlinJUnitTemplate

      protected com.fizzed.rocker.RockerModel kotlinJUnitTemplate(Project project)
      Description copied from class: AbstractAzureFunction
      Returns the Kotlin JUnit template for the Azure Function.
      Overrides:
      kotlinJUnitTemplate in class AbstractAzureFunction
      Parameters:
      project - The project metadata
      Returns:
      The RockerModel for Kotlin JUnit
    • groovyJUnitTemplate

      protected com.fizzed.rocker.RockerModel groovyJUnitTemplate(Project project)
      Description copied from class: AbstractAzureFunction
      Returns the Groovy JUnit template for the Azure Function.
      Overrides:
      groovyJUnitTemplate in class AbstractAzureFunction
      Parameters:
      project - The project metadata
      Returns:
      The RockerModel for Groovy JUnit
    • koTestTemplate

      protected com.fizzed.rocker.RockerModel koTestTemplate(Project project)
      Description copied from class: AbstractAzureFunction
      Returns the Kotest template for the Azure Function.
      Overrides:
      koTestTemplate in class AbstractAzureFunction
      Parameters:
      project - The project metadata
      Returns:
      The RockerModel for Kotest
    • spockTemplate

      public com.fizzed.rocker.RockerModel spockTemplate(Project project)
      Description copied from class: AbstractAzureFunction
      Returns the Spock template for the Azure Function.
      Overrides:
      spockTemplate in class AbstractAzureFunction
      Parameters:
      project - The project metadata
      Returns:
      The RockerModel for Spock
    • addFunctionTemplate

      protected void addFunctionTemplate(ModuleContext module, GeneratorContext generatorContext, Options options, Project project)
      Description copied from class: AbstractAzureFunction
      Adds the Azure Function trigger template for the selected language, if the application type is FUNCTION and no other code-contributing feature is selected. Subclasses may override to customize template logic.
      Overrides:
      addFunctionTemplate in class AbstractAzureFunction
      Parameters:
      module - The module context
      generatorContext - The generator context containing project and feature info
      options - The selected options including build tool and language
      project - The project metadata
    • getFrameworkDocumentation

      public String getFrameworkDocumentation(GeneratorContext generatorContext)
      Specified by:
      getFrameworkDocumentation in interface Feature
      Parameters:
      generatorContext - Generator Context
      Returns:
      Returns a link to Framework documentation about the feature. eg. https://micronaut-projects.github.io/micronaut-cache/latest/guide/index.html#hazelcast
    • addDependencies

      protected void addDependencies(ModuleContext module, Options options)
      Description copied from class: AbstractAzureFunction
      Adds the necessary dependencies for Azure Functions. Subclasses may override to customize dependency handling.
      Overrides:
      addDependencies in class AbstractAzureFunction
      Parameters:
      module - The module context to which dependencies will be added
      options - The selected options including build tool