public class TemplateAvailabilityProviders extends Object
TemplateAvailabilityProvider
beans that can be used to check
which (if any) templating engine supports a given view. Caches responses unless the
spring.template.provider.cache
property is set to false
.Modifier | Constructor and Description |
---|---|
|
TemplateAvailabilityProviders(ApplicationContext applicationContext)
Create a new
TemplateAvailabilityProviders instance. |
|
TemplateAvailabilityProviders(ClassLoader classLoader)
Create a new
TemplateAvailabilityProviders instance. |
protected |
TemplateAvailabilityProviders(Collection<? extends TemplateAvailabilityProvider> providers)
Create a new
TemplateAvailabilityProviders instance. |
Modifier and Type | Method and Description |
---|---|
TemplateAvailabilityProvider |
getProvider(String view,
ApplicationContext applicationContext)
Get the provider that can be used to render the given view.
|
TemplateAvailabilityProvider |
getProvider(String view,
Environment environment,
ClassLoader classLoader,
ResourceLoader resourceLoader)
Get the provider that can be used to render the given view.
|
List<TemplateAvailabilityProvider> |
getProviders()
Return the underlying providers being used.
|
public TemplateAvailabilityProviders(ApplicationContext applicationContext)
TemplateAvailabilityProviders
instance.applicationContext
- the source application contextpublic TemplateAvailabilityProviders(ClassLoader classLoader)
TemplateAvailabilityProviders
instance.classLoader
- the source class loaderprotected TemplateAvailabilityProviders(Collection<? extends TemplateAvailabilityProvider> providers)
TemplateAvailabilityProviders
instance.providers
- the underlying providerspublic List<TemplateAvailabilityProvider> getProviders()
public TemplateAvailabilityProvider getProvider(String view, ApplicationContext applicationContext)
view
- the view to renderapplicationContext
- the application contextTemplateAvailabilityProvider
or nullpublic TemplateAvailabilityProvider getProvider(String view, Environment environment, ClassLoader classLoader, ResourceLoader resourceLoader)
view
- the view to renderenvironment
- the environmentclassLoader
- the class loaderresourceLoader
- the resource loaderTemplateAvailabilityProvider
or null