Class AzureRawFunction
java.lang.Object
io.micronaut.starter.feature.function.AbstractFunctionFeature
io.micronaut.starter.feature.function.azure.AbstractAzureFunction
io.micronaut.starter.feature.function.azure.AzureRawFunction
- 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.enabled",
value="true",
defaultValue="true")
@Singleton
public class AzureRawFunction
extends AbstractAzureFunction
Feature implementation for a raw Azure Function in Micronaut.
Provides configuration and setup for using Azure Functions without the HTTP abstraction, including dependency management, test generation, and integration with the Azure HTTP function feature.
-
Field Summary
Fields inherited from class io.micronaut.starter.feature.function.azure.AbstractAzureFunction
ARTIFACT_ID_AZURE_FUNCTIONS_JAVA_LIBRARY, GROUP_ID_COM_MICROSOFT_AZURE_FUNCTIONS, NAME
Fields inherited from interface io.micronaut.starter.feature.MicronautRuntimeFeature
PROPERTY_MICRONAUT_RUNTIME
Fields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
ConstructorsConstructorDescriptionAzureRawFunction
(CoordinateResolver coordinateResolver, AzureHttpFunction httpFunction) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addDependencies
(ModuleContext module, Options options) Adds the necessary dependencies for Azure Functions.protected void
applyFunction
(GeneratorContext generatorContext, ApplicationType type) Applies the function setup based on the application type.protected void
applyTestTemplate
(GeneratorContext generatorContext, Project project, String name) Applies the test templates to the module.getFrameworkDocumentation
(GeneratorContext generatorContext) getThirdPartyDocumentation
(GeneratorContext generatorContext) void
processSelectedFeatures
(FeatureContext featureContext) If this method is called for a given feature then that feature was explicitly selected or was included by default as a result ofDefaultFeature.shouldApply(io.micronaut.starter.options.Options, java.util.Set)
.protected Optional<com.fizzed.rocker.RockerModel>
readmeTemplate
(GeneratorContext generatorContext, Project project, BuildTool buildTool) Returns the README template for this function feature, if any.Methods inherited from class io.micronaut.starter.feature.function.azure.AbstractAzureFunction
addAzureFunctionsJavaLibraryDependency, addFunctionTemplate, apply, getBuildCommand, getDescription, getName, getRunCommand, getTitle, groovyJUnitTemplate, javaJUnitTemplate, koTestTemplate, kotlinJUnitTemplate, spockTemplate
Methods inherited from class io.micronaut.starter.feature.function.AbstractFunctionFeature
getTestSuffix, groovyControllerTemplate, javaControllerTemplate, kotlinControllerTemplate
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.starter.feature.function.azure.AzureCloudFeature
getCloud
Methods inherited from interface io.micronaut.starter.feature.function.azure.AzureMicronautRuntimeFeature
resolveMicronautRuntime
Methods inherited from interface io.micronaut.core.naming.Described
getDescription
Methods inherited from interface io.micronaut.projectgen.core.feature.Feature
getOrder, isCommunity, isPreview, isVisible
Methods inherited from interface io.micronaut.starter.feature.function.FunctionFeature
getCategory, supports
Methods inherited from interface io.micronaut.starter.feature.MicronautRuntimeFeature
addMicronautRuntimeBuildProperty
-
Constructor Details
-
AzureRawFunction
-
-
Method Details
-
processSelectedFeatures
Description copied from interface:Feature
If this method is called for a given feature then that feature was explicitly selected or was included by default as a result ofDefaultFeature.shouldApply(io.micronaut.starter.options.Options, java.util.Set)
. This method can be implemented to allow features to modify the list of features that will apply to the project. The methodsFeatureContext.addFeature(Feature)
andFeatureContext.exclude(FeaturePredicate)
are the primary ways to add and remove features from the context.FeatureContext.isPresent(Class)
can be used to determine the existence of other features in order to make decisions.- Parameters:
featureContext
- The feature context
-
applyTestTemplate
Description copied from class:AbstractFunctionFeature
Applies the test templates to the module. Subclasses may override to customize the test generation logic.- Overrides:
applyTestTemplate
in classAbstractFunctionFeature
- Parameters:
generatorContext
- the generator contextproject
- the projectname
- the name of the test class
-
applyFunction
Description copied from class:AbstractFunctionFeature
Applies the function setup based on the application type. Subclasses may override to customize how function templates and dependencies are applied.- Overrides:
applyFunction
in classAbstractFunctionFeature
- Parameters:
generatorContext
- the generator contexttype
- the application type
-
readmeTemplate
protected Optional<com.fizzed.rocker.RockerModel> readmeTemplate(GeneratorContext generatorContext, Project project, BuildTool buildTool) Description copied from class:AbstractFunctionFeature
Returns the README template for this function feature, if any. Subclasses may override to provide custom documentation.- Overrides:
readmeTemplate
in classAbstractFunctionFeature
- Parameters:
generatorContext
- the generator contextproject
- the projectbuildTool
- the build tool used- Returns:
- an optional Rocker model for the README
-
getFrameworkDocumentation
- 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
-
getThirdPartyDocumentation
- Parameters:
generatorContext
- Generator Context- Returns:
- Returns a link to third party. E.g. https://hazelcast.org
-
addDependencies
Description copied from class:AbstractAzureFunction
Adds the necessary dependencies for Azure Functions. Subclasses may override to customize dependency handling.- Overrides:
addDependencies
in classAbstractAzureFunction
- Parameters:
module
- The module context to which dependencies will be addedoptions
- The selected options including build tool
-