hudson.plugins.serenitec
Class SerenitecProjectAction

java.lang.Object
  extended by hudson.plugins.serenitec.SerenitecProjectAction
All Implemented Interfaces:
hudson.model.Action, hudson.model.ModelObject, java.io.Serializable

public class SerenitecProjectAction
extends java.lang.Object
implements hudson.model.Action

The class SerenitecProjectAction.

Since:
$Date: 2008/07/24 09:44:13 ${date}
Version:
$Revision: 1.5 $
See Also:
Serialized Form

Constructor Summary
SerenitecProjectAction(hudson.model.AbstractProject<?,?> project, int height)
          Instantiates a new find bugs project action.
SerenitecProjectAction(hudson.model.AbstractProject<?,?> project, SerenitecDescriptor plugin, int height)
          Creates a new instance of SerenitecProjectAction.
 
Method Summary
 void doFlipTrend(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response)
          Changes the trend graph display mode.
 void doIndex(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response)
          Redirects the index page to the last result.
 void doTrend(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response)
          Display the trend graph.
 void doTrendMap(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response)
          Display the trend map.
 java.lang.String getCookieName()
          Return the cookie name
 java.lang.String getDisplayName()
          return the Display name
 java.lang.String getIconFileName()
          Returns the icon URL for the side-panel in the project screen.
 ResultAction<?> getLastAction()
          Returns the last valid result action.
 hudson.model.AbstractBuild<?,?> getLastFinishedBuild()
          Returns the last finished build.
 hudson.model.AbstractProject<?,?> getProject()
          Returns the project.
 java.lang.String getUrlName()
          
 boolean hasValidResults()
          Returns whether we have enough valid results in order to draw a meaningful graph.
 boolean isHealthinessEnabled()
          Returns whether we should display the toggle graph type links.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SerenitecProjectAction

public SerenitecProjectAction(hudson.model.AbstractProject<?,?> project,
                              int height)
Instantiates a new find bugs project action.

Parameters:
project - the project that owns this action
height - the height of the trend graph

SerenitecProjectAction

public SerenitecProjectAction(hudson.model.AbstractProject<?,?> project,
                              SerenitecDescriptor plugin,
                              int height)
Creates a new instance of SerenitecProjectAction.

Parameters:
project - the project that owns this action
resultActionType - the type of the result action
plugin - the plug-in that owns this action
height - the height of the trend graph
Method Detail

doFlipTrend

public void doFlipTrend(org.kohsuke.stapler.StaplerRequest request,
                        org.kohsuke.stapler.StaplerResponse response)
                 throws java.io.IOException
Changes the trend graph display mode.

Parameters:
request - Stapler request
response - Stapler response
Throws:
java.io.IOException - in case of an error

doIndex

public void doIndex(org.kohsuke.stapler.StaplerRequest request,
                    org.kohsuke.stapler.StaplerResponse response)
             throws java.io.IOException
Redirects the index page to the last result.

Parameters:
request - Stapler request
response - Stapler response
Throws:
java.io.IOException - in case of an error

doTrend

public void doTrend(org.kohsuke.stapler.StaplerRequest request,
                    org.kohsuke.stapler.StaplerResponse response)
             throws java.io.IOException
Display the trend graph. Delegates to the the associated ResultAction.

Parameters:
request - Stapler request
response - Stapler response
Throws:
java.io.IOException - in case of an error in ResultAction.doGraph(StaplerRequest, StaplerResponse, int)

doTrendMap

public void doTrendMap(org.kohsuke.stapler.StaplerRequest request,
                       org.kohsuke.stapler.StaplerResponse response)
                throws java.io.IOException
Display the trend map. Delegates to the the associated ResultAction.

Parameters:
request - Stapler request
response - Stapler response
Throws:
java.io.IOException - in case of an error

getCookieName

public java.lang.String getCookieName()
Return the cookie name

Returns:
cookie Name

getDisplayName

public java.lang.String getDisplayName()
return the Display name

Specified by:
getDisplayName in interface hudson.model.Action
Specified by:
getDisplayName in interface hudson.model.ModelObject
Returns:
display Name

getIconFileName

public java.lang.String getIconFileName()
Returns the icon URL for the side-panel in the project screen. If there is yet no valid result, then null is returned.

Specified by:
getIconFileName in interface hudson.model.Action
Returns:
the icon URL for the side-panel in the project screen

getLastAction

public ResultAction<?> getLastAction()
Returns the last valid result action.

Returns:
the last valid result action, or null if no such action is found

getLastFinishedBuild

public hudson.model.AbstractBuild<?,?> getLastFinishedBuild()
Returns the last finished build.

Returns:
the last finished build or null if there is no such build

getProject

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

Returns:
the project

getUrlName

public final java.lang.String getUrlName()

Specified by:
getUrlName in interface hudson.model.Action

hasValidResults

public final boolean hasValidResults()
Returns whether we have enough valid results in order to draw a meaningful graph.

Returns:
true if the results are valid in order to draw a graph

isHealthinessEnabled

public final boolean isHealthinessEnabled()
Returns whether we should display the toggle graph type links.

Returns:
true if we should display the toggle graph type links


Copyright © 2008. All Rights Reserved.