fr.ifremer.isisfish.datastore
Class ExportStorage

java.lang.Object
  extended by fr.ifremer.isisfish.datastore.VersionStorage
      extended by fr.ifremer.isisfish.datastore.CodeSourceStorage
          extended by fr.ifremer.isisfish.datastore.JavaSourceStorage
              extended by fr.ifremer.isisfish.datastore.ExportStorage
All Implemented Interfaces:
Docable
Direct Known Subclasses:
SensitivityExportStorage

public class ExportStorage
extends JavaSourceStorage
implements Docable

Gestion des fichers VCS de type Export (appartenant au module exports). Created: 18 août 2005 15:07:36 CEST

Version:
$Revision: 3124 $ Last update: $Date: 2010-11-29 19:14:09 +0100 (lun., 29 nov. 2010) $ by : $Author: chatellier $
Author:
Grégoire DESSARD

Field Summary
static String EXPORT_PATH
           
static String EXPORT_TEMPLATE
          Template freemarker pour les scripts d'export .
 
Fields inherited from class fr.ifremer.isisfish.datastore.JavaSourceStorage
PARAM_PREFIX
 
Fields inherited from class fr.ifremer.isisfish.datastore.CodeSourceStorage
content, lastContentLength, lastContentUpdate, name
 
Fields inherited from class fr.ifremer.isisfish.datastore.VersionStorage
changeListeners, file, root
 
Constructor Summary
protected ExportStorage(File rootSrc, File directory, String name)
          Constructeur.
 
Method Summary
static void checkout()
           
 Doc getClassDoc()
          Class documentation (if any).
 String getDescription()
          Be ware this method require to instanciate a Export, so it would be better to call as often as possible.
static ExportStorage getExport(String name)
          Retourne le storage pour la regle demandée
static File getExportDirectory()
           
static List<String> getExportNames()
          Retourne la liste des noms de toutes les régions disponible en local
 Doc getFieldDoc(String fieldName)
          Field documentation (if any).
 Export getNewExportInstance()
          Retourne une nouvelle instance de la regle.
 Doc getParamDoc(String paramName)
           
 Map<String,Class<?>> getParameterNames()
          Permet de recuperer les parametres de l'export.
static Map<String,Class<?>> getParameterNames(Export export)
          Recherche par introspection tous les parametres de la classe commencant par JavaSourceStorage.PARAM_PREFIX.
static Object getParameterValue(Export export, String name)
          Donne la valeur d'un parametre par introspection.
static void setParameterValue(Export export, String name, Object value)
          Modifie la valeur d'un attribut par introspection.
 
Methods inherited from class fr.ifremer.isisfish.datastore.JavaSourceStorage
compile, doJavadoc, getCodeClass, getFQN, getName, getNewInstance, getParameterDoc
 
Methods inherited from class fr.ifremer.isisfish.datastore.CodeSourceStorage
diff, exists, getContent, getFiles, getName, prepare, reload, setContent
 
Methods inherited from class fr.ifremer.isisfish.datastore.VersionStorage
add, addStorageChangeListener, checkout, commit, delete, fireDataChanged, getContextDatabaseCacheKey, getContextDatabaseDirectory, getFile, getFiles, getRemoteStorageNames, getRoot, getStorageNames, getVCS, isOnRemote, isUpToDate, isVersionnableFile, removeStorageChangeListener, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXPORT_PATH

public static final String EXPORT_PATH
See Also:
Constant Field Values

EXPORT_TEMPLATE

public static final String EXPORT_TEMPLATE
Template freemarker pour les scripts d'export .

See Also:
Constant Field Values
Constructor Detail

ExportStorage

protected ExportStorage(File rootSrc,
                        File directory,
                        String name)
Constructeur.

Parameters:
rootSrc - le repertoire root de stockage des exports
directory - le repertoire de l'export
name - le nom de l'export
Method Detail

getExportDirectory

public static File getExportDirectory()

getNewExportInstance

public Export getNewExportInstance()
                            throws IsisFishException
Retourne une nouvelle instance de la regle. Compile le fichier si besoin

Returns:
une nouvelle instance de la classe d'export
Throws:
IsisFishException

getExport

public static ExportStorage getExport(String name)
Retourne le storage pour la regle demandée

Parameters:
name - le nom de la regle souhaitée
Returns:
Le storage pour la regle

getExportNames

public static List<String> getExportNames()
Retourne la liste des noms de toutes les régions disponible en local

Returns:
la liste des noms de toutes les régions disponible en local

checkout

public static void checkout()
                     throws VCSException
Throws:
VCSException

getClassDoc

public Doc getClassDoc()
Description copied from interface: Docable
Class documentation (if any).

Specified by:
getClassDoc in interface Docable
Returns:
the @Doc of the underlied rule class
See Also:
DocHelper, Doc, Docable

getFieldDoc

public Doc getFieldDoc(String fieldName)
Description copied from interface: Docable
Field documentation (if any).

Specified by:
getFieldDoc in interface Docable
Parameters:
fieldName - name of the field to inspect
Returns:
the @Doc of the given field of the underlied Rule class
See Also:
DocHelper, Doc, Docable

getDescription

public String getDescription()
Be ware this method require to instanciate a Export, so it would be better to call as often as possible.

Specified by:
getDescription in interface Docable
Returns:
the description of the instanciate Export
See Also:
Doc, Docable

getParamDoc

public Doc getParamDoc(String paramName)
Parameters:
paramName - the name of the param to inspect
Returns:
the doc associated with the param, (says the field PARAM_PREFIX+fieldName)

getParameterNames

public Map<String,Class<?>> getParameterNames()
                                       throws IsisFishException
Permet de recuperer les parametres de l'export.

Returns:
Une map contenant le nom du parametre et son type
Throws:
IsisFishException - s'il est impossible de retourner une map convenable

getParameterNames

public static Map<String,Class<?>> getParameterNames(Export export)
Recherche par introspection tous les parametres de la classe commencant par JavaSourceStorage.PARAM_PREFIX.

Parameters:
export - the export to inspect
Returns:
the list of parameters for a given export

getParameterValue

public static Object getParameterValue(Export export,
                                       String name)
                                throws IsisFishException
Donne la valeur d'un parametre par introspection.

Parameters:
name - le nom du parametre
export - the export to inspect
Returns:
la valeur courante du parametre
Throws:
IsisFishException - if any exception

setParameterValue

public static void setParameterValue(Export export,
                                     String name,
                                     Object value)
                              throws IsisFishException
Modifie la valeur d'un attribut par introspection.

Parameters:
name - le nom de l'attribut
value - la valeur de l'attribut
export - the export to inspect
Throws:
IsisFishException - if any exception


Copyright © 1999-2011 CodeLutin. All Rights Reserved.