jetbrains.buildServer.controllers.admin.projects
Interface EditRunTypeControllerExtension

All Superinterfaces:
ServerExtension, TeamCityExtension
All Known Implementing Classes:
IprBasedRunTypeExtension

public interface EditRunTypeControllerExtension
extends ServerExtension

Author:
Pavel.Sher Date: 27.12.2006

Method Summary
 void fillModel(javax.servlet.http.HttpServletRequest request, BuildTypeForm form, java.util.Map model)
          Called when extension should reset its' state (when GET request with init=1 parameter received).
 StatefulObject getState(javax.servlet.http.HttpServletRequest request, BuildTypeForm form)
          Called in case if request has parameter indicating that request data should be stored in session only.
 void updateBuildType(javax.servlet.http.HttpServletRequest request, BuildTypeForm form, BuildTypeSettings buildTypeSettings, ActionErrors errors)
          Called if validation was successful and controller is going to update build configuration.
 void updateState(javax.servlet.http.HttpServletRequest request, BuildTypeForm form)
          Method is called on each POST request.
 ActionErrors validate(javax.servlet.http.HttpServletRequest request, BuildTypeForm form)
          Called when user initiated save process (by clicking "Save" button).
 

Method Detail

fillModel

void fillModel(@NotNull
               javax.servlet.http.HttpServletRequest request,
               @NotNull
               BuildTypeForm form,
               @NotNull
               java.util.Map model)
Called when extension should reset its' state (when GET request with init=1 parameter received).

Parameters:
request - request
form - current form bean
model - Spring model

updateState

void updateState(@NotNull
                 javax.servlet.http.HttpServletRequest request,
                 @NotNull
                 BuildTypeForm form)
Method is called on each POST request. Usually used to bind information from request to internal structure.

Parameters:
request - request to retrieve data from
form - current form bean

getState

@Nullable
StatefulObject getState(@NotNull
                                 javax.servlet.http.HttpServletRequest request,
                                 @NotNull
                                 BuildTypeForm form)
Called in case if request has parameter indicating that request data should be stored in session only. Such requests are produced by JavaScript when user modified form data. In this way server tracks form state modifications.

Extension can return implementation of StatefulObject interface encapsulating this extension state. If StatefulObject.isStateModified() method returns true then corresponding message appears in the UI.

Parameters:
request - request
form - current form bean
Returns:
this extension state

validate

@NotNull
ActionErrors validate(@NotNull
                              javax.servlet.http.HttpServletRequest request,
                              @NotNull
                              BuildTypeForm form)
Called when user initiated save process (by clicking "Save" button). updateState(javax.servlet.http.HttpServletRequest, BuildTypeForm) is guaranteed to be called before this method.

Parameters:
request - request to process
form - current form bean
Returns:
errors found

updateBuildType

void updateBuildType(@NotNull
                     javax.servlet.http.HttpServletRequest request,
                     @NotNull
                     BuildTypeForm form,
                     @NotNull
                     BuildTypeSettings buildTypeSettings,
                     @NotNull
                     ActionErrors errors)
Called if validation was successful and controller is going to update build configuration.

Parameters:
request - request
form - current form bean
buildTypeSettings - build configuration settings to update
errors - object to store errors, if an error was added then build configuration will not be persisted on disk. In this case extension is responsible for keeping build configuration consistent.