class DefaultResourceTransformerChain extends java.lang.Object implements ResourceTransformerChain
ResourceTransformerChain
for invoking
a list of ResourceTransformer
s.Modifier and Type | Field and Description |
---|---|
private int |
index |
private ResourceResolverChain |
resolverChain |
private java.util.List<ResourceTransformer> |
transformers |
Constructor and Description |
---|
DefaultResourceTransformerChain(ResourceResolverChain resolverChain,
java.util.List<ResourceTransformer> transformers) |
Modifier and Type | Method and Description |
---|---|
private ResourceTransformer |
getNext() |
ResourceResolverChain |
getResolverChain()
Return the
ResourceResolverChain that was used to resolve the
Resource being transformed. |
Resource |
transform(HttpServletRequest request,
Resource resource)
Transform the given resource.
|
private final ResourceResolverChain resolverChain
private final java.util.List<ResourceTransformer> transformers
private int index
public DefaultResourceTransformerChain(ResourceResolverChain resolverChain, java.util.List<ResourceTransformer> transformers)
public ResourceResolverChain getResolverChain()
ResourceTransformerChain
ResourceResolverChain
that was used to resolve the
Resource
being transformed. This may be needed for resolving
related resources, e.g. links to other resources.getResolverChain
in interface ResourceTransformerChain
public Resource transform(HttpServletRequest request, Resource resource) throws java.io.IOException
ResourceTransformerChain
transform
in interface ResourceTransformerChain
request
- the current requestresource
- the candidate resource to transformnull
java.io.IOException
- if transformation failsprivate ResourceTransformer getNext()