hudson.plugins.violations
Class ViolationsPublisher

java.lang.Object
  extended by hudson.tasks.BuildStepCompatibilityLayer
      extended by hudson.tasks.Publisher
          extended by hudson.plugins.violations.ViolationsPublisher
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<hudson.tasks.Publisher>, hudson.tasks.BuildStep

public class ViolationsPublisher
extends hudson.tasks.Publisher

Generats HTML and XML reports from checkstyle, pmd and findbugs report xml files.

Author:
Peter Reilly

Nested Class Summary
 
Nested classes/interfaces inherited from interface hudson.tasks.BuildStep
hudson.tasks.BuildStep.PublisherList
 
Field Summary
static hudson.model.Descriptor<hudson.tasks.Publisher> DESCRIPTOR
          The descriptor for this publisher - used in project config page.
 
Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS
 
Constructor Summary
ViolationsPublisher()
           
 
Method Summary
 ViolationsConfig getConfig()
          Get the confiation object for this violations publisher.
 hudson.model.Descriptor<hudson.tasks.Publisher> getDescriptor()
          Get the descriptor.
 ViolationsConfig getOldConfig()
          Get a copy of the configuration.
 hudson.model.Action getProjectAction(hudson.model.AbstractProject<?,?> project)
          Create a project action for a project.
 boolean perform(hudson.model.Build<?,?> build, hudson.Launcher launcher, hudson.model.BuildListener listener)
          Called by hudson at the end of a buuld.
 
Methods inherited from class hudson.tasks.Publisher
getProjectAction, needsToRunAfterFinalized, prebuild
 
Methods inherited from class hudson.tasks.BuildStepCompatibilityLayer
perform, prebuild
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface hudson.tasks.BuildStep
perform, prebuild
 

Field Detail

DESCRIPTOR

public static final hudson.model.Descriptor<hudson.tasks.Publisher> DESCRIPTOR
The descriptor for this publisher - used in project config page.

Constructor Detail

ViolationsPublisher

public ViolationsPublisher()
Method Detail

getConfig

public ViolationsConfig getConfig()
Get the confiation object for this violations publisher.

Returns:
the config.

getOldConfig

public ViolationsConfig getOldConfig()
Get a copy of the configuration. This is used to configure a new publisher in the config.jelly script.

Returns:
a copy o the condig.

perform

public boolean perform(hudson.model.Build<?,?> build,
                       hudson.Launcher launcher,
                       hudson.model.BuildListener listener)
                throws java.lang.InterruptedException,
                       java.io.IOException
Called by hudson at the end of a buuld.

Overrides:
perform in class hudson.tasks.BuildStepCompatibilityLayer
Parameters:
build - the build
launcher - the laucher
listener - for reporting errors
Returns:
true always.
Throws:
java.lang.InterruptedException - if user cancels the operation
java.io.IOException - if problem parsing the xml files

getProjectAction

public hudson.model.Action getProjectAction(hudson.model.AbstractProject<?,?> project)
Create a project action for a project.

Specified by:
getProjectAction in interface hudson.tasks.BuildStep
Overrides:
getProjectAction in class hudson.tasks.BuildStepCompatibilityLayer
Parameters:
project - the project to create the action for.
Returns:
the created violations project action.

getDescriptor

public hudson.model.Descriptor<hudson.tasks.Publisher> getDescriptor()
Get the descriptor.

Returns:
the violations publisher descriptor.


Copyright © 2008. All Rights Reserved.