Class Analyser

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

public class Analyser
extends java.lang.Object
  • Constructor Summary

    Constructors 
    Constructor Description
    Analyser​(Scanner scanner)
    Create a new analyser with the provided scanner and use all available tasks
    Analyser​(Scanner scanner, java.lang.String... taskClassNames)
    Create a new analyser with the provided scanner and task class names
    Analyser​(Scanner scanner, java.util.Map<java.lang.String,​java.util.Map<java.lang.String,​java.lang.String>> configurations, java.lang.String... taskClassNames)
    Create a new analyser with a provided scanner, task class names and configurations
    Analyser​(Scanner scanner, java.util.Map<java.lang.String,​java.util.Map<java.lang.String,​java.lang.String>> configurations, java.util.Set<java.lang.String> includes, java.util.Set<java.lang.String> excludes)
    Create a new analyser with a provided scanner and includes/excludes for the task ids and configuration
    Analyser​(Scanner scanner, java.util.Map<java.lang.String,​java.util.Map<java.lang.String,​java.lang.String>> configurations, AnalyserTask... tasks)
    Create a new analyser with a provided scanner, tasks and configurations
    Analyser​(Scanner scanner, java.util.Set<java.lang.String> includes, java.util.Set<java.lang.String> excludes)
    Create a new analyser with a provided scanner and includes/excludes for the task ids
    Analyser​(Scanner scanner, AnalyserTask... tasks)
    Create new analyser with a provided scanner and the tasks to run
  • Method Summary

    Modifier and Type Method Description
    AnalyserResult analyse​(org.apache.sling.feature.Feature feature)
    Analyse the feature
    AnalyserResult analyse​(org.apache.sling.feature.Feature feature, org.apache.sling.feature.ArtifactId fwk)
    Analyse the feature using the provided framework artifact
    AnalyserResult analyse​(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 artifact

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Analyser

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

      public Analyser​(Scanner scanner, java.util.Map<java.lang.String,​java.util.Map<java.lang.String,​java.lang.String>> configurations, AnalyserTask... tasks) throws java.io.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:
      java.io.IOException - If setting up the analyser fails
    • Analyser

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

      public Analyser​(Scanner scanner, java.util.Map<java.lang.String,​java.util.Map<java.lang.String,​java.lang.String>> configurations, java.lang.String... taskClassNames) throws java.io.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:
      java.io.IOException - If setting up the analyser fails
    • Analyser

      public Analyser​(Scanner scanner, java.util.Set<java.lang.String> includes, java.util.Set<java.lang.String> excludes) throws java.io.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:
      java.io.IOException - If setting up the analyser fails
    • Analyser

      public Analyser​(Scanner scanner, java.util.Map<java.lang.String,​java.util.Map<java.lang.String,​java.lang.String>> configurations, java.util.Set<java.lang.String> includes, java.util.Set<java.lang.String> excludes) throws java.io.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:
      java.io.IOException - If setting up the analyser fails
    • Analyser

      public Analyser​(Scanner scanner) throws java.io.IOException
      Create a new analyser with the provided scanner and use all available tasks
      Parameters:
      scanner - The scanner
      Throws:
      java.io.IOException - If setting up the analyser fails
  • Method Details

    • analyse

      public AnalyserResult analyse​(org.apache.sling.feature.Feature feature) throws java.lang.Exception
      Analyse the feature
      Parameters:
      feature - The feature to analyse
      Returns:
      The analyser result
      Throws:
      java.lang.Exception - If analysing fails
    • analyse

      public AnalyserResult analyse​(org.apache.sling.feature.Feature feature, org.apache.sling.feature.ArtifactId fwk) throws java.lang.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:
      java.lang.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 java.lang.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:
      java.lang.Exception - If analysing fails