Package org.apache.sling.feature.scanner
Class Scanner
java.lang.Object
org.apache.sling.feature.scanner.Scanner
public class Scanner extends Object
The scanner is a service that scans items and provides descriptions for
these. The following items can be scanned individually
- A bundle artifact
- A feature (requires
ExtensionScanners) - A framework (requires
FrameworkScanners)
-
Constructor Summary
Constructors Constructor Description Scanner(org.apache.sling.feature.builder.ArtifactProvider artifactProvider)Create a new scanner and use the service loader to find the scannersScanner(org.apache.sling.feature.builder.ArtifactProvider artifactProvider, List<ExtensionScanner> extensionScanners, List<FrameworkScanner> frameworkScanners)Create a new scanner -
Method Summary
Modifier and Type Method Description BundleDescriptorscan(org.apache.sling.feature.ArtifactId framework, Map<String,String> props)Scan a frameworkBundleDescriptorscan(org.apache.sling.feature.Artifact bundle, int startLevel)Deprecated.FeatureDescriptorscan(org.apache.sling.feature.Feature feature)Scan a featureBundleDescriptorscanBundle(org.apache.sling.feature.Artifact bundle)Scan a bundle
-
Constructor Details
-
Scanner
public Scanner(org.apache.sling.feature.builder.ArtifactProvider artifactProvider, List<ExtensionScanner> extensionScanners, List<FrameworkScanner> frameworkScanners) throws IOExceptionCreate a new scanner- Parameters:
artifactProvider- The artifact providerextensionScanners- A list of extension scannersframeworkScanners- A list of framework scanners- Throws:
IOException- If something goes wrong
-
Scanner
public Scanner(org.apache.sling.feature.builder.ArtifactProvider artifactProvider) throws IOExceptionCreate a new scanner and use the service loader to find the scanners- Parameters:
artifactProvider- The artifact provider- Throws:
IOException- If something goes wrong
-
-
Method Details
-
scanBundle
Scan a bundle- Parameters:
bundle- The bundle artifact- Returns:
- The bundle descriptor
- Throws:
IOException- If something goes wrong or the provided artifact is not a bundle.
-
scan
@Deprecated public BundleDescriptor scan(org.apache.sling.feature.Artifact bundle, int startLevel) throws IOExceptionDeprecated.Scan a bundle- Parameters:
bundle- The bundle artifactstartLevel- The start level of the bundle- Returns:
- The bundle descriptor
- Throws:
IOException- If something goes wrong or the provided artifact is not a bundle.
-
scan
Scan a feature- Parameters:
feature- The feature- Returns:
- The feature descriptor
- Throws:
IOException- If something goes wrong or a scanner is missing
-
scan
public BundleDescriptor scan(org.apache.sling.feature.ArtifactId framework, Map<String,String> props) throws IOExceptionScan a framework- Parameters:
framework- The frameworkprops- framework properties to launch the framework- Returns:
- The framework descriptor
- Throws:
IOException- If something goes wrong or a scanner is missing
-
scanBundle(Artifact)