fr.ifremer.isisfish.datastore
Class SimulationPlanStorage

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.SimulationPlanStorage
All Implemented Interfaces:
Docable

public class SimulationPlanStorage
extends JavaSourceStorage

Class permettant de representer un plan de simulation. Un plan de simulation est un fichier Java que l'on compile si besoin.

Gere les fichiers VCS de type SimulationPlan (package simulationplans) Created: 17 août 2005 11:11:51 CEST

Version:
$Revision: 3627 $ Last update: $Date: 2012-03-02 14:08:28 +0100 (Fri, 02 Mar 2012) $ by : $Author: echatellier $
Author:
Benjamin POUSSIN

Nested Class Summary
 
Nested classes/interfaces inherited from class fr.ifremer.isisfish.datastore.CodeSourceStorage
CodeSourceStorage.Location
 
Field Summary
static String SIMULATION_PLAN_PATH
           
static String SIMULATION_PLAN_TEMPLATE
          Template freemarker pour les plans de simulation .
 
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 SimulationPlanStorage(File rootSrc, File directory, String name)
          Construit un nouveau SimulationPlan storage.
 
Method Summary
static void checkout()
           
static SimulationPlanStorage createSimulationPlan(String name, CodeSourceStorage.Location location)
          Create new simulation plan.
static File getCommunitySimulationPlanDirectory()
          Get community VCS simulation plan directory.
 String getDescription()
          Be ware this method require to instanciate a SimulationPlan, so it would be better to call as often as possible.
static List<String> getNewRemoteSimulationPlanNames()
          Retourne la liste des noms de tous les plans disponibles sur le serveur VCS qui ne sont pas encore en local
 SimulationPlan getNewSimulationPlanInstance()
          Retourne une nouvelle instance du plan.
static List<String> getNewSimulationPlanNames()
          Retourne la liste des noms de tous les plans disponibles en local qui ne sont pas encore sur le serveur VCS.
static List<String> getRemoteSimulationPlanNames()
          Retourne la liste des noms de tous les plans disponibles sur le serveur VCS.
static SimulationPlanStorage getSimulationPlan(String name, CodeSourceStorage.Location... location)
          Retourne le storage pour le plan demandé.
static File getSimulationPlanDirectory()
          Get context (official VCS) simulation plan directory.
static List<String> getSimulationPlanNames()
          Retourne le nom de toutes les plans existantes
 
Methods inherited from class fr.ifremer.isisfish.datastore.JavaSourceStorage
compile, doJavadoc, getCodeClass, getFieldDoc, getFieldDoc, getFQN, getName, getNewInstance, getParamAsString, getParameterDoc, getParameterNames, getParameterNames, getParameterType, getParameterValue, setParameterValue
 
Methods inherited from class fr.ifremer.isisfish.datastore.CodeSourceStorage
exists, getContent, getFiles, getName, nonEmptyLocation, prepare, reload, setContent, setContent
 
Methods inherited from class fr.ifremer.isisfish.datastore.VersionStorage
add, addStorageChangeListener, checkout, commit, delete, diff, fireDataChanged, getCommunityDatabaseDirectory, getCommunityVCS, getContextDatabaseDirectory, getCurrentVCS, getCurrentVCS, 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

SIMULATION_PLAN_PATH

public static final String SIMULATION_PLAN_PATH
See Also:
Constant Field Values

SIMULATION_PLAN_TEMPLATE

public static final String SIMULATION_PLAN_TEMPLATE
Template freemarker pour les plans de simulation .

See Also:
Constant Field Values
Constructor Detail

SimulationPlanStorage

protected SimulationPlanStorage(File rootSrc,
                                File directory,
                                String name)
Construit un nouveau SimulationPlan storage.

Parameters:
rootSrc - repertoire root de stockage des plans
directory - le repertoire ou devrait se trouver le plan
name - le nom du plan
Method Detail

getSimulationPlanDirectory

public static File getSimulationPlanDirectory()
Get context (official VCS) simulation plan directory.

Returns:
context simulation plan directory

getCommunitySimulationPlanDirectory

public static File getCommunitySimulationPlanDirectory()
Get community VCS simulation plan directory.

Returns:
community simulation plan directory

getSimulationPlanNames

public static List<String> getSimulationPlanNames()
Retourne le nom de toutes les plans existantes

Returns:
les noms de tous les plans existant en local

getSimulationPlan

public static SimulationPlanStorage getSimulationPlan(String name,
                                                      CodeSourceStorage.Location... location)
Retourne le storage pour le plan demandé.

Parameters:
name - le nom du plan souhaité
location - location to open storage file
Returns:
Le storage pour le plan

createSimulationPlan

public static SimulationPlanStorage createSimulationPlan(String name,
                                                         CodeSourceStorage.Location location)
Create new simulation plan.

Parameters:
name - new simulation plan to create
location - location to simulation plan storage file
Returns:
new simulation plan storage

getNewSimulationPlanInstance

public SimulationPlan getNewSimulationPlanInstance()
                                            throws IsisFishException
Retourne une nouvelle instance du plan. Compile le fichier si besoin

Returns:
retourne une nouvelle instance du plan
Throws:
IsisFishException - s'il y a un probleme d'instanciation

checkout

public static void checkout()
                     throws VCSException
Throws:
VCSException

getNewSimulationPlanNames

public static List<String> getNewSimulationPlanNames()
Retourne la liste des noms de tous les plans disponibles en local qui ne sont pas encore sur le serveur VCS.

Returns:
liste de noms de plans

getRemoteSimulationPlanNames

public static List<String> getRemoteSimulationPlanNames()
Retourne la liste des noms de tous les plans disponibles sur le serveur VCS.

Returns:
la liste des noms de tous les plans disponibles sur le serveur VCS. Si le serveur n'est pas disponible la liste retournée est vide.

getNewRemoteSimulationPlanNames

public static List<String> getNewRemoteSimulationPlanNames()
                                                    throws VCSException
Retourne la liste des noms de tous les plans disponibles sur le serveur VCS qui ne sont pas encore en local

Returns:
liste de noms de regions
Throws:
VCSException

getDescription

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

Specified by:
getDescription in interface Docable
Overrides:
getDescription in class JavaSourceStorage
Returns:
the descript of the instanciate SimulationPlan
See Also:
Doc, Docable


Copyright © 1999-2012 CodeLutin. All Rights Reserved.