jetbrains.buildServer.vcs
Interface SVcsRoot

All Superinterfaces:
java.lang.Comparable<SVcsRoot>, jetbrains.buildServer.log.Loggable, SPersistentEntity, VcsRoot, XmlExternalizable
All Known Subinterfaces:
VcsRootInstance

public interface SVcsRoot
extends VcsRoot, SPersistentEntity, XmlExternalizable, java.lang.Comparable<SVcsRoot>

Server side class for the vcs root.


Field Summary
 
Fields inherited from interface jetbrains.buildServer.vcs.VcsRoot
SECURE_PROPERTY_PREFIX
 
Method Summary
 void checkAccessibleFrom(SBuildType buildType)
          Checks that VCS root can be attached to specified configuration.
 void checkAccessibleFrom(SProject project)
          Checks that VCS root can be attached to configurations of specified project.
 java.io.File getConfigurationFile()
          Returns the file where this VCS root is persisted (or will be persisted to).
 java.lang.String getDescription()
           
 java.lang.String getExternalId()
          Returns the external identifier.
 int getModificationCheckInterval()
          returns modification check interval in seconds
 int getNumberOfUsagesInProjects()
           
 SProject getProject()
           
 VcsRootScope getScope()
          Returns scope of this VCS root
 java.util.Map<SBuildType,CheckoutRules> getUsages()
           
 java.util.Collection<SProject> getUsagesInProjects()
           
 java.lang.String getVcsDisplayName()
          Returns VCS plugin display name
 boolean isAccessibleFrom(SBuildType buildType)
          Returns true if VCS root can be attached to specified configuration.
 boolean isAccessibleFrom(SProject project)
          Returns true if VCS root can be attached to configurations of specified project.
 boolean isUseDefaultModificationCheckInterval()
          Returns if 'use default modification check interval' mode is enabled for the root.
 void moveToProject(SProject target)
          Moves this VCS root to specified target project.
 void persist()
          Persists this VCS root on disk
 void remove()
          Removes this VCS root from it's project.
 void restoreDefaultModificationCheckInterval()
          Switched to 'use default modification check interval' mode.
 void setExternalId(java.lang.String externalId)
          Changes external id of this VCS root and persists this VCS root configuration to disk
 void setModificationCheckInterval(int value)
          Changes modification check interval for the root.
 void setName(java.lang.String newName)
          Sets new name to this VCS root.
 void setProperties(java.util.Map<java.lang.String,java.lang.String> props)
          Sets new properties to this VCS root.
 void setVcsName(java.lang.String vcsName)
          Sets name of version control to this VCS root.
 
Methods inherited from interface jetbrains.buildServer.vcs.VcsRoot
convertToPresentableString, convertToString, getId, getName, getProperties, getPropertiesHash, getProperty, getProperty, getPublicProperties, getVcsName
 
Methods inherited from interface jetbrains.buildServer.log.Loggable
describe
 
Methods inherited from interface jetbrains.buildServer.serverSide.SPersistentEntity
getName, getParent
 
Methods inherited from interface jetbrains.buildServer.XmlExternalizable
writeTo
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getExternalId

@NotNull
java.lang.String getExternalId()
Description copied from interface: SPersistentEntity
Returns the external identifier.

Specified by:
getExternalId in interface SPersistentEntity
Returns:
human editable identifier of this VCS root
Since:
8.0

getScope

@NotNull
VcsRootScope getScope()
Returns scope of this VCS root

Returns:
scope of this VCS root

getProject

@NotNull
SProject getProject()
Returns:
project this VCS root belongs to
Since:
8.0

getModificationCheckInterval

int getModificationCheckInterval()
returns modification check interval in seconds

Returns:
modification check interval configured for the root.

setModificationCheckInterval

void setModificationCheckInterval(int value)
Changes modification check interval for the root.

Parameters:
value - seconds.

isUseDefaultModificationCheckInterval

boolean isUseDefaultModificationCheckInterval()
Returns if 'use default modification check interval' mode is enabled for the root.

Returns:
if 'use default modification check interval' mode is enabled for the root.

restoreDefaultModificationCheckInterval

void restoreDefaultModificationCheckInterval()
Switched to 'use default modification check interval' mode.


isAccessibleFrom

boolean isAccessibleFrom(@NotNull
                         SBuildType buildType)
Returns true if VCS root can be attached to specified configuration.

Parameters:
buildType - build configuration
Returns:
true if VCS roots with this scope are accessible from the specified build configuration.

isAccessibleFrom

boolean isAccessibleFrom(@NotNull
                         SProject project)
Returns true if VCS root can be attached to configurations of specified project.

Parameters:
project - project
Returns:
true if VCS roots with this scope are accessible from the specified project
Since:
8.0

checkAccessibleFrom

void checkAccessibleFrom(@NotNull
                         SBuildType buildType)
                         throws InvalidVcsRootScopeException
Checks that VCS root can be attached to specified configuration.

Parameters:
buildType - build configuration
Throws:
InvalidVcsRootScopeException - if VCS root is inaccessible

checkAccessibleFrom

void checkAccessibleFrom(@NotNull
                         SProject project)
                         throws InvalidVcsRootScopeException
Checks that VCS root can be attached to configurations of specified project.

Parameters:
project - project
Throws:
InvalidVcsRootScopeException - if VCS root is not accessible
Since:
5.0

getDescription

@NotNull
java.lang.String getDescription()
Returns:
short human readable description of the root. Composed by underlying VCS support.
Since:
4.5

getVcsDisplayName

@NotNull
java.lang.String getVcsDisplayName()
Returns VCS plugin display name

Returns:
see above, returns null if VCS plugin corresponding to VCS root does not exist
Since:
4.5

getUsages

@NotNull
java.util.Map<SBuildType,CheckoutRules> getUsages()
Returns:
all usages of this VCS root in various build configurations.
Since:
6.5

getNumberOfUsagesInProjects

int getNumberOfUsagesInProjects()
Returns:
number of projects using this VCS root in their templates or configurations.
Since:
8.0

getUsagesInProjects

@NotNull
java.util.Collection<SProject> getUsagesInProjects()
Returns:
projects using this VCS root in their templates or configurations.
Since:
8.0

setVcsName

void setVcsName(@NotNull
                java.lang.String vcsName)
Sets name of version control to this VCS root.

Parameters:
vcsName - name of version control
Since:
8.0

setName

void setName(@NotNull
             java.lang.String newName)
             throws DuplicateVcsRootNameException,
                    InvalidNameException
Sets new name to this VCS root.

Parameters:
newName - new VCS root name
Throws:
DuplicateVcsRootNameException - if VCS root with such name already exists in VCS root project
InvalidNameException
Since:
8.0

setExternalId

void setExternalId(@NotNull
                   java.lang.String externalId)
                   throws DuplicateExternalIdException,
                          InvalidIdentifierException
Changes external id of this VCS root and persists this VCS root configuration to disk

Parameters:
externalId - new external id
Throws:
DuplicateExternalIdException - if newly specified external id already exists
InvalidIdentifierException
Since:
8.0

setProperties

void setProperties(@NotNull
                   java.util.Map<java.lang.String,java.lang.String> props)
Sets new properties to this VCS root.

Parameters:
props - new VCS root properties
Since:
8.0

persist

void persist()
             throws ProjectNotFoundException
Persists this VCS root on disk

Specified by:
persist in interface SPersistentEntity
Throws:
ProjectNotFoundException - if project where this VCS root belongs does not exist
Since:
8.0

remove

void remove()
            throws VcsRootUsedException,
                   ProjectNotFoundException
Removes this VCS root from it's project.

Throws:
VcsRootUsedException - if VCS root is used in some configuration or template and cannot be removed
ProjectNotFoundException - if project where this VCS root belongs does not exist
Since:
8.0

moveToProject

void moveToProject(@NotNull
                   SProject target)
                   throws ScopeCannotBeChangedException
Moves this VCS root to specified target project. Upon successful completion affected configuration settings will be persisted.

Parameters:
vcsRoot - vcs root to move
target - target project
Throws:
ScopeCannotBeChangedException - if move is impossible because of VCS root usages
Since:
8.0

getConfigurationFile

@NotNull
java.io.File getConfigurationFile()
Returns the file where this VCS root is persisted (or will be persisted to).

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