com.ibm.xsp.webapp.resources
Class BundleResourceProvider

java.lang.Object
  extended by com.ibm.xsp.webapp.resources.AbstractResourceProvider
      extended by com.ibm.xsp.webapp.resources.URLResourceProvider
          extended by com.ibm.xsp.webapp.resources.BundleResourceProvider
All Implemented Interfaces:
ResourceProvider

public class BundleResourceProvider
extends URLResourceProvider

OSGi bundle resource provider. Loads a resource from an OSGI bundle.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.ibm.xsp.webapp.resources.URLResourceProvider
URLResourceProvider.URLResource
 
Nested classes/interfaces inherited from class com.ibm.xsp.webapp.resources.AbstractResourceProvider
AbstractResourceProvider.AbstractResource, AbstractResourceProvider.FileResource
 
Field Summary
 
Fields inherited from class com.ibm.xsp.webapp.resources.AbstractResourceProvider
BMP_FILE_EXT, BMP_MIME_TYPE, CSS_FILE_EXT, CSS_MIME_TYPE, GIF_FILE_EXT, GIF_MIME_TYPE, GZIP_EXCLUDE, JPEG_FILE_EXT, JPEG_MIME_TYPE, JPG_FILE_EXT, JS_FILE_EXT, JS_MIME_TYPE, MIN_GZIP_SIZE, PNG_FILE_EXT, PNG_MIME_TYPE, TXT_FILE_EXT, TXT_MIME_TYPE, XBL_FILE_EXT, XBL_MIME_TYPE, XUL_FILE_EXT, XUL_MIME_TYPE
 
Fields inherited from interface com.ibm.xsp.webapp.resources.ResourceProvider
DEFAULT_ENCODING, DEFAULT_GLOBAL_EXPIRES, DEFAULT_MODULE_EXPIRES, EXPIRES, IF_MODIFIED_SINCE, LAST_MODIFIED, PARAM_CACHE
 
Constructor Summary
BundleResourceProvider(org.osgi.framework.Bundle bundle, java.lang.String prefix)
          Constructor
 
Method Summary
 org.osgi.framework.Bundle getBundle()
          Returns the bundle that is linked to the resource provider
protected  java.net.URL getResourceURL(javax.servlet.http.HttpServletRequest request, java.lang.String name)
          Returns a URL to the bundle linked to the resource provider
 
Methods inherited from class com.ibm.xsp.webapp.resources.URLResourceProvider
addResource, getExpireTime, getResource
 
Methods inherited from class com.ibm.xsp.webapp.resources.AbstractResourceProvider
getDefaultExpireTime, getExpireProperty, getMimeType, isHttpCache, readExpirationProp, setExpireTime, shouldCacheResources
 
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,
                              java.lang.String prefix)
Constructor

Parameters:
{@link - org.osgi.framework.Bundle} bundle you are loading resources from
prefix - prefix for this resource provider to be identified
Method Detail

getBundle

public org.osgi.framework.Bundle getBundle()
Returns the bundle that is linked to the resource provider

Returns:
Bundle

getResourceURL

protected java.net.URL getResourceURL(javax.servlet.http.HttpServletRequest request,
                                      java.lang.String name)
Returns a URL to the bundle linked to the resource provider

Overrides:
getResourceURL in class URLResourceProvider
Returns:
URL