com.microsoft.tfs.core.clients.build
Interface IBuildDefinition

All Superinterfaces:
IBuildGroupItem

public interface IBuildDefinition
extends IBuildGroupItem


Method Summary
 IRetentionPolicy addRetentionPolicy(BuildReason reason, BuildStatus status, int numberToKeep, DeleteOptions deleteOptions)
          Adds a retention policy to the list of retention policies for the build definition.
 ISchedule addSchedule()
          Adds a schedule to the list of schedules for the build definition.
 IBuildRequest createBuildRequest()
          Creates an IBuildRequest from the build definition with values for BuildAgent and DropLocation set to DefaultBuildAgent and DefaultDropLocation.
 IBuildDetail createManualBuild(java.lang.String buildNumber)
          Creates a BuildDetail record in the TFS Build database.
 IBuildDetail createManualBuild(java.lang.String buildNumber, java.lang.String dropLocation)
          Creates a BuildDetail record in the TFS Build database.
 IBuildDetail createManualBuild(java.lang.String buildNumber, java.lang.String dropLocation, BuildStatus buildStatus, IBuildController controller, java.lang.String requestedFor)
          Creates a BuildDetail record in the TFS Build database.
 IBuildDefinitionSpec createSpec()
          Creates a new build definition specification for this definition.
 void delete()
          Deletes this build definition from the server.
 java.util.Map<java.lang.String,java.lang.Object> getAttachedProperties()
          Attached properties
 int getBatchSize()
          The maximum batch size for queued builds when using the Gated continuous integration type.
 IBuildController getBuildController()
          The build controller that builds this build definition.
 java.lang.String getBuildControllerURI()
          The Uri of the build controller that builds this build definition.
 IBuildServer getBuildServer()
          Gets the server that owns the build definition.
 java.lang.String getConfigurationFolderPath()
           
 int getContinuousIntegrationQuietPeriod()
          The quiet period associated with a 'Batch' continuous integration type.
 ContinuousIntegrationType getContinuousIntegrationType()
          The ContinuousIntegrationType of the definition.
 java.util.Calendar getDateCreated()
          The date and time at which this build definition was created.
 java.lang.String getDefaultDropLocation()
          The default location to drop the output of builds generated by the definition.
 com.microsoft.tfs.core.clients.build.internal.soapextensions.BuildDefinitionSourceProvider getDefaultSourceProvider()
          Get default source provider.
 java.lang.String getDescription()
          The description of the definition.
 java.lang.String getID()
          The Id portion of the build definition's Uri.
 java.lang.String getLastBuildURI()
          Gets the URI of the last build completed for this build definition regardless of status.
 java.lang.String getLastGoodBuildLabel()
          The name of the label of the last build generated for the build definition for which compilation and tests were successful.
 java.lang.String getLastGoodBuildURI()
          Gets the URI of the last build completed for this build definition with a successful compilation and test status.
 IProcessTemplate getProcess()
          The build process template for the definition.
 java.lang.String getProcessParameters()
          The default process parameters, used to initialize new build processes.
 DefinitionQueueStatus getQueueStatus()
          The queue status of the build definition.
 IRetentionPolicy[] getRetentionPolicies()
          A list of the retention policies for the definition.
 ISchedule[] getSchedules()
          A list of schedules for the definition
 com.microsoft.tfs.core.clients.build.internal.soapextensions.BuildDefinitionSourceProvider[] getSourceProviders()
          Get a list of source providers.
 DefinitionTriggerType getTriggerType()
          Gets or sets the definition system trigger.
 IWorkspaceTemplate getWorkspace()
          The workspace template for the definition.
 boolean isEnabled()
          The enabled status of the build definition - when false, no new builds can be generated for the definition.
 IBuildDetail[] queryBuilds()
          Gets all of the builds for this build definition.
 void save()
          Saves any changes made to the object to the server.
 void setBatchSize(int batchSize)
           
 void setBuildController(IBuildController controller)
           
 void setConfigurationFolderPath(java.lang.String path)
           
 void setContinuousIntegrationQuietPeriod(int value)
           
 void setContinuousIntegrationType(ContinuousIntegrationType value)
           
 void setDefaultDropLocation(java.lang.String value)
           
 void setDefaultSourceProvider(com.microsoft.tfs.core.clients.build.internal.soapextensions.BuildDefinitionSourceProvider provider)
          Set default source provider.
 void setDescription(java.lang.String description)
           
 void setEnabled(boolean value)
           
 void setProcess(IProcessTemplate value)
           
 void setProcessParameters(java.lang.String value)
           
 void setQueueStatus(DefinitionQueueStatus status)
           
 void setTriggerType(DefinitionTriggerType value)
           
 
Methods inherited from interface com.microsoft.tfs.core.clients.build.IBuildGroupItem
getFullPath, getName, getTeamProject, getURI, refresh, setName
 

Method Detail

getBatchSize

int getBatchSize()
The maximum batch size for queued builds when using the Gated continuous integration type.

Returns:

setBatchSize

void setBatchSize(int batchSize)

getBuildController

IBuildController getBuildController()
The build controller that builds this build definition.

Returns:

setBuildController

void setBuildController(IBuildController controller)

getBuildControllerURI

java.lang.String getBuildControllerURI()
The Uri of the build controller that builds this build definition.

Returns:

getDescription

java.lang.String getDescription()
The description of the definition.

Returns:

setDescription

void setDescription(java.lang.String description)

getDefaultDropLocation

java.lang.String getDefaultDropLocation()
The default location to drop the output of builds generated by the definition.

Returns:

setDefaultDropLocation

void setDefaultDropLocation(java.lang.String value)

isEnabled

boolean isEnabled()
The enabled status of the build definition - when false, no new builds can be generated for the definition.

Returns:

setEnabled

void setEnabled(boolean value)

getQueueStatus

DefinitionQueueStatus getQueueStatus()
The queue status of the build definition.

Returns:

setQueueStatus

void setQueueStatus(DefinitionQueueStatus status)

getID

java.lang.String getID()
The Id portion of the build definition's Uri.

Returns:

getRetentionPolicies

IRetentionPolicy[] getRetentionPolicies()
A list of the retention policies for the definition.

Returns:

getSchedules

ISchedule[] getSchedules()
A list of schedules for the definition

Returns:

getSourceProviders

com.microsoft.tfs.core.clients.build.internal.soapextensions.BuildDefinitionSourceProvider[] getSourceProviders()
Get a list of source providers.

Returns:

getDefaultSourceProvider

com.microsoft.tfs.core.clients.build.internal.soapextensions.BuildDefinitionSourceProvider getDefaultSourceProvider()
Get default source provider.

Returns:

setDefaultSourceProvider

void setDefaultSourceProvider(com.microsoft.tfs.core.clients.build.internal.soapextensions.BuildDefinitionSourceProvider provider)
Set default source provider.

Parameters:
provider -

getWorkspace

IWorkspaceTemplate getWorkspace()
The workspace template for the definition.

Returns:

getLastBuildURI

java.lang.String getLastBuildURI()
Gets the URI of the last build completed for this build definition regardless of status.

Returns:

getLastGoodBuildURI

java.lang.String getLastGoodBuildURI()
Gets the URI of the last build completed for this build definition with a successful compilation and test status.

Returns:

getLastGoodBuildLabel

java.lang.String getLastGoodBuildLabel()
The name of the label of the last build generated for the build definition for which compilation and tests were successful.

Returns:

getProcess

IProcessTemplate getProcess()
The build process template for the definition.

Returns:

setProcess

void setProcess(IProcessTemplate value)

getProcessParameters

java.lang.String getProcessParameters()
The default process parameters, used to initialize new build processes.

Returns:

setProcessParameters

void setProcessParameters(java.lang.String value)

getAttachedProperties

java.util.Map<java.lang.String,java.lang.Object> getAttachedProperties()
Attached properties

Returns:

getTriggerType

DefinitionTriggerType getTriggerType()
Gets or sets the definition system trigger.

Returns:

setTriggerType

void setTriggerType(DefinitionTriggerType value)

getDateCreated

java.util.Calendar getDateCreated()
The date and time at which this build definition was created.

Returns:

getContinuousIntegrationQuietPeriod

int getContinuousIntegrationQuietPeriod()
The quiet period associated with a 'Batch' continuous integration type. New builds will not be queued for changesets which are encountered during the quiet period. Instead a single build will be queued for all changesets which occurred during the quiet period once it has lapsed. This value is used as an offset (in minutes) from the starting time of the last queued build for Continuous Integration.

Returns:

setContinuousIntegrationQuietPeriod

void setContinuousIntegrationQuietPeriod(int value)

addRetentionPolicy

IRetentionPolicy addRetentionPolicy(BuildReason reason,
                                    BuildStatus status,
                                    int numberToKeep,
                                    DeleteOptions deleteOptions)
Adds a retention policy to the list of retention policies for the build definition.

Parameters:
reason - The reason of the retention policy.
status -
numberToKeep - The number to keep of the retention policy.
deleteOptions - The parts of the build to delete.
Returns:
The added retention policy.

addSchedule

ISchedule addSchedule()
Adds a schedule to the list of schedules for the build definition. The schedule has no affect if the ContinuousIntegrationType is not Schedule. Only one schedule is allowed in the list.

Returns:
The schedule that was added.

createBuildRequest

IBuildRequest createBuildRequest()
Creates an IBuildRequest from the build definition with values for BuildAgent and DropLocation set to DefaultBuildAgent and DefaultDropLocation.

Returns:
The new build request, which can be used to Queue a build.

createManualBuild

IBuildDetail createManualBuild(java.lang.String buildNumber)
Creates a BuildDetail record in the TFS Build database. Build Information and other changes can be made to the IBuildDetail object

Parameters:
buildNumber - Build number to assign to the new build.
Returns:
The new IBuildDetail object that now exists in the database.

createManualBuild

IBuildDetail createManualBuild(java.lang.String buildNumber,
                               java.lang.String dropLocation)
Creates a BuildDetail record in the TFS Build database. Build Information and other changes can be made to the IBuildDetail object returned.

Parameters:
buildNumber - Build number to assign to the new build.
dropLocation - Location of the binary files created by the manual build.
Returns:
The new IBuildDetail object that now exists in the database.<

createManualBuild

IBuildDetail createManualBuild(java.lang.String buildNumber,
                               java.lang.String dropLocation,
                               BuildStatus buildStatus,
                               IBuildController controller,
                               java.lang.String requestedFor)
Creates a BuildDetail record in the TFS Build database. Build Information and other changes can be made to the IBuildDetail object returned.

Parameters:
buildNumber - Build number to assign to the new build.
dropLocation - Location of the binary files created by the manual build.
buildStatus - The status that you want the build to have. PartiallySucceeded is not supported.
controller - Agent used to create the build.
requestedFor - The user that requested the build.
Returns:
The new IBuildDetail object that now exists in the database.

delete

void delete()
Deletes this build definition from the server. Note: this will throw if there are builds pending or existing for this definition.


save

void save()
Saves any changes made to the object to the server.


createSpec

IBuildDefinitionSpec createSpec()
Creates a new build definition specification for this definition.

Returns:
The new build definition specification.

queryBuilds

IBuildDetail[] queryBuilds()
Gets all of the builds for this build definition.

Returns:
The builds for this build definition.

getBuildServer

IBuildServer getBuildServer()
Gets the server that owns the build definition.

Returns:

getContinuousIntegrationType

ContinuousIntegrationType getContinuousIntegrationType()
The ContinuousIntegrationType of the definition. Individual ensures that a new build is queued for every check in made to version control which contains files that affect the workspace associated with the definition. For more information regarding the Batch type, see .

Returns:

setContinuousIntegrationType

void setContinuousIntegrationType(ContinuousIntegrationType value)

getConfigurationFolderPath

java.lang.String getConfigurationFolderPath()

setConfigurationFolderPath

void setConfigurationFolderPath(java.lang.String path)


© 2015 Microsoft. All rights reserved.