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 Details

    • templatePattern

      protected static final Pattern templatePattern
      Pattern for default templates
    • customScalars

      protected static List<com.graphql_java_generator.plugin.conf.CustomScalarDefinition> 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 Also CodeTemplateScope.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

      protected List<String> getTemplesInScope()
      Resolves the name the filename of the tempaltes for the test scope
      Returns: