Interface IRemoteRepository2

All Known Implementing Classes:
FileRepository, GITRemoteRepository2, HTTPRemoteRepository, SVNRemoteRepository2

public interface IRemoteRepository2
Interface for any remote repository implementation.
  • Method Details

    • init

      void init(RepositoryDefinition repo, File dir, ProjectTeamSettings teamSettings) throws Exception
      Initialize repository provider.
      Parameters:
      repo - repository description instance
      dir - directory for store files
      teamSettings - team settings object for project
      Throws:
      Exception
    • getFileVersion

      String getFileVersion(String file) throws Exception
      Get file version.
      Throws:
      Exception
    • switchToVersion

      void switchToVersion(String version) throws Exception
      Throws:
      Exception
    • addForCommit

      void addForCommit(String path) throws Exception
      Add the specified file in preparation for commit (e.g. git add, svn add).
      Parameters:
      path - The relative path of the item from the root of the repo (should not start with a /)
      Throws:
      Exception - if error occurred
    • addForDeletion

      void addForDeletion(String path) throws Exception
      remove the specified file in preparation for commit (e.g. git rm, svn delete).
      Parameters:
      path - The relative path of the item from the root of the repo (should not start with a /)
      Throws:
      Exception - if error occurred
    • getLocalDirectory

      File getLocalDirectory()
      Return directory where this repo is in.
      Returns:
      The directory, e.g. /path/to/omegatdir/.repositories/https_site.com_myproject.git
    • getRecentlyDeletedFiles

      String[] getRecentlyDeletedFiles() throws Exception
      Returns a list of files or directories (empty or not) that have been deleted since the last call to this function, relative to the repository root that has been checked out. If this function is called for the first time, it returns the empty list.
      Returns:
      An array of relative paths of deleted files.
      Throws:
      Exception - If an error occurs.
    • commit

      String commit(String[] onVersions, String comment) throws Exception
      Commit to repository after specified version, or after any version if 'null' specified.
      Parameters:
      onVersions - if version defined, then commit must be just after this version. Otherwise(if remote repository was updated after rebase), commit shouldn't be processed and should return null. If version is null, then commit can be after any version, i.e. previous version shouldn't be checked. It can be several versions defined since glossary will be committed after project_save.tmx.
      comment - comment for commit
      Returns:
      new version if commit was processed, or null if remote repository was updated by other user
      Throws:
      Exception