|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.ifremer.isisfish.datastore.VersionStorage
fr.ifremer.isisfish.datastore.DataStorage
fr.ifremer.isisfish.datastore.RegionStorage
public class RegionStorage
Classe permettant de recuperer les TopiaContext des regions.
Created: 17 août 2005 03:44:57 CEST
| Field Summary | |
|---|---|
protected File |
commentForNextCommitFile
File to use to store next commit region comment. |
static String |
MAP_DIRECTORY
|
static String |
REGION_PATH
|
protected static Map<String,RegionStorage> |
regions
|
| Fields inherited from class fr.ifremer.isisfish.datastore.DataStorage |
|---|
DATA_BACKUP_FILENAME, memstorage, name, storage |
| Fields inherited from class fr.ifremer.isisfish.datastore.VersionStorage |
|---|
changeListeners, file, root |
| Constructor Summary | |
|---|---|
protected |
RegionStorage(File directory,
String name)
Constructor. |
| Method Summary | |
|---|---|
void |
addCommentForNextCommit(String commentToAdd)
Add new comment in comment used for the next cvs commit. |
static RegionStorage |
checkout(String name)
Checkout not existing Region locally from server |
void |
clearCommentForNextCommit()
rename commentForNextCommitFile with current date at end must be used in user application after commit |
static RegionStorage |
create(String name)
Permet de creer une nouvelle region. |
void |
delete(boolean cvsDelete)
Permet de supprimer un fichier ou répertoire versionné ou non. |
static boolean |
exists(String name)
Verifie si la region exists en local ou sur le serveur CVS. |
String |
getCommentForNextCommit()
|
static FisheryRegion |
getFisheryRegion(org.nuiton.topia.TopiaContext context)
|
File |
getMapRepository()
|
static List<String> |
getNewRegionNames()
Retourne la liste des noms de toutes les régions disponible en local qui ne sont pas encore sur le serveur VCS. |
static List<String> |
getNewRemoteRegionNames()
Retourne la liste des noms de toutes les régions disponible sur le serveur VCS qui ne sont pas encore en local. |
static RegionStorage |
getRegion(String name)
Recupere le TopiaContext d'une region. |
static File |
getRegionDirectory()
|
static File |
getRegionDirectory(String name)
|
static List<String> |
getRegionNames()
Retourne la liste des noms de toutes les régions disponible en local. |
static List<RegionStorage> |
getRegions()
Retourne la liste de toutes les régions disponible en local. |
static List<String> |
getRemoteRegionNames()
Retourne la liste des noms de toutes les régions disponible sur le serveur VCS. |
static RegionStorage |
importAndRenameZip(File file,
String newName)
Import zipped region. |
static RegionStorage |
importZip(File file)
Import zipped region. |
protected boolean |
isVersionnableFile(File file)
Permet de savoir si un fichier doit etre géré par le vcs ou non. |
void |
rename(String toName)
Renome juste le repertoire, s'il y a besoin de modifier des données dans le TopiaContext il faut surcharger cette methode. |
void |
setCommentForNextCommit(String commentForNextCommit)
|
| Methods inherited from class fr.ifremer.isisfish.datastore.DataStorage |
|---|
closeMemStorage, closeStorage, copy, createZip, createZip, createZip, finalize, getDataBackupFile, getDirectory, getMemStorage, getName, getStorage, getStorageDirectory, prepare |
| Methods inherited from class fr.ifremer.isisfish.datastore.VersionStorage |
|---|
add, addStorageChangeListener, checkout, commit, diff, fireDataChanged, getCommunityDatabaseDirectory, getCommunityVCS, getContextDatabaseDirectory, getCurrentVCS, getCurrentVCS, getFile, getFiles, getFiles, getRemoteStorageNames, getRoot, getStorageNames, getVCS, isOnRemote, isUpToDate, removeStorageChangeListener, update |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String REGION_PATH
public static final String MAP_DIRECTORY
protected static Map<String,RegionStorage> regions
protected File commentForNextCommitFile
| Constructor Detail |
|---|
protected RegionStorage(File directory,
String name)
directory - region directoryname - region name| Method Detail |
|---|
public static File getRegionDirectory()
public static File getRegionDirectory(String name)
public String getCommentForNextCommit()
throws IOException
IOException - if IO problem while reading file
public void setCommentForNextCommit(String commentForNextCommit)
throws IOException
commentForNextCommit - The commentForNextCommit to set.
IOException - if io problem while writing filepublic void clearCommentForNextCommit()
protected boolean isVersionnableFile(File file)
VersionStorage
isVersionnableFile in class DataStoragefile - le fichier a tester
true si le fichier est versionné
public void addCommentForNextCommit(String commentToAdd)
throws IOException
commentToAdd - the comment to add
IOException - if IO problem while writing file
public void rename(String toName)
throws StorageException
DataStorage
rename in class DataStoragetoName - le nouveau nom
StorageException - si problème lors du renommagepublic File getMapRepository()
public static RegionStorage checkout(String name)
throws VCSException,
org.nuiton.topia.TopiaException
name - name of region to retrieve
VCSException - if problem with vcs while checkout
org.nuiton.topia.TopiaException - if problem while restoring dbpublic static RegionStorage getRegion(String name)
name - le nom de la region a recuperer
public static boolean exists(String name)
name - le nom de la region
public static RegionStorage create(String name)
throws StorageException
name - Le nom de la nouvelle region
StorageException - Si le nom est deja uitlisé
public void delete(boolean cvsDelete)
throws StorageException
VersionStorage
delete in class DataStoragecvsDelete - si vrai alors le fichier sera aussi supprimé sur le
vcs si elle existait. Cela prend effet immediatement (un commit est fait)
StorageException - if delete operation failpublic static List<String> getRegionNames()
public static List<RegionStorage> getRegions()
public static List<String> getNewRegionNames()
public static List<String> getRemoteRegionNames()
public static List<String> getNewRemoteRegionNames()
public static FisheryRegion getFisheryRegion(org.nuiton.topia.TopiaContext context)
throws StorageException
StorageException
public static RegionStorage importZip(File file)
throws IOException,
StorageException
file - zipped region file
IOException - if IO problem while import zip
StorageException - if problem while restoring db
public static RegionStorage importAndRenameZip(File file,
String newName)
throws IOException,
StorageException
file - zipped region filenewName - new name for the imported simulation
IOException - if IO problem while import zip
StorageException - if problem while restoring db
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||