org.sonar.plugins.api.maven
Class AbstractImportSourceMavenCollector

java.lang.Object
  extended by org.sonar.plugins.api.maven.AbstractImportSourceMavenCollector
All Implemented Interfaces:
Extension, MavenCollector, MavenExtension

public abstract class AbstractImportSourceMavenCollector
extends java.lang.Object
implements MavenCollector


Field Summary
static boolean PROP_DEFAULT_IMPORT_SOURCES
           
static java.lang.String PROP_KEY_IMPORT_SOURCES
           
 
Constructor Summary
AbstractImportSourceMavenCollector()
           
 
Method Summary
 void collect(MavenPom pom, ProjectContext context)
           
protected abstract  Resource createSourceResource(java.io.File file, java.lang.String sourceDir)
           
protected abstract  Resource createTestResource(java.io.File file, java.lang.String testSourceDir)
           
 java.lang.Class<? extends MavenPluginHandler> dependsOnMavenPlugin(MavenPom pom)
          the collector should depend on the execution of a Maven plugin.
protected abstract  java.lang.String[] getSuffixes()
           
protected  boolean isEnabled(MavenPom pom)
           
 boolean shouldCollectOn(MavenPom pom)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_KEY_IMPORT_SOURCES

public static final java.lang.String PROP_KEY_IMPORT_SOURCES
See Also:
Constant Field Values

PROP_DEFAULT_IMPORT_SOURCES

public static final boolean PROP_DEFAULT_IMPORT_SOURCES
See Also:
Constant Field Values
Constructor Detail

AbstractImportSourceMavenCollector

public AbstractImportSourceMavenCollector()
Method Detail

getSuffixes

protected abstract java.lang.String[] getSuffixes()

shouldCollectOn

public boolean shouldCollectOn(MavenPom pom)
Specified by:
shouldCollectOn in interface MavenCollector

isEnabled

protected boolean isEnabled(MavenPom pom)

dependsOnMavenPlugin

public java.lang.Class<? extends MavenPluginHandler> dependsOnMavenPlugin(MavenPom pom)
Description copied from interface: MavenCollector
the collector should depend on the execution of a Maven plugin. In such a case this method returns an handler that defines the Maven plugin. Return null if no maven plugin to execute.

Specified by:
dependsOnMavenPlugin in interface MavenCollector

collect

public void collect(MavenPom pom,
                    ProjectContext context)
Specified by:
collect in interface MavenCollector

createSourceResource

protected abstract Resource createSourceResource(java.io.File file,
                                                 java.lang.String sourceDir)

createTestResource

protected abstract Resource createTestResource(java.io.File file,
                                               java.lang.String testSourceDir)


Copyright © 2009 SonarSource SA. All Rights Reserved.