From cdf3eadc9509b84f6b1d9039342dd74a98a5a3fa Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Mon, 17 Apr 2017 22:12:44 -0700 Subject: [PATCH] Rename AbstractTemplateAvailabilityProvider Rename `AbstractTemplateAvailabilityProvider` to `PathBasedTemplateAvailabilityProvider`. Closes gh-8913 --- .../freemarker/FreeMarkerTemplateAvailabilityProvider.java | 4 ++-- .../template/GroovyTemplateAvailabilityProvider.java | 4 ++-- ...der.java => PathBasedTemplateAvailabilityProvider.java} | 7 ++++--- .../velocity/VelocityTemplateAvailabilityProvider.java | 4 ++-- 4 files changed, 10 insertions(+), 9 deletions(-) rename spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/template/{AbstractTemplateAvailabilityProvider.java => PathBasedTemplateAvailabilityProvider.java} (94%) diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerTemplateAvailabilityProvider.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerTemplateAvailabilityProvider.java index 041e0ebff1..55849cf9ce 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerTemplateAvailabilityProvider.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerTemplateAvailabilityProvider.java @@ -20,7 +20,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import org.springframework.boot.autoconfigure.template.AbstractTemplateAvailabilityProvider; +import org.springframework.boot.autoconfigure.template.PathBasedTemplateAvailabilityProvider; import org.springframework.boot.autoconfigure.template.TemplateAvailabilityProvider; /** @@ -31,7 +31,7 @@ import org.springframework.boot.autoconfigure.template.TemplateAvailabilityProvi * @since 1.1.0 */ public class FreeMarkerTemplateAvailabilityProvider - extends AbstractTemplateAvailabilityProvider { + extends PathBasedTemplateAvailabilityProvider { public FreeMarkerTemplateAvailabilityProvider() { super("freemarker.template.Configuration", diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/groovy/template/GroovyTemplateAvailabilityProvider.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/groovy/template/GroovyTemplateAvailabilityProvider.java index 9039eea10f..fbc55fe7f5 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/groovy/template/GroovyTemplateAvailabilityProvider.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/groovy/template/GroovyTemplateAvailabilityProvider.java @@ -20,7 +20,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import org.springframework.boot.autoconfigure.template.AbstractTemplateAvailabilityProvider; +import org.springframework.boot.autoconfigure.template.PathBasedTemplateAvailabilityProvider; import org.springframework.boot.autoconfigure.template.TemplateAvailabilityProvider; /** @@ -31,7 +31,7 @@ import org.springframework.boot.autoconfigure.template.TemplateAvailabilityProvi * @since 1.1.0 */ public class GroovyTemplateAvailabilityProvider - extends AbstractTemplateAvailabilityProvider { + extends PathBasedTemplateAvailabilityProvider { public GroovyTemplateAvailabilityProvider() { super("groovy.text.TemplateEngine", GroovyTemplateAvailabilityProperties.class, diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/template/AbstractTemplateAvailabilityProvider.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/template/PathBasedTemplateAvailabilityProvider.java similarity index 94% rename from spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/template/AbstractTemplateAvailabilityProvider.java rename to spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/template/PathBasedTemplateAvailabilityProvider.java index 52134122c0..5079b660ec 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/template/AbstractTemplateAvailabilityProvider.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/template/PathBasedTemplateAvailabilityProvider.java @@ -27,13 +27,14 @@ import org.springframework.core.io.ResourceLoader; import org.springframework.util.ClassUtils; /** - * Abstract base class for {@link TemplateAvailabilityProvider} implementations. + * Abstract base class for {@link TemplateAvailabilityProvider} implementations that find + * templates from paths. * * @author Andy Wilkinson * @author Phillip Webb * @since 1.4.6 */ -public abstract class AbstractTemplateAvailabilityProvider +public abstract class PathBasedTemplateAvailabilityProvider implements TemplateAvailabilityProvider { private final String className; @@ -42,7 +43,7 @@ public abstract class AbstractTemplateAvailabilityProvider private final String propertyPrefix; - public AbstractTemplateAvailabilityProvider(String className, + public PathBasedTemplateAvailabilityProvider(String className, Class propertiesClass, String propertyPrefix) { this.className = className; diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/velocity/VelocityTemplateAvailabilityProvider.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/velocity/VelocityTemplateAvailabilityProvider.java index 37e71ae8a4..7c7839e311 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/velocity/VelocityTemplateAvailabilityProvider.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/velocity/VelocityTemplateAvailabilityProvider.java @@ -20,7 +20,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import org.springframework.boot.autoconfigure.template.AbstractTemplateAvailabilityProvider; +import org.springframework.boot.autoconfigure.template.PathBasedTemplateAvailabilityProvider; import org.springframework.boot.autoconfigure.template.TemplateAvailabilityProvider; /** @@ -34,7 +34,7 @@ import org.springframework.boot.autoconfigure.template.TemplateAvailabilityProvi */ @Deprecated public class VelocityTemplateAvailabilityProvider - extends AbstractTemplateAvailabilityProvider { + extends PathBasedTemplateAvailabilityProvider { public VelocityTemplateAvailabilityProvider() { super("org.apache.velocity.app.VelocityEngine",