Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.struts2.osgi
Class OsgiConfigurationProvider

    java.lang.Object
      org.apache.struts2.osgi.OsgiConfigurationProvider

All Implemented Interfaces:
  PackageProvider, EventListener, org.osgi.framework.BundleListener

    public class OsgiConfigurationProvider

extends Object
implements PackageProvider, org.osgi.framework.BundleListener

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
`protected com.opensymphony.xwork2.ActionContext` | `createActionContext()`
`void` | `destroy()`
`void` | `init(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

### OsgiConfigurationProvider

    public OsgiConfigurationProvider()

Method Detail

### init

    public void init(Configuration configuration)
              throws ConfigurationException

  Specified by:
    `init` in interface `PackageProvider`
  Throws:
    `ConfigurationException`

### loadPackages

    public void loadPackages()
                      throws ConfigurationException

  Specified by:
    `loadPackages` in interface `PackageProvider`
  Throws:
    `ConfigurationException`

### createActionContext

    protected com.opensymphony.xwork2.ActionContext createActionContext()

### loadConfigFromBundle

    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

### shouldProcessBundle

    protected boolean shouldProcessBundle(org.osgi.framework.Bundle bundle)

  Checks for "Struts2-Enabled" header in the bundle

### needsReload

    public boolean needsReload()

  Specified by:
    `needsReload` in interface `PackageProvider`

### setObjectFactory

    public void setObjectFactory(com.opensymphony.xwork2.ObjectFactory factory)

### setBundleAccessor

    public void setBundleAccessor(BundleAccessor acc)

### setVelocityManager

    public void setVelocityManager(VelocityManager vm)

### setServletContext

    public void setServletContext(javax.servlet.ServletContext servletContext)

### setFileManagerFactory

    public void setFileManagerFactory(com.opensymphony.xwork2.FileManagerFactory fmFactory)

### destroy

    public void destroy()

### bundleChanged

    public void bundleChanged(org.osgi.framework.BundleEvent bundleEvent)

  Listens to bundle event to load/unload config

  Specified by:
    `bundleChanged` in interface `org.osgi.framework.BundleListener`

### onBundleStopped

    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

  Parameters:
    `bundle` - the bundle that stopped

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000–2018 Apache Software Foundation. All rights reserved.