|
||||||||||
| 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
public abstract class DataStorage
Class abstraite dont herite tous les storages qui on besoin d'un TopiaContext
RegionStorage et
SimulationStorage
Created: 21 janv. 2006 14:20:51
| Field Summary | |
|---|---|
static String |
DATA_BACKUP_FILENAME
Backup archive filename. |
protected org.nuiton.topia.TopiaContext |
memstorage
Le TopiaContext contenant les données en memoire |
protected String |
name
Le nom du storage (nom du dernier répertoire) |
protected org.nuiton.topia.TopiaContext |
storage
Le TopiaContext contenant les données |
| Fields inherited from class fr.ifremer.isisfish.datastore.VersionStorage |
|---|
changeListeners, file, root |
| Constructor Summary | |
|---|---|
protected |
DataStorage(File directory,
String name)
Permet de créer un nouveau DataStorage |
| Method Summary | |
|---|---|
void |
closeMemStorage()
|
void |
closeStorage()
|
void |
copy(String toName)
Copy le DataStorage courant. |
File |
createZip()
Cree un zip. |
File |
createZip(File file)
Cree un zip. |
File |
createZip(File file,
boolean createMD5)
Cree un zip. |
void |
delete(boolean cvsDelete)
Permet de supprimer un fichier ou répertoire versionné ou non. |
protected void |
finalize()
|
protected File |
getDataBackupFile()
|
File |
getDirectory()
|
org.nuiton.topia.TopiaContext |
getMemStorage()
|
String |
getName()
|
org.nuiton.topia.TopiaContext |
getStorage()
Returns the storage. |
protected File |
getStorageDirectory()
|
protected boolean |
isVersionnableFile(File file)
Permet de savoir si un fichier doit etre géré par le vcs ou non. |
protected void |
prepare()
Sauve toute la base avec le schéma dans ls fichier <region>/data-backup.sql |
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. |
| 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 DATA_BACKUP_FILENAME
protected String name
protected org.nuiton.topia.TopiaContext storage
protected org.nuiton.topia.TopiaContext memstorage
| Constructor Detail |
|---|
protected DataStorage(File directory,
String name)
directory - repertoire de base du storagename - nom du storage (nom du dernier répertoire)| Method Detail |
|---|
protected File getStorageDirectory()
protected File getDataBackupFile()
protected void prepare()
prepare in class VersionStorageVersionStorage.prepare()protected boolean isVersionnableFile(File file)
VersionStorage
isVersionnableFile in class VersionStoragefile - le fichier a tester
true si le fichier est versionnépublic File getDirectory()
public String getName()
public org.nuiton.topia.TopiaContext getMemStorage()
public void closeMemStorage()
throws org.nuiton.topia.TopiaException
org.nuiton.topia.TopiaExceptionpublic org.nuiton.topia.TopiaContext getStorage()
public void closeStorage()
throws org.nuiton.topia.TopiaException
org.nuiton.topia.TopiaException
public void delete(boolean cvsDelete)
throws StorageException
VersionStorage
delete in class VersionStoragecvsDelete - 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 fail
public void copy(String toName)
throws IOException,
org.nuiton.topia.TopiaException
toName - le nouveau nom de la region
IOException - si problème lors de la copie
org.nuiton.topia.TopiaException - ???
public void rename(String toName)
throws StorageException
toName - le nouveau nom
StorageException - si problème lors du renommage
public File createZip()
throws IOException
IOException - si problème lors de la création du zip
public File createZip(File file)
throws IOException
file - le fichier dans lequel l'export doit se faire
IOException - si problème lors de la création du zip
public File createZip(File file,
boolean createMD5)
throws IOException
file - le fichier dans lequel l'export doit se fairecreateMD5 - if true create zip md5
IOException - si problème lors de la création du zip
protected void finalize()
throws Throwable
finalize in class ObjectThrowable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||