Interface VcsFileContentProvider

  • All Superinterfaces:
    VcsExtension
    All Known Implementing Classes:
    VcsSupport

    public interface VcsFileContentProvider
    extends VcsExtension
    Provides file content operations for the underlying VCS
    Since:
    4.5 TODO: should be reworked to streams
    • 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 modification 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 check jetbrains.buildServer.vcs.CollectChangesPolicy.
        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.