Class OsgiUtils
java.lang.Object
org.apache.directory.api.util.OsgiUtils
Utilities for OSGi environments and embedding OSGi containers.
- Author:
- Apache Directory Project
-
Method Summary
Modifier and TypeMethodDescriptiongetAllBundleExports(FileFilter filter, Set<String> pkgs) All the packages that are exported from all bundles found on the system classpath.static StringgetBundleExports(File bundle) Gets the attribute value for the Export-Bundle OSGi Manifest Attribute.getClasspathCandidates(FileFilter filter) Get the files that fits a given filtersplitIntoPackages(String exports, Set<String> pkgs) Splits a Package-Export OSGi Manifest Attribute value into packages while stripping away the key/value properties.
-
Method Details
-
getAllBundleExports
All the packages that are exported from all bundles found on the system classpath. The provided filter if not null is used to prune classpath elements. Any uses terms found are stripped from the bundles.- Parameters:
filter- The filter to use on the filespkgs- The set of packages to use- Returns:
- All the exported packages of all bundles on the classpath.
-
splitIntoPackages
Splits a Package-Export OSGi Manifest Attribute value into packages while stripping away the key/value properties.- Parameters:
exports- The Package-Export OSGi Manifest Attribute value.pkgs- The set that will contain the found packages.- Returns:
- The set of exported packages without properties.
-
getClasspathCandidates
Get the files that fits a given filter- Parameters:
filter- The filter in use- Returns:
- The set of Files that match the filter
-
getBundleExports
Gets the attribute value for the Export-Bundle OSGi Manifest Attribute.- Parameters:
bundle- The absolute path to a file bundle.- Returns:
- The value as it appears in the Manifest, as a comma delimited list of packages with possible "uses" phrases appended to each package or null if the attribute does not exist.
-