org.apache.sling.bundleresource.impl
Class BundleResourceProvider

java.lang.Object
  extended by org.apache.sling.bundleresource.impl.BundleResourceProvider
All Implemented Interfaces:
org.apache.sling.api.resource.ResourceProvider

public class BundleResourceProvider
extends Object
implements org.apache.sling.api.resource.ResourceProvider


Field Summary
 
Fields inherited from interface org.apache.sling.api.resource.ResourceProvider
OWNS_ROOTS, RESOURCE_TYPE_SYNTHETIC, ROOTS, SERVICE_NAME
 
Constructor Summary
BundleResourceProvider(org.osgi.framework.Bundle bundle, String rootList)
          Creates Bundle resource provider accessing entries in the given Bundle an supporting resources below root paths given by the rootList which is a comma (and whitespace) separated list of absolute paths.
 
Method Summary
 org.apache.sling.api.resource.Resource getResource(org.apache.sling.api.resource.ResourceResolver resourceResolver, javax.servlet.http.HttpServletRequest request, String path)
           
 org.apache.sling.api.resource.Resource getResource(org.apache.sling.api.resource.ResourceResolver resourceResolver, String path)
          Returns a BundleResource for the path if such an entry exists in the bundle of this provider.
 Iterator<org.apache.sling.api.resource.Resource> listChildren(org.apache.sling.api.resource.Resource parent)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BundleResourceProvider

public BundleResourceProvider(org.osgi.framework.Bundle bundle,
                              String rootList)
Creates Bundle resource provider accessing entries in the given Bundle an supporting resources below root paths given by the rootList which is a comma (and whitespace) separated list of absolute paths.

Method Detail

getResource

public org.apache.sling.api.resource.Resource getResource(org.apache.sling.api.resource.ResourceResolver resourceResolver,
                                                          javax.servlet.http.HttpServletRequest request,
                                                          String path)
Specified by:
getResource in interface org.apache.sling.api.resource.ResourceProvider

getResource

public org.apache.sling.api.resource.Resource getResource(org.apache.sling.api.resource.ResourceResolver resourceResolver,
                                                          String path)
Returns a BundleResource for the path if such an entry exists in the bundle of this provider. The JcrResourceResolver is ignored by this implementation.

Specified by:
getResource in interface org.apache.sling.api.resource.ResourceProvider

listChildren

public Iterator<org.apache.sling.api.resource.Resource> listChildren(org.apache.sling.api.resource.Resource parent)
                                                              throws org.apache.sling.api.SlingException
Specified by:
listChildren in interface org.apache.sling.api.resource.ResourceProvider
Throws:
org.apache.sling.api.SlingException


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