|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.struts2.osgi.OsgiConfigurationProvider
public class OsgiConfigurationProvider
Struts package provider that starts the OSGi container and deelgates package loading
Constructor Summary | |
---|---|
OsgiConfigurationProvider()
|
Method Summary | |
---|---|
void |
bundleChanged(org.osgi.framework.BundleEvent bundleEvent)
Listens to bundle event to load/unload config |
void |
destroy()
|
void |
init(com.opensymphony.xwork2.config.Configuration configuration)
|
protected void |
loadConfigFromBundle(org.osgi.framework.Bundle bundle)
Loads XML config as well as Convention config from a bundle Limitation: Constants and Beans are ignored on XML config |
void |
loadPackages()
|
boolean |
needsReload()
|
protected void |
onBundleStopped(org.osgi.framework.Bundle bundle)
This method is called when a bundle is stopped, so the config that is related to it is removed |
void |
setBundleAccessor(BundleAccessor acc)
|
void |
setFileManagerFactory(com.opensymphony.xwork2.FileManagerFactory fmFactory)
|
void |
setObjectFactory(com.opensymphony.xwork2.ObjectFactory factory)
|
void |
setServletContext(javax.servlet.ServletContext servletContext)
|
void |
setVelocityManager(VelocityManager vm)
|
protected boolean |
shouldProcessBundle(org.osgi.framework.Bundle bundle)
Checks for "Struts2-Enabled" header in the bundle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OsgiConfigurationProvider()
Method Detail |
---|
public void init(com.opensymphony.xwork2.config.Configuration configuration) throws com.opensymphony.xwork2.config.ConfigurationException
init
in interface com.opensymphony.xwork2.config.PackageProvider
com.opensymphony.xwork2.config.ConfigurationException
public void loadPackages() throws com.opensymphony.xwork2.config.ConfigurationException
loadPackages
in interface com.opensymphony.xwork2.config.PackageProvider
com.opensymphony.xwork2.config.ConfigurationException
protected void loadConfigFromBundle(org.osgi.framework.Bundle bundle)
protected boolean shouldProcessBundle(org.osgi.framework.Bundle bundle)
public boolean needsReload()
needsReload
in interface com.opensymphony.xwork2.config.PackageProvider
public void setObjectFactory(com.opensymphony.xwork2.ObjectFactory factory)
public void setBundleAccessor(BundleAccessor acc)
public void setVelocityManager(VelocityManager vm)
public void setServletContext(javax.servlet.ServletContext servletContext)
public void setFileManagerFactory(com.opensymphony.xwork2.FileManagerFactory fmFactory)
public void destroy()
public void bundleChanged(org.osgi.framework.BundleEvent bundleEvent)
bundleChanged
in interface org.osgi.framework.BundleListener
protected void onBundleStopped(org.osgi.framework.Bundle bundle)
bundle
- the bundle that stopped
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |