Package jetbrains.buildServer.vcs.impl
Class VcsRootImpl
- java.lang.Object
-
- jetbrains.buildServer.vcs.impl.VcsRootImpl
-
- Direct Known Subclasses:
DeletedVcsRoot,InaccessibleVcsRoot,SVcsRootImpl,VcsServiceRoot
public class VcsRootImpl extends Object implements VcsRoot
Version control connection settings.
-
-
Field Summary
Fields Modifier and Type Field Description static StringBRANCH_SPEC_PROPDeprecated.protected static StringCHECKOUT_ROOTDeprecated.static StringUNKNOWN_ROOT_NAMEstatic StringVCS_NAME_PROPDeprecated.static StringVCS_ROOT_NAME_PROPDeprecated.-
Fields inherited from interface jetbrains.buildServer.vcs.VcsRoot
SECURE_PROPERTY_PREFIX
-
-
Constructor Summary
Constructors Constructor Description VcsRootImpl(long id, String vcsName)Creates new settings object on id and associated version control name.VcsRootImpl(long id, String vcsName, Map<String,String> properties)Create VcsRootImpl object, the most generic constructorVcsRootImpl(long id, Map<String,String> properties)Creates new settings on id and properties set.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddProperty(String propertyName, String propertyValue)Adds new property.Stringdescribe(boolean verbose)booleanequals(Object o)StringgetExternalId()longgetId()returns root internal idStringgetName()returns descriptive name of the vcs rootMap<String,String>getProperties()Returns mapping from a property name to its valueStringgetProperty(String propertyName)Provides specified property valueStringgetProperty(String propertyName, String defaultValue)Provides specified property value or default value if property is not definedStringgetVcsName()Returns name of the corresponding version control.inthashCode()static booleanisEquivalentRoots(VcsRoot root1, VcsRoot root2)voidsetExternalId(String externalId)voidsetName(String name)Changes VCS root name.voidsetProperties(Map<String,String> map)Adds number of properties.voidsetVcsName(String vcsName)Sets new version control name (name of version control plugin)StringtoString()
-
-
-
Field Detail
-
UNKNOWN_ROOT_NAME
public static final String UNKNOWN_ROOT_NAME
- See Also:
- Constant Field Values
-
VCS_NAME_PROP
@NonNls @Deprecated public static final String VCS_NAME_PROP
Deprecated.- See Also:
- Constant Field Values
-
VCS_ROOT_NAME_PROP
@NonNls @Deprecated public static final String VCS_ROOT_NAME_PROP
Deprecated.- See Also:
- Constant Field Values
-
BRANCH_SPEC_PROP
@NonNls @Deprecated public static final String BRANCH_SPEC_PROP
Deprecated.- See Also:
- Constant Field Values
-
CHECKOUT_ROOT
@NonNls @Deprecated protected static final String CHECKOUT_ROOT
Deprecated.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
VcsRootImpl
public VcsRootImpl(long id, @NotNull String vcsName, @NotNull Map<String,String> properties)Create VcsRootImpl object, the most generic constructor
-
VcsRootImpl
public VcsRootImpl(long id, String vcsName)Creates new settings object on id and associated version control name. The resulting VCSRoot will have unset name.- Parameters:
id- vcs root id.vcsName- version control name.
-
-
Method Detail
-
getName
@NotNull public String getName()
Description copied from interface:VcsRootreturns descriptive name of the vcs root
-
getId
public long getId()
Description copied from interface:VcsRootreturns root internal id
-
addProperty
public void addProperty(String propertyName, String propertyValue)
Adds new property.- Parameters:
propertyName- property name.propertyValue- property value.
-
setProperties
public void setProperties(@NotNull Map<String,String> map)Adds number of properties.- Parameters:
map- properties map.
-
getVcsName
@NotNull public String getVcsName()
Description copied from interface:VcsRootReturns name of the corresponding version control.- Specified by:
getVcsNamein interfaceVcsRoot- Returns:
- name of the corresponding version control
-
getProperty
public String getProperty(@NotNull String propertyName)
Description copied from interface:VcsRootProvides specified property value- Specified by:
getPropertyin interfaceVcsRoot- Parameters:
propertyName- name of the property whose value is requested- Returns:
- value of a specified property
-
getProperty
public String getProperty(@NotNull String propertyName, String defaultValue)
Description copied from interface:VcsRootProvides specified property value or default value if property is not defined- Specified by:
getPropertyin interfaceVcsRoot- Parameters:
propertyName- name of the property whose value is requesteddefaultValue- default value which is returned if property value was not specified explicitly- Returns:
- - value of a specified property or 'defaultValue' if it is not defined
-
getProperties
@NotNull public Map<String,String> getProperties()
Description copied from interface:VcsRootReturns mapping from a property name to its value- Specified by:
getPropertiesin interfaceVcsRoot- Returns:
- map of all defined properties
-
describe
@NotNull public String describe(boolean verbose)
-
setName
public void setName(@NotNull String name)Changes VCS root name.- Parameters:
name- new VCS root name.
-
setVcsName
public void setVcsName(@NotNull String vcsName)Sets new version control name (name of version control plugin)- Parameters:
vcsName- new version control name
-
setExternalId
public void setExternalId(@NotNull String externalId)- Parameters:
externalId- External ID for this VCS Root- Since:
- 2021.2
-
getExternalId
@NotNull public String getExternalId()
- Specified by:
getExternalIdin interfaceVcsRoot- Returns:
- externalID for this VCS Root, if it was set.
- Since:
- 2021.2
-
isEquivalentRoots
@Deprecated public static boolean isEquivalentRoots(VcsRoot root1, VcsRoot root2)
Deprecated.Checks whether the specified VCS roots are equivalent. VCS roots are considered equivalent if they both represent same VcsSupport and contain same properties.- Parameters:
root1- VCS rootroot2- VCS root- Returns:
- true if roots are equivalent
-
-