jetbrains.buildServer.vcs
Interface VcsFileContentProvider

All Known Implementing Classes:
VcsSupport

public interface VcsFileContentProvider

Provides file content operations for the underlying VCS

Since:
4.5

Method Summary
 byte[] getContent(java.lang.String filePath, VcsRoot versionedRoot, java.lang.String version)
          Get binary content of the single file in modification set.
 byte[] getContent(VcsModification vcsModification, VcsChangeInfo change, VcsChangeInfo.ContentType contentType, VcsRoot vcsRoot)
          Get binary content of the single file in modification set.
 

Method Detail

getContent

@NotNull
byte[] getContent(@NotNull
                          VcsModification vcsModification,
                          @NotNull
                          VcsChangeInfo change,
                          @NotNull
                          VcsChangeInfo.ContentType contentType,
                          @NotNull
                          VcsRoot vcsRoot)
                  throws VcsException
Get binary content of the single file in modification set.

Parameters:
vcsModification - modification set.
change - specified change of file.
contentType - specified what content should be return - before modicication or after it.
vcsRoot - current settings.
Returns:
content of the file specified by VcsChange, by version, specified in 'contentType' parameter.
Throws:
VcsException - if some problem occurred.
VcsFileNotFoundException - when no such file found. If "file not found" condition cannot be detected easily the implementation may throw jetbrains.buildServer.vcs.VcsException. In this case some TeamCity functions may work inefficiently, for example the file content cache.

getContent

@NotNull
byte[] getContent(@NotNull
                          java.lang.String filePath,
                          @NotNull
                          VcsRoot versionedRoot,
                          @NotNull
                          java.lang.String version)
                  throws VcsException
Get binary content of the single file in modification set.

Parameters:
filePath - file path relative to the project root, "checkout root" from vcs root should not be included
versionedRoot - current settings.
version - version returned by VcsModification.getVersion() or VcsSupportCore.getCurrentVersion(VcsRoot).
Returns:
specified file content, corresponding to the repository version specified in 'version' parameter.
Throws:
VcsException - if some problem occurred.
VcsFileNotFoundException - when no such file found. If "file not found" condition cannot be detected easily the implementation may throw jetbrains.buildServer.vcs.VcsException. In this case some TeamCity functions may work inefficiently, for example the file content cache.