public abstract class AbstractSdkResolverProvider extends JavaTemplateEntity
connectorModel, NAME_MEMBER, outputDir, runConfiguration, VALUE_MEMBER| Constructor and Description |
|---|
AbstractSdkResolverProvider(Path outputDir,
com.mulesoft.connectivity.rest.sdk.internal.connectormodel.ConnectorModel connectorModel,
RestSdkRunConfiguration runConfiguration) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addConfigureEvaluationContextMethod(com.squareup.javapoet.TypeSpec.Builder classBuilder) |
protected void |
addParameterFieldsIfNeeded(com.squareup.javapoet.TypeSpec.Builder classBuilder)
Adds all the bound parameters - as
isBoundParameter(com.mulesoft.connectivity.rest.sdk.templating.sdk.parameter.SdkParameter) indicates - to the classBuilder as @Parameters. |
void |
applyTemplates() |
protected abstract void |
buildClass(com.squareup.javapoet.TypeSpec.Builder classBuilder)
Allows extending the default value provider class building
|
protected void |
generateClass() |
protected abstract List<SdkParameter> |
getAllParameters()
Returns all the parameters - regardless of its type - for this value resolver.
|
protected abstract String |
getEvaluationContextKind()
Returns the kind os evaluation context that need to be build (i.e.
|
abstract String |
getJavaClassName() |
abstract String |
getPackage() |
protected abstract com.squareup.javapoet.TypeName |
getSuperClass()
Returns the super class the generated value provider will extend.
|
protected abstract boolean |
isBoundParameter(SdkParameter sdkParameter)
Indicates if a
Parameter from the parent operation of the value
provider is necessary for this value provider to resolve the available values. |
generateGetter, generateOptionalGetter, getConstantStringField, getJavaFileBuilderForClass, getJavaType, getResourcesPath, getSourcesPath, writeClassToFile, writeJavaFilegetTemplateEnginepublic AbstractSdkResolverProvider(Path outputDir, com.mulesoft.connectivity.rest.sdk.internal.connectormodel.ConnectorModel connectorModel, RestSdkRunConfiguration runConfiguration)
public abstract String getPackage()
public abstract String getJavaClassName()
public void applyTemplates()
throws TemplatingException
applyTemplates in class TemplateEntityTemplatingExceptionprotected void generateClass()
throws TemplatingException
TemplatingExceptionprotected abstract com.squareup.javapoet.TypeName getSuperClass()
protected abstract void buildClass(com.squareup.javapoet.TypeSpec.Builder classBuilder)
protected abstract boolean isBoundParameter(SdkParameter sdkParameter)
Parameter from the parent operation of the value
provider is necessary for this value provider to resolve the available values. If this method says is necessary, a @Parameter
will be generated in the value provider class. When that @Parameter is generated in the value provider, it is mandatory for
it to have an assigned value in the DSL for the resolver to be executed.sdkParameter - The parameter that is being checkedprotected abstract List<SdkParameter> getAllParameters()
protected abstract String getEvaluationContextKind()
protected void addParameterFieldsIfNeeded(com.squareup.javapoet.TypeSpec.Builder classBuilder)
isBoundParameter(com.mulesoft.connectivity.rest.sdk.templating.sdk.parameter.SdkParameter) indicates - to the classBuilder as @Parameters.protected void addConfigureEvaluationContextMethod(com.squareup.javapoet.TypeSpec.Builder classBuilder)
Copyright © 2021. All rights reserved.