hudson.plugins.violations.hudson
Class AbstractViolationsProjectAction

java.lang.Object
  extended by hudson.model.AbstractModelObject
      extended by hudson.model.Actionable
          extended by hudson.plugins.violations.hudson.AbstractViolationsProjectAction
All Implemented Interfaces:
hudson.model.Action, hudson.model.ModelObject, hudson.search.SearchableModelObject, hudson.search.SearchItem, org.kohsuke.stapler.StaplerProxy
Direct Known Subclasses:
ViolationsMavenAggregatedProjectAction, ViolationsProjectAction

public abstract class AbstractViolationsProjectAction
extends hudson.model.Actionable
implements hudson.model.Action, org.kohsuke.stapler.StaplerProxy

Project level action.


Constructor Summary
AbstractViolationsProjectAction(hudson.model.AbstractProject<?,?> project)
          Create a project action for the violations.
 
Method Summary
 void doGraph(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
          Graph the violations.
 java.lang.String getDisplayName()
          Get the display name for the violations.
 java.lang.String getIconFileName()
          Get the icon file name.
 hudson.model.AbstractProject<?,?> getProject()
          Get the project.
 java.lang.String getSearchUrl()
          Get the search url for this.
 java.lang.Object getTarget()
          Get the target of the StaplerProxy for url violations.
 java.lang.String getUrlName()
          Get the urlname for the proxy.
 AbstractViolationsBuildAction getViolationsAction()
          Get the violations action for this project.
 
Methods inherited from class hudson.model.Actionable
addAction, getAction, getAction, getActions, getActions, getDynamic
 
Methods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractViolationsProjectAction

public AbstractViolationsProjectAction(hudson.model.AbstractProject<?,?> project)
Create a project action for the violations.

Parameters:
project - the current project.
Method Detail

getProject

public hudson.model.AbstractProject<?,?> getProject()
Get the project.

Returns:
the project.

getUrlName

public java.lang.String getUrlName()
Get the urlname for the proxy.

Specified by:
getUrlName in interface hudson.model.Action
Returns:
"violations"

getSearchUrl

public java.lang.String getSearchUrl()
Get the search url for this.

Specified by:
getSearchUrl in interface hudson.search.SearchItem
Returns:
"violations"

getDisplayName

public java.lang.String getDisplayName()
Get the display name for the violations.

Specified by:
getDisplayName in interface hudson.model.Action
Specified by:
getDisplayName in interface hudson.model.ModelObject
Returns:
"Violations".

getTarget

public java.lang.Object getTarget()
Get the target of the StaplerProxy for url violations.

Specified by:
getTarget in interface org.kohsuke.stapler.StaplerProxy
Returns:
the current violationsAction if one is present, null otherwise.

getIconFileName

public java.lang.String getIconFileName()
Get the icon file name.

Specified by:
getIconFileName in interface hudson.model.Action
Returns:
the violations icon or null if not violations are present.

doGraph

public void doGraph(org.kohsuke.stapler.StaplerRequest req,
                    org.kohsuke.stapler.StaplerResponse rsp)
             throws java.io.IOException
Graph the violations. This corresponds to violations/graph ?

Parameters:
req - the StaplerRequest.
rsp - the StaplerResponse.
Throws:
java.io.IOException - if there is an problem writing the response.

getViolationsAction

public AbstractViolationsBuildAction getViolationsAction()
Get the violations action for this project. This is defined as the most recent violations actions of the builds of this project.

Returns:
the most recent violations build action.


Copyright © 2004-2012. All Rights Reserved.