repo1.maven.org$maven2@org.apache.sling$org.apache.sling.api@2.1.0
repo1.maven.org$maven2@org.apache.sling$org.apache.sling.api@2.1.0@org$apache$sling$api$resource$ResourceDecorator.java
file
oh
o
[]
package org.apache.sling.api.resource;
Optional services to decorate
Resources returned by
the
ResourceResolver.
Use cases for a decorator are
- overwrite resource type/resource super type (for example
based on the resource path)
- add metadata
Decorate a resource.
If the service decorates the resource it should return
the new resource. IF the servie does not want to decorate
the resource, it should return the original resource.
Returning
null is considered the same as
returning the original resource.
- Parameters:
resource The resource to decorate- Returns:
- The decorated resource or the original resource.
Decorate a resource.
If the service decorates the resource it should return
the new resource. IF the servie does not want to decorate
the resource, it should return the original resource.
Returning
null is considered the same as
returning the original resource.
- Parameters:
resource The resource to decoraterequest The current request.- Returns:
- The decorated resource or the original resource.