fr.ifremer.isisfish.vcs
Class VCSNone

java.lang.Object
  extended by fr.ifremer.isisfish.vcs.AbstractVCS
      extended by fr.ifremer.isisfish.vcs.VCSNone
All Implemented Interfaces:
VCS, FileFilter

public class VCSNone
extends AbstractVCS

VCSNone (svn or vcs) must extends this class. This class can be used as dummy VCSNone if not valid VCSNone found.

Version:
$Revision: 1.0 $ Last update : $Date: 1 déc. 2008 $ By : $Author: chatellier $
Author:
poussin

Nested Class Summary
 
Nested classes/interfaces inherited from interface fr.ifremer.isisfish.vcs.VCS
VCS.Status
 
Field Summary
 
Fields inherited from class fr.ifremer.isisfish.vcs.AbstractVCS
host, listeners, localRepository, login, password, path, protocol, sshKeyFile, writeable
 
Fields inherited from interface fr.ifremer.isisfish.vcs.VCS
TYPE_CVS, TYPE_NONE, TYPE_SVN, VCS_HOST_NAME, VCS_PATH, VCS_PROTOCOL, VCS_TYPE, VCS_USER_NAME, VCS_USER_PASSWORD
 
Constructor Summary
VCSNone(File localRepository, String protocol, String host, String path, File sshKeyFile, String login, String password)
           
 
Method Summary
 void add(List<File> files, String msg)
          Add and commit file in server repository
 List<File> checkFileStatus()
          Verifie si tous les fichiers du repository local sont les dernieres version par rapport au serveur.
 void checkout(org.nuiton.util.Version tag, boolean b)
          Get repository module on server and put it in destDir.
 void checkPath()
           
 void checkProtocol()
          Verifie la connexion et si le protocole a change, switch le repository pour utiliser le nouveau protocole.
 void cleanup(File path)
          Cleanup a directory, removing all lock.
 void commit(List<File> files, String msg)
          Commit specified files, if files is null, all files are committed.
 void delete(List<File> files, String msg)
          Delete and commit files in server repository
 Map<File,String> getChanglog(List<File> files)
          Return all changelog between local file version and remote repository file version
 String getDiff(File file)
          Show diff between local file and repository file.
 List<String> getFileList(File directory)
          Return list of all file on directory on remote server.
 VCS.Status getLocalStatus(File file)
          Get file local status.
 String getTag()
          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"
 List<File> getUpdatedFile()
          get list of new or modified files on server
 boolean haveUpdate()
          Ask if there are some new or modified files on server
 boolean isConnected()
          Get connection state.
 boolean isOnRemote(File file)
          Check if file is available on server
 boolean isTag(org.nuiton.util.Version version)
          look on server if version is tag repository
 boolean isUpToDate(File file)
          Check if file is uptodate
 boolean isValidLocalRepository()
          Return true, if local repository is valid repository for actual vcs.
 boolean isWriteable()
          Return true, if local repository is writable.
 List<File> setTag(org.nuiton.util.Version version)
          Change repository tag, used when we use some tag and we want to go to trunk.
 List<File> update(File file, boolean recurse)
          Update file
 
Methods inherited from class fr.ifremer.isisfish.vcs.AbstractVCS
accept, addVetoableActionListener, fireAction, getHost, getLocalRepository, getLogin, getPassword, getPath, getProtocol, getSshKeyFile, isVersionnableFile, remoteVetoableActionListener, setHost, setLocalRepository, setLogin, setPassword, setPath, setProtocol, setSshKeyFile, setWriteable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VCSNone

public VCSNone(File localRepository,
               String protocol,
               String host,
               String path,
               File sshKeyFile,
               String login,
               String password)
Method Detail

isValidLocalRepository

public boolean isValidLocalRepository()
Description copied from interface: VCS
Return true, if local repository is valid repository for actual vcs.

Returns:
validity

isTag

public boolean isTag(org.nuiton.util.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

haveUpdate

public boolean haveUpdate()
                   throws VCSException
Ask if there are some new or modified files on server

Returns:
true if new file available
Throws:
VCSException

getUpdatedFile

public List<File> getUpdatedFile()
                          throws VCSException
get list of new or modified files on server

Returns:
list of modified or new files
Throws:
VCSException

getChanglog

public Map<File,String> getChanglog(List<File> files)
Return all changelog between local file version and remote repository file version

Parameters:
files -
Returns:
changelog for each file

cleanup

public void cleanup(File path)
             throws VCSException
Description copied from interface: VCS
Cleanup a directory, removing all lock.

Parameters:
path - path to cleanup
Throws:
VCSException

commit

public void commit(List<File> files,
                   String msg)
            throws VCSException
Description copied from interface: VCS
Commit specified files, if files is null, all files are committed.

Parameters:
files - files to commit
msg - message used to commit
Throws:
VCSException

add

public 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

public void checkout(org.nuiton.util.Version tag,
                     boolean b)
              throws VCSException
Get repository module on server and put it in destDir.

Parameters:
tag - destination directory
b -
Throws:
VCSException

delete

public 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

getDiff

public String getDiff(File file)
               throws VCSException
Show diff between local file and repository file.

Parameters:
file -
Returns:
diff
Throws:
VCSException

getLocalStatus

public VCS.Status getLocalStatus(File file)
                          throws VCSException
Description copied from interface: VCS
Get file local status.

Parameters:
file - file to get status
Returns:
file status
Throws:
VCSException

getFileList

public List<String> getFileList(File directory)
                         throws VCSException
Return list of all file on directory on remote server.

Parameters:
directory -
Returns:
files list
Throws:
VCSException

isConnected

public boolean isConnected()
Get connection state.

Returns:
true if server is connected

isOnRemote

public 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

isUpToDate

public boolean isUpToDate(File file)
                   throws VCSException
Check if file is uptodate

Parameters:
file - file to check
Returns:
true if file is in last version
Throws:
VCSException

update

public List<File> update(File file,
                         boolean recurse)
                  throws VCSException
Update file

Parameters:
file - file to update
Returns:
true if there are some merging conflict, false otherwise
Throws:
VCSException

checkProtocol

public void checkProtocol()
                   throws VCSException
Description copied from interface: VCS
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

checkPath

public void checkPath()
               throws VCSException
Throws:
VCSException

checkFileStatus

public List<File> checkFileStatus()
                           throws VCSException
Description copied from interface: VCS
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

isWriteable

public boolean isWriteable()
                    throws VCSException
Description copied from interface: VCS
Return true, if local repository is writable. (use trunk and is not anonymous)

Returns:
writable
Throws:
VCSException

setTag

public List<File> setTag(org.nuiton.util.Version version)
                  throws VCSException
Description copied from interface: VCS
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

getTag

public String getTag()
              throws VCSException
Description copied from interface: VCS
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


Copyright © 1999-2012 CodeLutin. All Rights Reserved.