@ConsumerType
public interface ResourceDecorator
Resource
s returned by
the ResourceResolver
.
Typical use cases for a decorator are
- overwrite resource type/resource super type (for example
based on the resource path)
- add metadataModifier and Type | Method and Description |
---|---|
@Nullable Resource |
decorate(@NotNull Resource resource)
Decorate a resource.
|
@Nullable Resource |
decorate(@NotNull Resource resource,
@NotNull javax.servlet.http.HttpServletRequest request)
Deprecated.
since 2.3.0 (and JCR Resource 2.1.0), this method will not be invoked.
|
@Nullable @Nullable Resource decorate(@NotNull @NotNull Resource resource)
null
is considered the same as
returning the original resource.resource
- The resource to decorate@Deprecated @Nullable @Nullable Resource decorate(@NotNull @NotNull Resource resource, @NotNull @NotNull javax.servlet.http.HttpServletRequest request)
null
is considered the same as
returning the original resource.resource
- The resource to decoraterequest
- The current request.Copyright © 2022 The Apache Software Foundation. All rights reserved.