Package org.springframework.web.servlet.resource

# Interface ResourceTransformerChain

public interface ResourceTransformerChain
A contract for invoking a chain of `ResourceTransformers` where each resolver is given a reference to the chain allowing it to delegate when necessary.

Since:
  4.1
Author:
  Rossen Stoyanchev

## Method Summary

Modifier and Type
Method
Description
`ResourceResolverChain`
`getResolverChain()`
Return the `ResourceResolverChain` that was used to resolve the `Resource` being transformed.
`org.springframework.core.io.Resource`
`transform(HttpServletRequest request, org.springframework.core.io.Resource resource)`
Transform the given resource.

## Method Details

### getResolverChain

ResourceResolverChain getResolverChain()
Return the `ResourceResolverChain` that was used to resolve the `Resource` being transformed. This may be needed for resolving related resources, for example, links to other resources.

### transform

org.springframework.core.io.Resource transform(HttpServletRequest request, org.springframework.core.io.Resource resource) throws IOException
Transform the given resource.

Parameters:
  `request` - the current request
  `resource` - the candidate resource to transform
Returns:
  the transformed or the same resource, never `null`
Throws:
  `IOException` - if transformation fails