org.apache.muse.core.platform.osgi.util
Class BundleRootHelper

java.lang.Object
  extended by org.apache.muse.core.platform.osgi.util.BundleRootHelper

public class BundleRootHelper
extends Object

BundleRootHelper allows bundles to specify a file system root for use in loading persistence data, etc.

Author:
Joel Hawkins (joelh)

Constructor Summary
BundleRootHelper()
           
 
Method Summary
static String getContextForBundle(org.osgi.framework.Bundle bundle)
          returns the registerd file system root
static File getRootForBundle(org.osgi.framework.Bundle bundle)
          returns the registerd file system root
static void registerContext(org.osgi.framework.Bundle bundle, String context)
          registers a Muse context (from the manifest)for a particular bundle
static void registerRoot(org.osgi.framework.Bundle bundle, File root)
          registers a File System root for a particular bundle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BundleRootHelper

public BundleRootHelper()
Method Detail

registerRoot

public static void registerRoot(org.osgi.framework.Bundle bundle,
                                File root)
registers a File System root for a particular bundle

Parameters:
bundle -
root -

registerContext

public static void registerContext(org.osgi.framework.Bundle bundle,
                                   String context)
registers a Muse context (from the manifest)for a particular bundle

Parameters:
bundle -
root -

getRootForBundle

public static File getRootForBundle(org.osgi.framework.Bundle bundle)
returns the registerd file system root

Parameters:
bundle -
Returns:
the root File registered for the specified bundle, or null if the bundle did not register a file system root
See Also:
Axis2Environment.getRealDirectory()

getContextForBundle

public static String getContextForBundle(org.osgi.framework.Bundle bundle)
returns the registerd file system root

Parameters:
bundle -
Returns:
the context registered for the specified bundle, or null if the bundle did not register a context


Copyright © 2005-2011 Apache Web Services - Muse. All Rights Reserved.