jetbrains.buildServer.serverSide
Interface BuildTypeIdentity

All Superinterfaces:
SPersistentEntity
All Known Subinterfaces:
BuildTypeTemplate, RemoteBuildType, SBuildType

public interface BuildTypeIdentity
extends SPersistentEntity

Base interface for build template and build configurations, containing only identifiers and related things. Doesn't contain build settings.

Since:
8.0
Author:
Leonid Bushuev from JetBrains

Method Summary
 java.io.File getConfigurationFile()
          Returns the configuration file where this build type or template is persisted (or will be persisted to).
 java.lang.String getExternalId()
          Returns the external identifier.
 java.lang.String getFullName()
          Name of the project and name of the identity.
 java.lang.String getInternalId()
          Returns the internal identifier.
 java.lang.String getName()
          The name of the identity.
 SProject getProject()
          Returns the project this build type entity belongs to.
 void persist()
          Persists this build template or configuration settings on disk.
 void remove()
          Removes this build template or configuration.
 void setExternalId(java.lang.String newExternalId)
          Changes the external id of this build template or build configuration.
 void setName(java.lang.String name)
          Sets name of this build type or template
 
Methods inherited from interface jetbrains.buildServer.serverSide.SPersistentEntity
getParent
 

Method Detail

getProject

@NotNull
SProject getProject()
Returns the project this build type entity belongs to.

Returns:
the project this build type entity belongs to.

getInternalId

@NotNull
java.lang.String getInternalId()
Returns the internal identifier.

Returns:
the internal identifier.

getExternalId

@NotNull
java.lang.String getExternalId()
Returns the external identifier.

Specified by:
getExternalId in interface SPersistentEntity
Returns:
the external identifier.

setExternalId

void setExternalId(@NotNull
                   java.lang.String newExternalId)
                   throws InvalidIdentifierException,
                          DuplicateExternalIdException
Changes the external id of this build template or build configuration.

This method persists the current entity, and can persist also dependent entities.

Parameters:
externalId - new external identifier. Must be unique (case insensitively) in the scope of all build templates and build configurations (in other words, two projects with build configurations with same external id are not allowed).
Throws:
InvalidIdentifierException - wrond identifier
DuplicateExternalIdException - a build template or a build configuration

getName

@NotNull
java.lang.String getName()
The name of the identity.

Specified by:
getName in interface SPersistentEntity
Returns:
see above.
See Also:
getFullName(), setName(String)

setName

void setName(@NotNull
             java.lang.String name)
Sets name of this build type or template

Parameters:
name - the new name
See Also:
getName(), getFullName()

getFullName

@NotNull
java.lang.String getFullName()
Name of the project and name of the identity.

See Also:
getName()

persist

void persist()
             throws PersistFailedException
Persists this build template or configuration settings on disk. Should be called each time when settings are changed, otherwise the changes will be lost after the server restart.

Specified by:
persist in interface SPersistentEntity
Throws:
PersistFailedException - if persisting failed
Since:
8.0

remove

void remove()
Removes this build template or configuration.

This method also makes all changes (related to removing this build type/template) on the disk and in the database, so you don't need to call the persist() after this method.

Since:
8.0

getConfigurationFile

@NotNull
java.io.File getConfigurationFile()
Returns the configuration file where this build type or template is persisted (or will be persisted to).

Specified by:
getConfigurationFile in interface SPersistentEntity
Returns:
see above.
Since:
8.0