jetbrains.buildServer.web.openapi
Interface PageExtension

All Known Subinterfaces:
CustomTab
All Known Implementing Classes:
AgentDetailsTab, BuildInfoFragmentTab, BuildTypesBasedPortlet, BuildTypeTab, ChangeDetailsExtension, EditBuildRunnerSettingsExtension, GraphExtension, ProjectGraphExtension, ProjectPortlet, ProjectTab, SimpleCustomTab, SimplePageExtension, ViewBuildRunnerSettingsExtension, ViewLogTab

public interface PageExtension

Represents page extension, see SimplePageExtension


Method Summary
 void fillModel(java.util.Map<java.lang.String,java.lang.Object> model, javax.servlet.http.HttpServletRequest request)
          This method is useful for extensions that do not have controllers (such extensions usually return path to JSP as their include URL).
 java.util.List<java.lang.String> getCssPaths()
          Returns list of additional CSS files paths required by this extension
 java.lang.String getIncludeUrl()
          Returns URL by which this page extension is included.
 java.util.List<java.lang.String> getJsPaths()
          Returns list of additional JavaScript files paths required by this extension
 java.lang.String getPluginName()
          Returns name of the plugin to which this extension corresponds.
 boolean isAvailable(javax.servlet.http.HttpServletRequest request)
          Returns true if this extension is available (should be included on the page) for the specified request
 

Method Detail

getIncludeUrl

@NotNull
java.lang.String getIncludeUrl()
Returns URL by which this page extension is included. This url may point to a JSP file or to a controller. If URL is absolute it must not include context path.

Returns:
URL of the page extension content

getCssPaths

@NotNull
java.util.List<java.lang.String> getCssPaths()
Returns list of additional CSS files paths required by this extension

Returns:
list of additional CSS paths or empty collection

getJsPaths

@NotNull
java.util.List<java.lang.String> getJsPaths()
Returns list of additional JavaScript files paths required by this extension

Returns:
list of additional JavaScript paths or empty collection

getPluginName

java.lang.String getPluginName()
Returns name of the plugin to which this extension corresponds. Plugin name is required to make paths to the extension resources.

Returns:
name of the plugin to which this extension corresponds.

isAvailable

boolean isAvailable(@NotNull
                    javax.servlet.http.HttpServletRequest request)
Returns true if this extension is available (should be included on the page) for the specified request

Parameters:
request - HTTP request
Returns:
true if extension should be included in the page place

fillModel

void fillModel(@NotNull
               java.util.Map<java.lang.String,java.lang.Object> model,
               @NotNull
               javax.servlet.http.HttpServletRequest request)
This method is useful for extensions that do not have controllers (such extensions usually return path to JSP as their include URL). method is called before processing is passed to JSP. It allows page extension to modify model passed to JSP. Note that since main page controller also uses this model for storing its parameters in case of parameter name conflict extension parameter will be removed and warning message will be logged into the server log.

Parameters:
model - model to modify
request - HTTP request