class DefaultResourceTransformerChain extends java.lang.Object implements ResourceTransformerChain
ResourceTransformerChain
.Modifier and Type | Field and Description |
---|---|
private ResourceTransformerChain |
nextChain |
private ResourceResolverChain |
resolverChain |
private ResourceTransformer |
transformer |
Constructor and Description |
---|
DefaultResourceTransformerChain(ResourceResolverChain resolverChain,
java.util.List<ResourceTransformer> transformers) |
DefaultResourceTransformerChain(ResourceResolverChain resolverChain,
ResourceTransformer transformer,
ResourceTransformerChain chain) |
Modifier and Type | Method and Description |
---|---|
ResourceResolverChain |
getResolverChain()
Return the
ResourceResolverChain that was used to resolve the
Resource being transformed. |
private DefaultResourceTransformerChain |
initTransformerChain(ResourceResolverChain resolverChain,
java.util.ArrayList<ResourceTransformer> transformers) |
Resource |
transform(HttpServletRequest request,
Resource resource)
Transform the given resource.
|
private final ResourceResolverChain resolverChain
@Nullable private final ResourceTransformer transformer
@Nullable private final ResourceTransformerChain nextChain
public DefaultResourceTransformerChain(ResourceResolverChain resolverChain, @Nullable java.util.List<ResourceTransformer> transformers)
public DefaultResourceTransformerChain(ResourceResolverChain resolverChain, @Nullable ResourceTransformer transformer, @Nullable ResourceTransformerChain chain)
private DefaultResourceTransformerChain initTransformerChain(ResourceResolverChain resolverChain, java.util.ArrayList<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 fails