public class FabClassPathResolver extends java.lang.Object implements FabConfiguration
| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<Filter<DependencyTree>> |
pruningFilters |
| Constructor and Description |
|---|
FabClassPathResolver(FabFacade connection,
java.util.Properties instructions,
java.util.Map<java.lang.String,java.lang.Object> embeddedResources) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addBundleClassPath(java.lang.String path) |
protected void |
addDependencies(DependencyTree tree) |
protected void |
addInstallDependencies(DependencyTree node) |
protected void |
addPackages(DependencyTree tree) |
protected void |
addPackagesRecursive(DependencyTree tree)
Recursively add all the package information for each node in the tree, before filtering takes place!
|
void |
addPruningFilter(Filter<DependencyTree> filter) |
protected void |
addSharedDependency(DependencyTree tree) |
java.util.Map<java.lang.String,DependencyTree> |
getDependenciesByPackage() |
java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> |
getExtraImportPackages() |
java.util.List<DependencyTree> |
getInstallDependencies() |
java.util.Collection<java.lang.String> |
getInstallFeatures() |
java.util.Collection<java.net.URI> |
getInstallFeatureURLs() |
java.util.jar.Manifest |
getManifest() |
java.lang.String |
getManifestProperty(java.lang.String name) |
java.util.List<DependencyTree> |
getNonSharedDependencies() |
java.util.List<DependencyTree> |
getOptionalDependencies() |
Filter<DependencyTree> |
getOptionalDependencyFilter()
Returns a Filter which returns true if the dependency should be treated as optional (and so excluded by default) or false if the dependency matches
the
ServiceConstants.INSTR_FAB_OPTIONAL_DEPENDENCY pattern |
DependencyTree |
getRootTree() |
java.util.List<DependencyTree> |
getSharedDependencies() |
java.lang.String |
getStringProperty(java.lang.String name) |
protected void |
importAllExportedPackages(DependencyTree dependencyTree) |
protected boolean |
includeSharedResources(DependencyTree tree)
If there are any matching shared resources using the current filters
then extract them from the jar and create a new jar to be added to the Bundle-ClassPath
containing the shared resources; which are then added to the flat class path to avoid
breaking the META-INF/services contracts
|
protected boolean |
isExcludedDependency(DependencyTree child) |
protected boolean |
isIncludedOptionaDependency(DependencyTree child) |
protected boolean |
isInstallProvidedBundleDependencies()
Get the value of the
ServiceConstants.INSTR_FAB_INSTALL_PROVIDED_BUNDLE_DEPENDENCIES |
boolean |
isOffline() |
boolean |
isProcessImportPackages() |
protected boolean |
isSharedOrRequired(DependencyTree child) |
protected void |
processFabInstructions() |
void |
resolve() |
protected void |
resolveExtensions(DependencyTree root,
Filter<org.sonatype.aether.graph.Dependency> excludeDependencyFilter) |
protected final java.util.List<Filter<DependencyTree>> pruningFilters
public FabClassPathResolver(FabFacade connection, java.util.Properties instructions, java.util.Map<java.lang.String,java.lang.Object> embeddedResources)
public void resolve()
throws org.sonatype.aether.RepositoryException,
java.io.IOException,
org.osgi.framework.BundleException
org.sonatype.aether.RepositoryExceptionjava.io.IOExceptionorg.osgi.framework.BundleExceptionprotected void processFabInstructions()
public java.util.List<DependencyTree> getInstallDependencies()
public java.util.List<DependencyTree> getSharedDependencies()
public java.util.List<DependencyTree> getNonSharedDependencies()
public boolean isOffline()
public DependencyTree getRootTree()
public Filter<DependencyTree> getOptionalDependencyFilter()
ServiceConstants.INSTR_FAB_OPTIONAL_DEPENDENCY patternprotected void resolveExtensions(DependencyTree root, Filter<org.sonatype.aether.graph.Dependency> excludeDependencyFilter) throws java.io.IOException, org.sonatype.aether.RepositoryException
java.io.IOExceptionorg.sonatype.aether.RepositoryExceptionprotected void importAllExportedPackages(DependencyTree dependencyTree)
public boolean isProcessImportPackages()
public java.util.jar.Manifest getManifest()
public java.lang.String getManifestProperty(java.lang.String name)
protected void addPackagesRecursive(DependencyTree tree)
protected void addPackages(DependencyTree tree)
protected void addDependencies(DependencyTree tree) throws java.io.IOException
java.io.IOExceptionprotected boolean isIncludedOptionaDependency(DependencyTree child)
protected boolean isExcludedDependency(DependencyTree child)
protected boolean isSharedOrRequired(DependencyTree child)
protected void addSharedDependency(DependencyTree tree) throws java.io.IOException
java.io.IOExceptionprotected boolean includeSharedResources(DependencyTree tree) throws java.io.IOException
java.io.IOExceptionprotected void addBundleClassPath(java.lang.String path)
protected void addInstallDependencies(DependencyTree node)
public java.util.Collection<java.lang.String> getInstallFeatures()
public java.util.Collection<java.net.URI> getInstallFeatureURLs()
public java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> getExtraImportPackages()
public java.util.Map<java.lang.String,DependencyTree> getDependenciesByPackage()
public java.util.List<DependencyTree> getOptionalDependencies()
public void addPruningFilter(Filter<DependencyTree> filter)
protected boolean isInstallProvidedBundleDependencies()
ServiceConstants.INSTR_FAB_INSTALL_PROVIDED_BUNDLE_DEPENDENCIEStrue if the MANIFEST.MF header has been set to truepublic java.lang.String getStringProperty(java.lang.String name)
getStringProperty in interface FabConfigurationCopyright © 2014 Red Hat. All Rights Reserved.