Interface VCS

All Superinterfaces:
FileFilter
All Known Implementing Classes:
AbstractVCS, VCSNone, VCSSVN

public interface VCS extends FileFilter
Version control system.
Version:
$Revision$ Last update : $Date$ By : $Author$
Author:
poussin
  • Field Details

  • Method Details

    • addVetoableActionListener

      void addVetoableActionListener(VetoableActionListener l)
      Ajout un listener pouvant interdire les actions du vcs
      Parameters:
      l - listener to add
    • remoteVetoableActionListener

      void remoteVetoableActionListener(VetoableActionListener l)
      Supprime un listener pouvant interdire les actions du vcs
      Parameters:
      l - listener to remove
    • getLocalRepository

      File getLocalRepository()
      Get local repository directory
      Returns:
      local repository
    • isValidLocalRepository

      boolean isValidLocalRepository()
      Return true, if local repository is valid repository for actual vcs.
      Returns:
      validity
    • isWriteable

      boolean isWriteable() throws VCSException
      Return true, if local repository is writable. (use trunk and is not anonymous)
      Returns:
      writable
      Throws:
      VCSException
    • setWriteable

      void setWriteable(boolean value)
      Permit to force repository to read-only if value is false, otherwise use normal rules.
      Parameters:
      value - writable
    • cleanup

      void cleanup(File path) throws VCSException
      Cleanup a directory, removing all lock.
      Parameters:
      path - path to cleanup
      Throws:
      VCSException
    • commit

      void commit(List<File> files, String msg) throws VCSException
      Commit specified files, if files is null, all files are committed.
      Parameters:
      files - files to commit
      msg - message used to commit
      Throws:
      VCSException
    • add

      void add(List<File> files, String msg) throws VCSException
      Add and commit file in server repository.
      Parameters:
      files - list of file to add
      msg - message for commit
      Throws:
      VCSException
    • checkout

      void checkout(org.nuiton.version.Version tag, boolean recurse) throws VCSException
      get repository on server and put it in localdir.
      Parameters:
      tag - tag to used, null = /trunk other is tags/[tag]
      recurse - if file is directory checkout sub file
      Throws:
      VCSException
    • delete

      void delete(List<File> files, String msg) throws VCSException
      Delete and commit files in server repository.
      Parameters:
      files - file to delete
      msg - message for commit
      Throws:
      VCSException
    • getChanglog

      Map<File,String> getChanglog(List<File> files) throws VCSException
      Return all changelog between local file version and remote repository file version.
      Parameters:
      files -
      Returns:
      changelog for each file
      Throws:
      VCSException
    • getDiff

      String getDiff(File file) throws VCSException
      show diff between local file and repository file.
      Parameters:
      file - file to get diff
      Returns:
      string diff
      Throws:
      VCSException
    • getLocalStatus

      VCS.Status getLocalStatus(File file) throws VCSException
      Get file local status.
      Parameters:
      file - file to get status
      Returns:
      file status
      Throws:
      VCSException
    • getFileList

      List<String> getFileList(File directory) throws VCSException
      Return list of all file on directory on remote server.
      Parameters:
      directory -
      Returns:
      files list
      Throws:
      VCSException
    • getUpdatedFile

      List<File> getUpdatedFile() throws VCSException
      get list of new or modified files on server.
      Returns:
      list of modified or new files
      Throws:
      VCSException
    • haveUpdate

      boolean haveUpdate() throws VCSException
      Ask if there are some new or modified files on server.
      Returns:
      true if new file available
      Throws:
      VCSException
    • isConnected

      boolean isConnected()
      Get connection state.
      Returns:
      true if server is connected
    • isOnRemote

      boolean isOnRemote(File file) throws VCSException
      Check if file is available on server.
      Parameters:
      file - file to check
      Returns:
      true if file available
      Throws:
      VCSException
    • isTag

      boolean isTag(org.nuiton.version.Version version) throws VCSException
      Look on server if version is tag repository.
      Parameters:
      version - version number like 3.2
      Returns:
      true if tag found with this name
      Throws:
      VCSException
    • isUpToDate

      boolean isUpToDate(File file) throws VCSException
      Check if file is up-to-date.
      Parameters:
      file - file to check
      Returns:
      true if file is in last version
      Throws:
      VCSException
    • isVersionnableFile

      boolean isVersionnableFile(File file)
      Check if file can be put in vcs repository. For example when you used CVS, you must not put CVS file.

      default refused .svn, CVS and ~ filename Must be override, this default implementation return true.

      Parameters:
      file -
      Returns:
      true if file is versionnable
    • update

      List<File> update(File file, boolean recurse) throws VCSException
      Update file.
      Parameters:
      file - files to update
      recurse -
      Returns:
      true if there are some merging conflict, false otherwise
      Throws:
      VCSException
    • checkProtocol

      void checkProtocol() throws VCSException
      Verifie la connexion et si le protocole a change, switch le repository pour utiliser le nouveau protocole. Si on est en mode interface (mode graphique) et que le switch se passe mal, demande a l'utilisateur de nouvelle valeur pour le protocole (+ identifiant, ...)
      Throws:
      VCSException
    • checkFileStatus

      List<File> checkFileStatus() throws VCSException
      Verifie si tous les fichiers du repository local sont les dernieres version par rapport au serveur. Si ce n'est pas le cas et que l'on est en mode interactif (mode graphique), on lui propose de mettre a jour les fichiers, avec la possibilite de voir les changements sur les fichiers
      Returns:
      list of file with unresolved conflict
      Throws:
      VCSException
    • getHost

      String getHost()
      Get host.
      Returns:
      host
    • getLogin

      String getLogin()
      Get login.
      Returns:
      login
    • getPassword

      String getPassword()
      Get password.
      Returns:
      password
    • getPath

      String getPath()
      Get repository path.
      Returns:
      path
    • getProtocol

      String getProtocol()
      Get protocol.
      Returns:
      protocol
    • getSshKeyFile

      File getSshKeyFile()
      Get ssh key file.
      Returns:
      ssh key file
    • getTag

      String getTag() throws VCSException
      Retourne le tag reellement utilise, par exemple si on a fait un setTag(3.2.0) cette methode retourne "/tags/3.2.0", pour setTag(null) on retourne "/trunk"
      Returns:
      tag
      Throws:
      VCSException
    • setTag

      List<File> setTag(org.nuiton.version.Version version) throws VCSException
      Change repository tag, used when we use some tag and we want to go to trunk.
      Parameters:
      version - version to go, if null trunk is used, otherwize tags/version is used
      Returns:
      a list of all file in conflict
      Throws:
      VCSException
    • setHost

      void setHost(String host) throws VCSException
      Change host. checkProtocol is automaticaly done
      Parameters:
      host - new host.
      Throws:
      VCSException
    • setLogin

      void setLogin(String login) throws VCSException
      Change login. checkProtocol is automaticaly done
      Parameters:
      login - new login
      Throws:
      VCSException
    • setPassword

      void setPassword(String password)
      Change password.
      Parameters:
      password - password
    • setPath

      void setPath(String path) throws VCSException
      Change path. checkPath is automaticaly done
      Parameters:
      path - new path
      Throws:
      VCSException
    • setProtocol

      void setProtocol(String protocol) throws VCSException
      Change protocol. checkProtocol is automaticaly done
      Parameters:
      protocol -
      Throws:
      VCSException
    • setSshKeyFile

      void setSshKeyFile(File sshKeyFile)
      Change ssk key file to use.
      Parameters:
      sshKeyFile - new ssh kay file