@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 |
---|---|
Resource |
decorate(Resource resource)
Decorate a resource.
|
Resource |
decorate(Resource resource,
javax.servlet.http.HttpServletRequest request)
Deprecated.
since 2.3.0 (and JCR Resource 2.1.0), this method will not be invoked.
|
@CheckForNull Resource decorate(@Nonnull Resource resource)
null
is considered the same as
returning the original resource.resource
- The resource to decorate@Deprecated @CheckForNull Resource decorate(@Nonnull Resource resource, @Nonnull javax.servlet.http.HttpServletRequest request)
null
is considered the same as
returning the original resource.resource
- The resource to decoraterequest
- The current request.Copyright © 2018 The Apache Software Foundation. All rights reserved.