Class VcsContentManagerImpl

    • Method Detail

      • 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 interface VcsContentManager
        Parameters:
        build - build for which file content should be obtained
        filePath - - 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 interface VcsContentManager
        Parameters:
        buildType - build configuration
        relativePath - 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 interface VcsContentManager
        Parameters:
        vcsRootEntries - search file content in a given list of VCS root entries
        relativePath - 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 as VcsContentManager.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 interface VcsContentManagerEx
        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