Package jetbrains.buildServer.vcs.impl
Class VcsContentManagerImpl
- java.lang.Object
-
- jetbrains.buildServer.vcs.impl.VcsContentManagerImpl
-
- All Implemented Interfaces:
VcsContentManager
,VcsContentManagerEx
public class VcsContentManagerImpl extends Object implements VcsContentManagerEx
-
-
Constructor Summary
Constructors Constructor Description VcsContentManagerImpl(VcsContentCache vcsContentCache, VcsRegistry registry, VersionedSettingsManager versionedSettingsManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
getContentAfter(VcsModification parentModification, VcsChangeInfo change)
byte[]
getContentBefore(VcsModification parentModification, VcsChangeInfo change)
byte[]
getFileContent(List<VcsRootInstanceEntry> vcsRootEntries, String relativePath)
Get the file content for the latest revision detected by TeamCity during the last checking for changes process, searching it in the provided list of VCS rootsbyte[]
getFileContent(List<VcsRootInstanceEntry> vcsRootEntries, String relativePath, boolean latest)
Same asVcsContentManager.getFileContent(List, String)
if argument latest is false.byte[]
getFileContent(Build build, String filePath)
Get binary content of the single file in modification set.byte[]
getFileContent(SBuildType buildType, String relativePath)
Get the file content for the latest revision detected by TeamCity during the last checking for changes process, for given relative path in the given build configuration.
-
-
-
Constructor Detail
-
VcsContentManagerImpl
public VcsContentManagerImpl(@NotNull VcsContentCache vcsContentCache, @NotNull VcsRegistry registry, @NotNull VersionedSettingsManager versionedSettingsManager)
-
-
Method Detail
-
getContentBefore
@NotNull public byte[] getContentBefore(VcsModification parentModification, VcsChangeInfo change) throws VcsException
- Specified by:
getContentBefore
in interfaceVcsContentManagerEx
- Throws:
VcsException
-
getContentAfter
@NotNull public byte[] getContentAfter(VcsModification parentModification, VcsChangeInfo change) throws VcsException
- Specified by:
getContentAfter
in interfaceVcsContentManagerEx
- Throws:
VcsException
-
getFileContent
@NotNull public byte[] getFileContent(Build build, String filePath) throws VcsException
Description copied from interface:VcsContentManager
Get binary content of the single file in modification set.- Specified by:
getFileContent
in interfaceVcsContentManager
- Parameters:
build
- build for which file content should be obtainedfilePath
- - relative file path regarding to the project root, "checkout root" from vcs root should not be included- Returns:
- - specified file content, corresponding to the build
- Throws:
VcsException
- - throw this exception if some problem occurred while collecting changes or changes cannot be collected because of invalid configuration, or if file, corresponding to specified path cannot be found.
-
getFileContent
@Nullable public byte[] getFileContent(@NotNull SBuildType buildType, @Nullable String relativePath) throws VcsException
Description copied from interface:VcsContentManager
Get the file content for the latest revision detected by TeamCity during the last checking for changes process, for given relative path in the given build configuration.- Specified by:
getFileContent
in interfaceVcsContentManager
- Parameters:
buildType
- build configurationrelativePath
- relative path to the file to be searched in the project VCS roots- Returns:
- null if no corresponding file found
- Throws:
VcsException
- when VCS access problem occurs
-
getFileContent
@Nullable public byte[] getFileContent(@NotNull List<VcsRootInstanceEntry> vcsRootEntries, @Nullable String relativePath) throws VcsException
Description copied from interface:VcsContentManager
Get the file content for the latest revision detected by TeamCity during the last checking for changes process, searching it in the provided list of VCS roots- Specified by:
getFileContent
in interfaceVcsContentManager
- Parameters:
vcsRootEntries
- search file content in a given list of VCS root entriesrelativePath
- relative path to the file to be searched in the project VCS roots- Returns:
- null if no corresponding file found
- Throws:
VcsException
- when VCS access problem occurs- See Also:
VcsRootEntry
-
getFileContent
@Nullable public byte[] getFileContent(@NotNull List<VcsRootInstanceEntry> vcsRootEntries, @Nullable String relativePath, boolean latest) throws VcsException
Description copied from interface:VcsContentManagerEx
Same asVcsContentManager.getFileContent(List, String)
if argument latest is false. If latest is true then TeamCity will take the file content for the latest possible revision, in other words it will first go the the repository for the current state and then take the content for the revision from this state.- Specified by:
getFileContent
in interfaceVcsContentManagerEx
latest
- if false then returned content will correspond to the revision which was seen by the server during the last polling process, if true, then the most recent content is returned- Throws:
VcsException
-
-