org.apache.sling.launchpad.testservices.resource
Class TestResourceDecorator

java.lang.Object
  extended by org.apache.sling.launchpad.testservices.resource.TestResourceDecorator
All Implemented Interfaces:
ResourceDecorator

@Service
public class TestResourceDecorator
extends Object
implements ResourceDecorator

Test ResourceDecorator that sets a specific resource type for resources having a path that starts with /testing + simple name of this class + /


Constructor Summary
TestResourceDecorator()
           
 
Method Summary
 Resource decorate(Resource resource)
          Decorate a resource.
 Resource decorate(Resource resource, javax.servlet.http.HttpServletRequest request)
          Decorate a resource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestResourceDecorator

public TestResourceDecorator()
Method Detail

decorate

public Resource decorate(Resource resource,
                         javax.servlet.http.HttpServletRequest request)
Description copied from interface: ResourceDecorator
Decorate a resource. If the service decorates the resource it should return the new resource. If the service does not want to decorate the resource, it should return the original resource. Returning null is considered the same as returning the original resource.

Specified by:
decorate in interface ResourceDecorator
Parameters:
resource - The resource to decorate
request - The current request.
Returns:
The decorated resource, the original resource or null.

decorate

public Resource decorate(Resource resource)
Description copied from interface: ResourceDecorator
Decorate a resource. If the service decorates the resource it should return the new resource. If the service does not want to decorate the resource, it should return the original resource. Returning null is considered the same as returning the original resource.

Specified by:
decorate in interface ResourceDecorator
Parameters:
resource - The resource to decorate
Returns:
The decorated resource, the original resource or null.


Copyright © 2007-2013 The Apache Software Foundation. All Rights Reserved.