public class OsgiConfigurationProvider extends Object implements com.opensymphony.xwork2.config.PackageProvider, org.osgi.framework.BundleListener
Constructor and Description |
---|
OsgiConfigurationProvider() |
Modifier and Type | Method and Description |
---|---|
void |
bundleChanged(org.osgi.framework.BundleEvent bundleEvent)
Listens to bundle event to load/unload config
|
protected com.opensymphony.xwork2.ActionContext |
createActionContext() |
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
|
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 com.opensymphony.xwork2.ActionContext createActionContext()
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 stoppedCopyright © 2000-2013 Apache Software Foundation. All Rights Reserved.