Class BundleDescriptorImpl
- java.lang.Object
-
- org.apache.sling.feature.scanner.Descriptor
-
- org.apache.sling.feature.scanner.ArtifactDescriptor
-
- org.apache.sling.feature.scanner.BundleDescriptor
-
- org.apache.sling.feature.scanner.impl.BundleDescriptorImpl
-
- All Implemented Interfaces:
Comparable<BundleDescriptor>
public class BundleDescriptorImpl extends BundleDescriptor
Information about a bundle
-
-
Constructor Summary
Constructors Constructor Description BundleDescriptorImpl(org.apache.sling.feature.Artifact a, URL file, int startLevel)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
analyze()
static List<PackageInfo>
extractDynamicImportedPackages(Manifest m)
static List<PackageInfo>
extractExportedPackages(Manifest m)
static List<PackageInfo>
extractImportedPackages(Manifest m)
static List<PackageInfo>
extractPackages(Manifest m, String headerName, String defaultVersion, boolean checkOptional)
org.apache.sling.feature.Artifact
getArtifact()
Get the artifactURL
getArtifactFile()
Get the artifact fileint
getBundleStartLevel()
Get the start levelString
getBundleSymbolicName()
Get the bundle symbolic name.String
getBundleVersion()
Get the bundle versionManifest
getManifest()
If the artifact has a manifest, return it-
Methods inherited from class org.apache.sling.feature.scanner.BundleDescriptor
compareTo, equals, hashCode, isExportingPackage, isExportingPackage, toString
-
Methods inherited from class org.apache.sling.feature.scanner.Descriptor
aggregate, checkLocked, getCapabilities, getDynamicImportedPackages, getExportedPackages, getImportedPackages, getName, getRequirements, isLocked, lock
-
-
-
-
Constructor Detail
-
BundleDescriptorImpl
public BundleDescriptorImpl(org.apache.sling.feature.Artifact a, URL file, int startLevel) throws IOException
- Throws:
IOException
-
-
Method Detail
-
getBundleSymbolicName
public String getBundleSymbolicName()
Get the bundle symbolic name.- Specified by:
getBundleSymbolicName
in classBundleDescriptor
- Returns:
- The bundle symbolic name
-
getBundleVersion
public String getBundleVersion()
Get the bundle version- Specified by:
getBundleVersion
in classBundleDescriptor
- Returns:
- The bundle version
-
getBundleStartLevel
public int getBundleStartLevel()
Get the start level- Specified by:
getBundleStartLevel
in classBundleDescriptor
- Returns:
- The start level or
0
for the default.
-
getArtifactFile
public URL getArtifactFile()
Description copied from class:ArtifactDescriptor
Get the artifact file- Specified by:
getArtifactFile
in classArtifactDescriptor
- Returns:
- The artifact file
-
getArtifact
public org.apache.sling.feature.Artifact getArtifact()
Description copied from class:ArtifactDescriptor
Get the artifact- Specified by:
getArtifact
in classArtifactDescriptor
- Returns:
- The artifact
-
getManifest
public Manifest getManifest()
Description copied from class:BundleDescriptor
If the artifact has a manifest, return it- Specified by:
getManifest
in classBundleDescriptor
- Returns:
- The manifest
-
analyze
protected void analyze() throws IOException
- Throws:
IOException
-
extractPackages
public static List<PackageInfo> extractPackages(Manifest m, String headerName, String defaultVersion, boolean checkOptional)
-
extractExportedPackages
public static List<PackageInfo> extractExportedPackages(Manifest m)
-
extractImportedPackages
public static List<PackageInfo> extractImportedPackages(Manifest m)
-
extractDynamicImportedPackages
public static List<PackageInfo> extractDynamicImportedPackages(Manifest m)
-
-