Class Analyser

java.lang.Object
org.apache.sling.feature.analyser.Analyser

public class Analyser
extends Object
  • Constructor Details

    • Analyser

      public Analyser​(Scanner scanner, AnalyserTask... tasks) throws IOException
      Create new analyser with a provided scanner and the tasks to run
      Parameters:
      scanner - The scanner
      tasks - The tasks to run
      Throws:
      IOException - If setting up the analyser fails
    • Analyser

      public Analyser​(Scanner scanner, Map<String,​Map<String,​String>> configurations, AnalyserTask... tasks) throws IOException
      Create a new analyser with a provided scanner, tasks and configurations
      Parameters:
      scanner - The scanner
      configurations - The configurations for the tasks
      tasks - The tasks
      Throws:
      IOException - If setting up the analyser fails
    • Analyser

      public Analyser​(Scanner scanner, String... taskClassNames) throws IOException
      Create a new analyser with the provided scanner and task class names
      Parameters:
      scanner - The scanner
      taskClassNames - The task class names
      Throws:
      IOException - If setting up the analyser fails
    • Analyser

      public Analyser​(Scanner scanner, Map<String,​Map<String,​String>> configurations, String... taskClassNames) throws IOException
      Create a new analyser with a provided scanner, task class names and configurations
      Parameters:
      scanner - The scanner
      configurations - The configurations for the tasks
      taskClassNames - The task class names
      Throws:
      IOException - If setting up the analyser fails
    • Analyser

      public Analyser​(Scanner scanner, Set<String> includes, Set<String> excludes) throws IOException
      Create a new analyser with a provided scanner and includes/excludes for the task ids
      Parameters:
      scanner - The scanner
      includes - The includes for the task ids - can be null
      excludes - The excludes for the task ids - can be null
      Throws:
      IOException - If setting up the analyser fails
    • Analyser

      public Analyser​(Scanner scanner, Map<String,​Map<String,​String>> configurations, Set<String> includes, Set<String> excludes) throws IOException
      Create a new analyser with a provided scanner and includes/excludes for the task ids and configuration
      Parameters:
      scanner - The scanner
      configurations - The configurations for the tasks
      includes - The includes for the task ids - can be null
      excludes - The excludes for the task ids - can be null
      Throws:
      IOException - If setting up the analyser fails
    • Analyser

      public Analyser​(Scanner scanner) throws IOException
      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

    • analyse

      public AnalyserResult analyse​(org.apache.sling.feature.Feature feature) throws Exception
      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 analyse
      fwk - 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 analyse
      fwk - The OSGi framework artifact
      featureProvider - Optional provider to resolve features (if required)
      Returns:
      The analyser result
      Throws:
      Exception - If analysing fails