org.sonar.plugins.api.jobs
Class AbstractJob

java.lang.Object
  extended by org.sonar.plugins.api.jobs.AbstractJob
All Implemented Interfaces:
Extension, Job, ServerExtension
Direct Known Subclasses:
AbstractSumChildrenJob, AbstractWeightingJob

public abstract class AbstractJob
extends java.lang.Object
implements Job


Constructor Summary
AbstractJob(Languages languages)
           
 
Method Summary
 java.util.List<java.lang.Class<? extends Job>> dependsOnJobs()
          Dependent jobs for the same scope
 java.util.List<Metric> dependsOnMetrics()
          Depends of another measures for the same scope of resources.
 java.util.List<Metric> generatesMetrics()
           
protected abstract  boolean shouldExecuteOnLanguage(Language language)
           
 boolean shouldExecuteOnProject(Resource project)
          Filter on projects, for example "do not execute on Java projects".
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.sonar.plugins.api.jobs.Job
execute, shouldExecuteOnResource
 

Constructor Detail

AbstractJob

public AbstractJob(Languages languages)
Method Detail

dependsOnMetrics

public java.util.List<Metric> dependsOnMetrics()
Description copied from interface: Job
Depends of another measures for the same scope of resources.

Specified by:
dependsOnMetrics in interface Job

dependsOnJobs

public java.util.List<java.lang.Class<? extends Job>> dependsOnJobs()
Description copied from interface: Job
Dependent jobs for the same scope

Specified by:
dependsOnJobs in interface Job
Returns:
empty list if no dependencies

generatesMetrics

public java.util.List<Metric> generatesMetrics()
Specified by:
generatesMetrics in interface Job
Returns:
empty list if the job does not calculate measures

shouldExecuteOnProject

public boolean shouldExecuteOnProject(Resource project)
Description copied from interface: Job
Filter on projects, for example "do not execute on Java projects". This method is called once.

Specified by:
shouldExecuteOnProject in interface Job

shouldExecuteOnLanguage

protected abstract boolean shouldExecuteOnLanguage(Language language)
Returns:
null if the job should be executed for all languages


Copyright © 2009 SonarSource SA. All Rights Reserved.