jetbrains.buildServer.web.statistics.graph
Class ProjectGraphExtension

java.lang.Object
  extended by jetbrains.buildServer.web.openapi.SimplePageExtension
      extended by jetbrains.buildServer.web.openapi.project.ProjectPortlet
          extended by jetbrains.buildServer.web.statistics.graph.ProjectGraphExtension
All Implemented Interfaces:
ProjectSettingsFactory, PageExtension

public class ProjectGraphExtension
extends ProjectPortlet
implements ProjectSettingsFactory

This is an extension which shows custom graphs on project statistics tab. The graphs are initialized from plugin-config.xml file.

Author:
kir

Field Summary
 
Fields inherited from class jetbrains.buildServer.web.openapi.SimplePageExtension
myCssPaths, myJsPaths, myPagePlaces
 
Constructor Summary
ProjectGraphExtension(PagePlaces manager, ProjectManager projectManager, ProjectSettingsManager projectSettingsManager, ValueProviderRegistry valueProviderRegistry, BuildDataStorage storage, SBuildServer server)
           
 
Method Summary
 ProjectSettings createProjectSettings(java.lang.String projectId)
          Return new ProjectSettings object
protected  void fillModel(java.util.Map<java.lang.String,java.lang.Object> model, javax.servlet.http.HttpServletRequest request, SProject project, SUser user)
           
 boolean isAvailable(javax.servlet.http.HttpServletRequest request)
          Returns true if this extension is available (should be included on the page) for the specified request.
 
Methods inherited from class jetbrains.buildServer.web.openapi.project.ProjectPortlet
fillModel, getProject
 
Methods inherited from class jetbrains.buildServer.web.openapi.SimplePageExtension
addCssFile, addJsFile, getCssPaths, getIncludeUrl, getJsPaths, getPlaceId, getPluginName, isGet, isPost, register, setIncludeUrl, setPlaceId, setPluginName, setPosition, toString, unregister
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProjectGraphExtension

public ProjectGraphExtension(PagePlaces manager,
                             ProjectManager projectManager,
                             ProjectSettingsManager projectSettingsManager,
                             ValueProviderRegistry valueProviderRegistry,
                             BuildDataStorage storage,
                             SBuildServer server)
Parameters:
manager - manager of web places extension
projectManager - project manager
projectSettingsManager - manager for project settings, to access data from plugin-config.xml file
server - build server object
storage - build data storage
valueProviderRegistry - registry for value providers
Method Detail

fillModel

protected void fillModel(@NotNull
                         java.util.Map<java.lang.String,java.lang.Object> model,
                         @NotNull
                         javax.servlet.http.HttpServletRequest request,
                         @NotNull
                         SProject project,
                         SUser user)
Specified by:
fillModel in class ProjectPortlet

isAvailable

public boolean isAvailable(@NotNull
                           javax.servlet.http.HttpServletRequest request)
Description copied from interface: PageExtension
Returns true if this extension is available (should be included on the page) for the specified request. If extension needs to be shown for some pages only, it can obtain original page URL via request attribute called "pageUrl":
String pageUrl = (String)request.getAttribute("pageUrl");

Specified by:
isAvailable in interface PageExtension
Overrides:
isAvailable in class ProjectPortlet
Parameters:
request - HTTP request
Returns:
true if extension should be included in the page place

createProjectSettings

@NotNull
public ProjectSettings createProjectSettings(java.lang.String projectId)
Description copied from interface: ProjectSettingsFactory
Return new ProjectSettings object

Specified by:
createProjectSettings in interface ProjectSettingsFactory
Parameters:
projectId - project identifier whose settings are created
Returns:
see above