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, NAMEFields inherited from interface io.micronaut.starter.feature.MicronautRuntimeFeature
PROPERTY_MICRONAUT_RUNTIMEFields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsConstructorDescriptionAzureRawFunction(CoordinateResolver coordinateResolver, AzureHttpFunction httpFunction) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddDependencies(ModuleContext module, Options options) Adds the necessary dependencies for Azure Functions.protected voidapplyFunction(GeneratorContext generatorContext, ApplicationType type) Applies the function setup based on the application type.protected voidapplyTestTemplate(GeneratorContext generatorContext, Project project, String name) Applies the test templates to the module.getFrameworkDocumentation(GeneratorContext generatorContext) getThirdPartyDocumentation(GeneratorContext generatorContext) voidprocessSelectedFeatures(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, spockTemplateMethods inherited from class io.micronaut.starter.feature.function.AbstractFunctionFeature
getTestSuffix, groovyControllerTemplate, javaControllerTemplate, kotlinControllerTemplateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.starter.feature.function.azure.AzureCloudFeature
getCloudMethods inherited from interface io.micronaut.starter.feature.function.azure.AzureMicronautRuntimeFeature
resolveMicronautRuntimeMethods inherited from interface io.micronaut.core.naming.Described
getDescriptionMethods inherited from interface io.micronaut.projectgen.core.feature.Feature
getOrder, isCommunity, isPreview, isVisibleMethods inherited from interface io.micronaut.starter.feature.function.FunctionFeature
getCategory, supportsMethods inherited from interface io.micronaut.starter.feature.MicronautRuntimeFeature
addMicronautRuntimeBuildProperty
-
Constructor Details
-
AzureRawFunction
-
-
Method Details
-
processSelectedFeatures
Description copied from interface:FeatureIf 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:AbstractFunctionFeatureApplies the test templates to the module. Subclasses may override to customize the test generation logic.- Overrides:
applyTestTemplatein classAbstractFunctionFeature- Parameters:
generatorContext- the generator contextproject- the projectname- the name of the test class
-
applyFunction
Description copied from class:AbstractFunctionFeatureApplies the function setup based on the application type. Subclasses may override to customize how function templates and dependencies are applied.- Overrides:
applyFunctionin 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:AbstractFunctionFeatureReturns the README template for this function feature, if any. Subclasses may override to provide custom documentation.- Overrides:
readmeTemplatein 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:AbstractAzureFunctionAdds the necessary dependencies for Azure Functions. Subclasses may override to customize dependency handling.- Overrides:
addDependenciesin classAbstractAzureFunction- Parameters:
module- The module context to which dependencies will be addedoptions- The selected options including build tool
-