Interface RtCollectionContext


public interface RtCollectionContext
Contains all the information and methods needed for the repository file's collection processing.
Since:
3.17.0
  • Method Details

    • getProjectId

      @NotNull String getProjectId()
      Returns:
      the current project id.
    • getConfiguration

      @NotNull RtRepositoryCollectionConfiguration getConfiguration()
      Returns:
      the current repository configuration.
    • shouldBeCollected

      boolean shouldBeCollected(@NotNull RtFileProperties fileInfo)
      Checks if the current file should be collected according to the current collector configuration.
      Parameters:
      fileInfo - repository file information.
      Returns:
      true if this file is suitable for the current collector settings, false otherwise.
    • collect

      void collect(@NotNull RtFile sourceFile)
      Sends a file for further processing (parsing) after it was collected.
      Parameters:
      sourceFile - repository file info.
    • getRememberedState

      @Nullable String getRememberedState(@NotNull String branchId)
      Parameters:
      branchId - of the current repository branch.
      Returns:
      the last revision for branchId that was already processed or null if the process is run for the first time.
    • setRememberedState

      void setRememberedState(@NotNull String branchId, @NotNull String state)
      Sets state as the last processed revision under specified branchId.
      Parameters:
      branchId - repository branch.
      state - opaque string used to mark last processed revision.
    • create

      @NotNull RtCollectionModelFactory create()
      Returns:
      the factory for creating collection model entities.
    • locationRemoved

      void locationRemoved(@NotNull String branchId, @NotNull ILocation location)
      Notifies the collector engine that the file or folder identified by specified location was removed and its related information should also be removed from persistent storage. This method must be called each time a file or folder is removed from the repository.
      Parameters:
      branchId - the id of branch where the file or folder was located.
      location - location of file or folder that was removed. Location is absolute and starts from repository root.