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 voidanalyze()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.ArtifactgetArtifact()Get the artifactURLgetArtifactFile()Get the artifact fileintgetBundleStartLevel()Get the start levelStringgetBundleSymbolicName()Get the bundle symbolic name.StringgetBundleVersion()Get the bundle versionManifestgetManifest()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:
getBundleSymbolicNamein classBundleDescriptor- Returns:
- The bundle symbolic name
-
getBundleVersion
public String getBundleVersion()
Get the bundle version- Specified by:
getBundleVersionin classBundleDescriptor- Returns:
- The bundle version
-
getBundleStartLevel
public int getBundleStartLevel()
Get the start level- Specified by:
getBundleStartLevelin classBundleDescriptor- Returns:
- The start level or
0for the default.
-
getArtifactFile
public URL getArtifactFile()
Description copied from class:ArtifactDescriptorGet the artifact file- Specified by:
getArtifactFilein classArtifactDescriptor- Returns:
- The artifact file
-
getArtifact
public org.apache.sling.feature.Artifact getArtifact()
Description copied from class:ArtifactDescriptorGet the artifact- Specified by:
getArtifactin classArtifactDescriptor- Returns:
- The artifact
-
getManifest
public Manifest getManifest()
Description copied from class:BundleDescriptorIf the artifact has a manifest, return it- Specified by:
getManifestin 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)
-
-