Class Analyser
java.lang.Object
org.apache.sling.feature.analyser.Analyser
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a new analyser with the provided scanner and use all available tasksCreate a new analyser with the provided scanner and task class namesCreate a new analyser with a provided scanner, task class names and configurationsAnalyser
(Scanner scanner, Map<String, Map<String, String>> configurations, Set<String> includes, Set<String> excludes) Create a new analyser with a provided scanner and includes/excludes for the task ids and configurationCreate a new analyser with a provided scanner, tasks and configurationsCreate a new analyser with a provided scanner and includes/excludes for the task idsAnalyser
(Scanner scanner, AnalyserTask... tasks) Create new analyser with a provided scanner and the tasks to run -
Method Summary
Modifier and TypeMethodDescriptionanalyse
(org.apache.sling.feature.Feature feature) Analyse the featureanalyse
(org.apache.sling.feature.Feature feature, org.apache.sling.feature.ArtifactId fwk) Analyse the feature using the provided framework artifactanalyse
(org.apache.sling.feature.Feature feature, org.apache.sling.feature.ArtifactId fwk, org.apache.sling.feature.builder.FeatureProvider featureProvider) Analyse the feature using the provided framework artifactvoid
setOutputTaskDetails
(boolean outputTaskDetails) Enable/disable output of task details.
-
Constructor Details
-
Analyser
Create new analyser with a provided scanner and the tasks to run- Parameters:
scanner
- The scannertasks
- The tasks to run- Throws:
IOException
- If setting up the analyser fails
-
Analyser
public Analyser(Scanner scanner, Map<String, Map<String, throws IOExceptionString>> configurations, AnalyserTask... tasks) Create a new analyser with a provided scanner, tasks and configurations- Parameters:
scanner
- The scannerconfigurations
- The configurations for the taskstasks
- The tasks- Throws:
IOException
- If setting up the analyser fails
-
Analyser
Create a new analyser with the provided scanner and task class names- Parameters:
scanner
- The scannertaskClassNames
- The task class names- Throws:
IOException
- If setting up the analyser fails
-
Analyser
public Analyser(Scanner scanner, Map<String, Map<String, throws IOExceptionString>> configurations, String... taskClassNames) Create a new analyser with a provided scanner, task class names and configurations- Parameters:
scanner
- The scannerconfigurations
- The configurations for the taskstaskClassNames
- The task class names- Throws:
IOException
- If setting up the analyser fails
-
Analyser
Create a new analyser with a provided scanner and includes/excludes for the task ids- Parameters:
scanner
- The scannerincludes
- The includes for the task ids - can benull
excludes
- The excludes for the task ids - can benull
- Throws:
IOException
- If setting up the analyser fails
-
Analyser
public Analyser(Scanner scanner, Map<String, Map<String, throws IOExceptionString>> configurations, Set<String> includes, Set<String> excludes) Create a new analyser with a provided scanner and includes/excludes for the task ids and configuration- Parameters:
scanner
- The scannerconfigurations
- The configurations for the tasksincludes
- The includes for the task ids - can benull
excludes
- The excludes for the task ids - can benull
- Throws:
IOException
- If setting up the analyser fails
-
Analyser
Create a new analyser with the provided scanner and use all available tasks- Parameters:
scanner
- The scanner- Throws:
IOException
- If setting up the analyser fails
-
-
Method Details
-
setOutputTaskDetails
public void setOutputTaskDetails(boolean outputTaskDetails) Enable/disable output of task details. By default the details are outputted.- Parameters:
outputTaskDetails
- flag for enabling/disabling output of task details- Since:
- 1.6.0
-
analyse
Analyse the feature- Parameters:
feature
- The feature to analyse- Returns:
- The analyser result
- Throws:
Exception
- If analysing fails
-
analyse
public AnalyserResult analyse(org.apache.sling.feature.Feature feature, org.apache.sling.feature.ArtifactId fwk) throws Exception Analyse the feature using the provided framework artifact- Parameters:
feature
- The feature to analysefwk
- The OSGi framework artifact- Returns:
- The analyser result
- Throws:
Exception
- If analysing fails
-
analyse
public AnalyserResult analyse(org.apache.sling.feature.Feature feature, org.apache.sling.feature.ArtifactId fwk, org.apache.sling.feature.builder.FeatureProvider featureProvider) throws Exception Analyse the feature using the provided framework artifact- Parameters:
feature
- The feature to analysefwk
- The OSGi framework artifactfeatureProvider
- Optional provider to resolve features (if required)- Returns:
- The analyser result
- Throws:
Exception
- If analysing fails
-