Class AbstractCustomTemplatesSpringConfiguration
java.lang.Object
graphql.mavenplugin_notscannedbyspring.AbstractSpringConfiguration
graphql.mavenplugin_notscannedbyspring.AbstractCustomTemplatesSpringConfiguration
- Direct Known Subclasses:
CustomTemplates_Client_SpringConfiguration
,CustomTemplates_Server_SpringConfiguration
public abstract class AbstractCustomTemplatesSpringConfiguration
extends AbstractSpringConfiguration
Base Spring configuration for Custom template test Extends
AbstractSpringConfiguration
to configure
GraphQLConfigurationTestHelper
with the customized templates Customized templates are generated previous to
test execution by copying default templates at src/main/resources/templates to
target/test-classes/templates_personalization- Author:
- ggomez
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractCustomTemplatesSpringConfiguration
(com.graphql_java_generator.plugin.conf.PluginMode mode) -
Method Summary
Modifier and TypeMethodDescriptionbuildTemplates
(com.graphql_java_generator.plugin.CodeTemplateScope scope) Helper method to build customize templates map for given scope The customized templates are located at src/test/resources/templates_personalization AlsoCodeTemplateScope.COMMON
templates are addedprotected void
Generates custom templates from origin templates for the test Copies from src/main/resources/templates to target/test-classes/templates_personalization and changes "Generated by the default template from graphql-java-generator", to be changed by "This template is custom /"Resolves the name the filename of the tempaltes for the test scopeMethods inherited from class graphql.mavenplugin_notscannedbyspring.AbstractSpringConfiguration
addSpecificConfigurationParameterValue
-
Field Details
-
templatePattern
Pattern for default templates -
customScalars
-
codeTemplateScope
protected com.graphql_java_generator.plugin.CodeTemplateScope codeTemplateScope
-
-
Constructor Details
-
AbstractCustomTemplatesSpringConfiguration
protected AbstractCustomTemplatesSpringConfiguration(com.graphql_java_generator.plugin.conf.PluginMode mode)
-
-
Method Details
-
buildTemplates
protected Map<String,String> buildTemplates(com.graphql_java_generator.plugin.CodeTemplateScope scope) Helper method to build customize templates map for given scope The customized templates are located at src/test/resources/templates_personalization AlsoCodeTemplateScope.COMMON
templates are added- Parameters:
scope
-- Returns:
-
copyAndCustomizeTemplates
protected void copyAndCustomizeTemplates()Generates custom templates from origin templates for the test Copies from src/main/resources/templates to target/test-classes/templates_personalization and changes "Generated by the default template from graphql-java-generator", to be changed by "This template is custom /" -
getTemplesInScope
Resolves the name the filename of the tempaltes for the test scope- Returns:
-