org.apache.struts2.osgi
Class OsgiUtil

java.lang.Object
  extended by org.apache.struts2.osgi.OsgiUtil

public class OsgiUtil
extends java.lang.Object


Constructor Summary
OsgiUtil()
           
 
Method Summary
static boolean containsBean(java.lang.Object beanFactory, java.lang.String beanId)
          Calls containsBean on the passed object using refelection.
static java.lang.Object getBean(java.lang.Object beanFactory, java.lang.String beanId)
          Calls getBean() on the passed object using refelection.
static java.net.URL translateBundleURLToJarURL(java.net.URL bundleUrl, org.osgi.framework.Bundle bundle)
          A bundle is a jar, and a bunble URL will be useless to clients, this method translates a URL to a resource inside a bundle from "bundle:something/path" to "jar:file:bundlelocation!/path"
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OsgiUtil

public OsgiUtil()
Method Detail

translateBundleURLToJarURL

public static java.net.URL translateBundleURLToJarURL(java.net.URL bundleUrl,
                                                      org.osgi.framework.Bundle bundle)
                                               throws java.net.MalformedURLException
A bundle is a jar, and a bunble URL will be useless to clients, this method translates a URL to a resource inside a bundle from "bundle:something/path" to "jar:file:bundlelocation!/path"

Throws:
java.net.MalformedURLException

getBean

public static java.lang.Object getBean(java.lang.Object beanFactory,
                                       java.lang.String beanId)
Calls getBean() on the passed object using refelection. Used on Spring context because they are loaded from bundles (in anothe class loader)


containsBean

public static boolean containsBean(java.lang.Object beanFactory,
                                   java.lang.String beanId)
Calls containsBean on the passed object using refelection. Used on Spring context because they are loaded from bundles (in anothe class loader)



Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.