fr.ifremer.isisfish.vcs
Interface VCS

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

public interface VCS
extends FileFilter

Version control system.

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

Nested Class Summary
static class VCS.Status
          VCS Status type.
 
Field Summary
static String TYPE_CVS
          CVS VCS Type
static String TYPE_NONE
          None CVS Type
static String TYPE_SVN
          SVN VCS Type
static String VCS_HOST_NAME
          remote server adresse (ip or serveur name) ex: labs.libre-entreprise.org
static String VCS_PATH
          remote repository path ex: /svnroot/isis-fish-data
static String VCS_PROTOCOL
          can be http, ssh, pserver, ...
static String VCS_TYPE
          can be None, CVS or SVN. only None or SVN work
static String VCS_USER_NAME
          user login to access vcs ex: bpoussin
static String VCS_USER_PASSWORD
          user passwd or passphrase (protocol dependent) to access vcs ex: xxxxxxxx
 
Method Summary
 void add(List<File> files, String msg)
          Add and commit file in server repository.
 void addVetoableActionListener(VetoableActionListener l)
          Ajout un listener pouvant interdire les actions du vcs
 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 recurse)
          get repository on server and put it in localdir.
 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.
 String getHost()
          Get host.
 File getLocalRepository()
          Get local repository directory
 VCS.Status getLocalStatus(File file)
          Get file local status.
 String getLogin()
          Get login.
 String getPassword()
          Get password.
 String getPath()
          Get repository path.
 String getProtocol()
          Get protocol.
 File getSshKeyFile()
          Get ssh key file.
 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 up-to-date.
 boolean isValidLocalRepository()
          Return true, if local repository is valid repository for actual vcs.
 boolean isVersionnableFile(File file)
          Check if file can be put in vcs repository.
 boolean isWriteable()
          Return true, if local repository is writable.
 void remoteVetoableActionListener(VetoableActionListener l)
          Supprime un listener pouvant interdire les actions du vcs
 void setHost(String host)
          Change host.
 void setLogin(String login)
          Change login.
 void setPassword(String password)
          Change password.
 void setPath(String path)
          Change path.
 void setProtocol(String protocol)
          Change protocol.
 void setSshKeyFile(File sshKeyFile)
          Change ssk key file to use.
 List<File> setTag(org.nuiton.util.Version version)
          Change repository tag, used when we use some tag and we want to go to trunk.
 void setWriteable(boolean value)
          Permit to force repository to read-only if value is false, otherwise use normal rules.
 List<File> update(File file, boolean recurse)
          Update file.
 
Methods inherited from interface java.io.FileFilter
accept
 

Field Detail

TYPE_CVS

static final String TYPE_CVS
CVS VCS Type

See Also:
Constant Field Values

TYPE_NONE

static final String TYPE_NONE
None CVS Type

See Also:
Constant Field Values

TYPE_SVN

static final String TYPE_SVN
SVN VCS Type

See Also:
Constant Field Values

VCS_TYPE

static final String VCS_TYPE
can be None, CVS or SVN. only None or SVN work

See Also:
Constant Field Values

VCS_PROTOCOL

static final String VCS_PROTOCOL
can be http, ssh, pserver, ...

See Also:
Constant Field Values

VCS_HOST_NAME

static final String VCS_HOST_NAME
remote server adresse (ip or serveur name) ex: labs.libre-entreprise.org

See Also:
Constant Field Values

VCS_PATH

static final String VCS_PATH
remote repository path ex: /svnroot/isis-fish-data

See Also:
Constant Field Values

VCS_USER_NAME

static final String VCS_USER_NAME
user login to access vcs ex: bpoussin

See Also:
Constant Field Values

VCS_USER_PASSWORD

static final String VCS_USER_PASSWORD
user passwd or passphrase (protocol dependent) to access vcs ex: xxxxxxxx

See Also:
Constant Field Values
Method Detail

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.util.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.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

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.util.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


Copyright © 1999-2011 CodeLutin. All Rights Reserved.