jetbrains.buildServer.controllers.admin.projects
Class BuildTypeForm

java.lang.Object
  extended by jetbrains.buildServer.controllers.RememberState
      extended by jetbrains.buildServer.controllers.admin.projects.BuildTypeForm
All Implemented Interfaces:
StatefulObject

public abstract class BuildTypeForm
extends RememberState

Base class, holds build configuration details when a build configuration is being edited, created or its settings are shown on the web.


Constructor Summary
protected BuildTypeForm(SProject project)
          Constructor
 
Method Summary
protected abstract  MultipleRunnersBean createMultipleRunnersBean()
           
 java.lang.String getArtifactPaths()
           
 java.lang.String getBuildCounter()
           
 long getBuildCounterLong()
           
 java.lang.String getBuildNumberFormat()
           
 BuildRunnerBean getBuildRunnerBean()
           
 CameFromSupport getCameFromSupport()
           
static java.lang.String getCurrentRunType(javax.servlet.http.HttpServletRequest request)
          Retrieves currently selected run type from specified request
 java.lang.String getDescription()
           
 java.lang.String getExecutionTimeout()
           
 java.lang.String getExternalId()
           
 java.lang.String getMaxBuilds()
           
 MultipleRunnersBean getMultipleRunnersBean()
           
 java.lang.String getName()
           
 SProject getProject()
           
 java.lang.String getPublicKey()
           
abstract  ValueResolver getValueResolver()
          Returns resolver for parameter references.
abstract  VcsSettingsBean getVcsRootsBean()
           
 boolean isAllowExternalStatus()
           
abstract  boolean isBranchesConfigured()
          Returns true if build configuration has configured branches
 boolean isCreateMode()
          Returns true if this form bean corresponds to not yet existing object, i.e.
 boolean isExecutionTimeoutEnabled()
           
 boolean isHangingBuildsDetectionEnabled()
           
 boolean isShouldFailBuildOnAnyErrorMessage()
           
 boolean isShouldFailBuildOnOOMEOrCrash()
           
 boolean isShouldFailIfTestFailed()
           
 boolean isShouldFailOnExitCode()
           
 boolean isTemplate()
          Returns true if being edited object is template
 boolean isTemplateBased()
          Returns true if build type is template based
 void reloadBuildRunnerBean()
          reload build runner parameters
 void setAllowExternalStatus(boolean allowExternalStatus)
           
 void setArtifactPaths(java.lang.String artifactPaths)
           
 void setBuildCounter(java.lang.String nextBuildCounter)
           
 void setBuildNumberFormat(java.lang.String buildNumberFormat)
           
 void setDescription(java.lang.String description)
           
 void setExecutionTimeout(java.lang.String executionTimeout)
           
 void setExecutionTimeoutEnabled(boolean executionTimeoutEnabled)
           
 void setExternalId(java.lang.String externalId)
           
 void setHangingBuildsDetectionEnabled(boolean hangingBuildsDetectionEnabled)
           
 void setMaxBuilds(java.lang.String maxBuilds)
           
 void setName(java.lang.String name)
           
 void setShouldFailBuildOnAnyErrorMessage(boolean shouldFailBuildOnAnyErrorMessage)
           
 void setShouldFailBuildOnOOMEOrCrash(boolean shouldFailBuildOnOOMEOrCrash)
           
 void setShouldFailIfTestFailed(boolean shouldFailIfTestFailed)
           
 void setShouldFailOnExitCode(boolean shouldFailOnExitCode)
           
 
Methods inherited from class jetbrains.buildServer.controllers.RememberState
findField, forgetState, isFieldModified, isStateModified, rememberState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BuildTypeForm

protected BuildTypeForm(SProject project)
Constructor

Parameters:
project - owner of the build configuration
Method Detail

getName

public java.lang.String getName()
Returns:
name of build configuration

setName

public void setName(java.lang.String name)
Parameters:
name - name of BC
See Also:
getName()

getExternalId

public java.lang.String getExternalId()

setExternalId

public void setExternalId(java.lang.String externalId)

getDescription

public java.lang.String getDescription()
Returns:
description of build configuration

setDescription

public void setDescription(java.lang.String description)
Parameters:
description - description of BC
See Also:
getDescription()

getMaxBuilds

public java.lang.String getMaxBuilds()
Returns:
max number of running builds for the build configuration
See Also:
BuildTypeOptions.BT_MAX_RUNNING_BUILDS

setMaxBuilds

public void setMaxBuilds(java.lang.String maxBuilds)
Parameters:
maxBuilds - max number of running builds
See Also:
getMaxBuilds()

getCameFromSupport

public CameFromSupport getCameFromSupport()
Returns:
support class link for "back" or "cancel" action
See Also:
CameFromSupport

getBuildCounter

public java.lang.String getBuildCounter()
Returns:
build counter
See Also:
BuildNumbers.getBuildCounter()

setBuildCounter

public void setBuildCounter(java.lang.String nextBuildCounter)
Parameters:
nextBuildCounter - according to name
See Also:
getBuildCounter()

getBuildNumberFormat

public java.lang.String getBuildNumberFormat()
Returns:
build number pattern
See Also:
BuildTypeSettings.getBuildNumberPattern()

setBuildNumberFormat

public void setBuildNumberFormat(java.lang.String buildNumberFormat)
Parameters:
buildNumberFormat - build number format string
See Also:
getBuildNumberFormat()

getBuildCounterLong

public long getBuildCounterLong()
Returns:
build counter as number
See Also:
BuildNumbers.getBuildCounter()

isHangingBuildsDetectionEnabled

public boolean isHangingBuildsDetectionEnabled()

setHangingBuildsDetectionEnabled

public void setHangingBuildsDetectionEnabled(boolean hangingBuildsDetectionEnabled)

isAllowExternalStatus

public boolean isAllowExternalStatus()
Returns:
ext status option
See Also:
BuildTypeOptions.BT_ALLOW_EXTERNAL_STATUS

setAllowExternalStatus

public void setAllowExternalStatus(boolean allowExternalStatus)
Parameters:
allowExternalStatus - according to name
See Also:
isAllowExternalStatus()

isShouldFailIfTestFailed

public boolean isShouldFailIfTestFailed()
Returns:
fail build on test failure
See Also:
BuildTypeOptions.BT_FAIL_IF_TESTS_FAIL

setShouldFailIfTestFailed

public void setShouldFailIfTestFailed(boolean shouldFailIfTestFailed)
Parameters:
shouldFailIfTestFailed - according to name
See Also:
isShouldFailIfTestFailed()

isExecutionTimeoutEnabled

public boolean isExecutionTimeoutEnabled()
Returns:
build execution timeout
See Also:
BuildTypeOptions.BT_EXECUTION_TIMEOUT

setExecutionTimeoutEnabled

public void setExecutionTimeoutEnabled(boolean executionTimeoutEnabled)
Parameters:
executionTimeoutEnabled - according to name
See Also:
isExecutionTimeoutEnabled()

getExecutionTimeout

public java.lang.String getExecutionTimeout()
Returns:
build execution timeout
See Also:
BuildTypeOptions.BT_EXECUTION_TIMEOUT

setExecutionTimeout

public void setExecutionTimeout(java.lang.String executionTimeout)
Parameters:
executionTimeout - execution timeout in minutes, 0 for no timeout
See Also:
getExecutionTimeout()

getArtifactPaths

public java.lang.String getArtifactPaths()
Returns:
artifact path
See Also:
BuildTypeSettings.getArtifactPaths()

setArtifactPaths

public void setArtifactPaths(java.lang.String artifactPaths)
Parameters:
artifactPaths - according to name
See Also:
getArtifactPaths()

isShouldFailBuildOnAnyErrorMessage

public boolean isShouldFailBuildOnAnyErrorMessage()
Returns:
build should fail on any error message
See Also:
BuildTypeOptions.BT_FAIL_ON_ANY_ERROR_MESSAGE

setShouldFailBuildOnAnyErrorMessage

public void setShouldFailBuildOnAnyErrorMessage(boolean shouldFailBuildOnAnyErrorMessage)
Parameters:
shouldFailBuildOnAnyErrorMessage - according to name
See Also:
isShouldFailBuildOnAnyErrorMessage()

isShouldFailOnExitCode

public boolean isShouldFailOnExitCode()
Returns:
build should fail on non-zero exit code
See Also:
BuildTypeOptions.BT_FAIL_ON_EXIT_CODE

setShouldFailOnExitCode

public void setShouldFailOnExitCode(boolean shouldFailOnExitCode)
Parameters:
shouldFailOnExitCode - according to name
See Also:
isShouldFailOnExitCode()

getBuildRunnerBean

public BuildRunnerBean getBuildRunnerBean()
Returns:
build runner parameters

getMultipleRunnersBean

public MultipleRunnersBean getMultipleRunnersBean()

reloadBuildRunnerBean

public void reloadBuildRunnerBean()
reload build runner parameters


createMultipleRunnersBean

@NotNull
protected abstract MultipleRunnersBean createMultipleRunnersBean()

getProject

public SProject getProject()
Returns:
project for the build configuration

getPublicKey

public java.lang.String getPublicKey()

getVcsRootsBean

@NotNull
public abstract VcsSettingsBean getVcsRootsBean()
Returns:
VcsSettings bean for the build configuration

setShouldFailBuildOnOOMEOrCrash

public void setShouldFailBuildOnOOMEOrCrash(boolean shouldFailBuildOnOOMEOrCrash)

isShouldFailBuildOnOOMEOrCrash

public boolean isShouldFailBuildOnOOMEOrCrash()

isCreateMode

public boolean isCreateMode()
Returns true if this form bean corresponds to not yet existing object, i.e. if build type or template are being created.

Returns:
see above

isTemplateBased

public boolean isTemplateBased()
Returns true if build type is template based

Returns:
see above

isTemplate

public boolean isTemplate()
Returns true if being edited object is template

Returns:
see above

getCurrentRunType

public static java.lang.String getCurrentRunType(@NotNull
                                                 javax.servlet.http.HttpServletRequest request)
Retrieves currently selected run type from specified request

Parameters:
request - request
Returns:
selected run type

getValueResolver

@NotNull
public abstract ValueResolver getValueResolver()
Returns resolver for parameter references.

Returns:
see above

isBranchesConfigured

public abstract boolean isBranchesConfigured()
Returns true if build configuration has configured branches

Returns: