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)
          Collects data after the MavenPluginHandler execution
protected abstract  Resource createResource(java.io.File file, java.util.List<java.io.File> sourceDirs)
           
protected abstract  Resource createTestResource(java.io.File file, java.util.List<java.io.File> testSourceDirs)
           
 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)
          Defines if the mavne collector should be launched on the given 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)
Description copied from interface: MavenCollector
Defines if the mavne collector should be launched on the given pom

Specified by:
shouldCollectOn in interface MavenCollector
Parameters:
pom - the pom to test
Returns:
true if the collector should be executed

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)
Description copied from interface: MavenCollector
Collects data after the MavenPluginHandler execution

Specified by:
collect in interface MavenCollector
Parameters:
pom - the pom being collected
context - the context to collect data

createResource

protected abstract Resource createResource(java.io.File file,
                                           java.util.List<java.io.File> sourceDirs)

createTestResource

protected abstract Resource createTestResource(java.io.File file,
                                               java.util.List<java.io.File> testSourceDirs)


Copyright © 2009 SonarSource SA. All Rights Reserved.