public class CliStarter extends Object
| Constructor and Description |
|---|
CliStarter(String configFilePath) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addInterventionDomainId(Map<Class,ImportResults> allResults) |
protected void |
createAdminUser(String email,
String password,
String firstName,
String lastName,
AgrosystUserTopiaDao userDao) |
protected void |
displayImportResult(ImportResults importResults) |
protected void |
displayPersistenceImportResult(Map<Class,ImportResults> allResults) |
AgrosystTopiaPersistenceContext |
getPersistenceContext() |
protected ServiceContext |
getServiceContext() |
protected void |
importAbstractAction(String abstractActionFilePath,
Map<Class,ImportResults> allResults) |
protected void |
importAbstractInput(String inputFilePath,
String fertiMinFilePath,
String phytoProductInputTargetsFilePath,
Map<Class,ImportResults> allResults) |
protected void |
importCroppingPlans(String croppingPlanFilePath,
Map<Class,ImportResults> allResults) |
protected void |
importCroppingPlanSpecies(String croppingPlanSpeciesFilePath,
Map<Class,ImportResults> allResults) |
protected void |
importDomains(String domainFilePath,
Map<Class,ImportResults> allResults) |
protected void |
importDomainUniverse(String domainFilePath,
String croppingPlanFilePath,
String croppingPlanSpeciesFilePath,
String equipmentFilePath,
String toolsCouplingFilePath,
String equipmentToToolsCouplingFilePath,
String mainActionToToolsCouplingFilePath,
String groundFilePath,
Map<Class,ImportResults> allResults) |
protected void |
importEffectiveCropCycleUniverse(String effectivePerennialCropCycleFilePath,
String effectiveCropCycleSpeciesFilePath,
String effectivePhaseFilePath,
String effectiveSeasonalCropCycleFilePath,
String effectiveCropCycleNodeFilePath,
String effectiveCropCycleConnectionFilePath,
String effectiveInterventionFilePath,
String effectiveSpeciesStadeFilePath,
String effectiveToolsCouplingFilePath,
String effectiveInvolvedRuleFilePath,
Map<Class,ImportResults> allResults) |
protected void |
importEquipments(String equipmentFilePath,
Map<Class,ImportResults> allResults) |
protected void |
importEquipmentToToolCoupling(String equipmentToToolCouplingFilePath,
Map<Class,ImportResults> allResults) |
protected void |
importGrounds(String groundFilePath,
Map<Class,ImportResults> allResults) |
protected void |
importGrowingPlans(String growingPlanFilePath,
Map<Class,ImportResults> allResults) |
protected void |
importGrowingSystems(String growingSystemFilePath,
String growingSystemNetworksFilePath,
Map<Class,ImportResults> allResults) |
protected void |
importHarverstingYeald(String harverstingYealdFilePath,
Map<Class,ImportResults> allResults) |
protected void |
importPlots(String plotFilePath,
String zoneFilePAth,
Map<Class,ImportResults> allResults) |
protected void |
importPracticedCropCycle(String practicedCropCycleFilePath,
String practicedSeasonalCropCycleFilePath,
String practicedCropCycleNodeFilePath,
String practicedCropCycleConnectionFilePath,
String practicedPerennialCropCycleFilePath,
String practicedCropCyclePhaseFilePath,
String practicedCropCycleSpeciesFilePath,
Map<Class,ImportResults> allResults) |
protected void |
importPracticedIntervention(String practicedInterventionFilePath,
String practiceInterventionToolsCouplingFilePath,
Map<Class,ImportResults> allResults) |
protected void |
importPracticedPerennialCropCycle(String practicedPerennialCropCycleFilePath,
String practicedCropCyclePhaseFilePath,
String practicedCropCycleSpeciesFilePath,
Map<Class,ImportResults> allResults) |
protected void |
importPracticedPlots(String practicedPlotFilePath,
Map<Class,ImportResults> allResults) |
protected void |
importPracticedSeasonalCropCycle(String practicedSeasonalCropCycleFilePath,
String practicedCropCycleNodeFilePath,
String practicedCropCycleConnectionFilePath,
Map<Class,ImportResults> allResults) |
protected void |
importPracticedSystems(String practicedSystemFilePath,
Map<Class,ImportResults> allResults) |
protected void |
importPracticedSystemUniverse(String practicedSystemFilePath,
String practicedPlotFilePath,
String practicedCropCycleFilePath,
String practicedSeasonalCropCycleFilePath,
String practicedCropCycleNodeFilePath,
String practicedCropCycleConnectionFilePath,
String practicedPerennialCropCycleFilePath,
String practicedCropCyclePhaseFilePath,
String practicedCropCycleSpeciesFilePath,
String practiceInterventionToolsCouplingFilePath,
String practicedInterventionFilePath,
Map<Class,ImportResults> allResults) |
protected void |
importPracticeInterventionToolsCoupling(String practiceInterventionToolsCouplingFilePath,
Map<Class,ImportResults> allResults) |
protected void |
importSeedingActionSpecies(String seedingActionSpeciesFilePath,
Map<Class,ImportResults> allResults) |
protected void |
importToolsCouplingMainsActions(String mainsActionsToolCouplingFilePath,
Map<Class,ImportResults> allResults,
ImportResults toolsCouplingsImportResults) |
protected void |
importToolsCouplings(String toolsCouplingFilePath,
String equipmentToToolCouplingFilePath,
String mainActionToToolCouplingFilePath,
Map<Class,ImportResults> allResults) |
protected void |
importUsersRolesImporter(String usersRolesFilePath,
Map<Class,ImportResults> allResults) |
protected void |
init() |
protected boolean |
isImportErrors(Map<Class,ImportResults> allResults) |
static void |
main(String[] args)
les résultats des tests peuvent être retrouvés dans le fichier /tmp/pz0import.out
Si les informations sont trop verbeuses vous pouvez modifier le ficher log4j.properties du package agrosyst-cli
|
protected void |
processEntitiesPersistence(Map<Class,ImportResults> allResults) |
protected void |
processImport() |
protected void |
processPzOCSVFilesParsing(Map<Class,ImportResults> allResults) |
protected void |
setPracticedPhasesInterventionsDomainId(PracticedSystemAndDependencies practicedSystemAndDependencies,
String domainId) |
protected void |
setPracticeSeasonalInterventionsDomainCodeId(ImportResults practicedSystemsResult,
Map.Entry<String,EntityAndDependencies> stringEntityAndDependenciesEntry,
PracticedSystemAndDependencies practicedSystemAndDependencies,
Collection<Pz0PracticedSeasonalCropCycle> pz0SeasonalCropCycles,
String domainCodeId) |
protected void |
userAuthentication() |
protected void |
validEffectiveInterventionMainActionExists(Map<Class,ImportResults> allResults) |
protected void |
validEffectiveInterventions(ImportResults importResults,
String zoneId,
Collection<Pz0EffectiveIntervention> pz0Interventions) |
protected void |
validPracticedCropCycle(Map<Class,ImportResults> allResults) |
protected void |
validPracticedInterventionMainActionExists(Map<Class,ImportResults> allResults) |
protected void |
validToolsCouplingMainActionExist(Map<String,EntityAndDependencies> domainsAndDependencies,
ImportResults toolsCouplingsImportResults) |
protected void |
validToolsCouplingsEquipmentPreconditions(Map<String,EntityAndDependencies> domainsAndDependencies,
ImportResults toolsCouplingsImportResults) |
protected static final org.apache.commons.logging.Log log
protected static final String LAUNCH_INFO
protected final String configFilePath
protected ServiceFactory serviceFactory
protected AgrosystCliServiceContext serviceContext
protected DomainService domainService
protected GrowingSystemService growingSystemService
protected GrowingPlanService growingPlanService
protected ReferentialService referentialService
protected PracticedSystemService practicedSystemService
protected PracticedPlotService practicedPlotService
protected PlotService plotService
protected EffectiveCropCycleService effectiveCropCycleService
protected AuthorizationService authorizationService
protected String domainFilePath
protected String croppingPlanFilePath
protected String croppingPlanSpeciesFilePath
protected String equipmentFilePath
protected String toolsCouplingFilePath
protected String equipmentToToolsCouplingFilePath
protected String mainActionToToolsCouplingFilePath
protected String groundFilePath
protected String growingPlanFilePath
protected String growingSystemFilePath
protected String growingSystemNetworksFilePath
protected String practicedSystemFilePath
protected String practicedPlotFilePath
protected String practicedCropCycleFilePath
protected String practicedPerennialCropCycleFilePath
protected String practicedCropCyclePhaseFilePath
protected String practicedCropCycleSpeciesFilePath
protected String practicedSeasonalCropCycleFilePath
protected String practicedCropCycleNodeFilePath
protected String practicedCropCycleConnectionFilePath
protected String practicedInterventionFilePath
protected String practiceInterventionToolsCouplingFilePath
protected String effectivePerennialCropCycleFilePath
protected String effectiveCropCycleSpeciesFilePath
protected String effectivePhaseFilePath
protected String effectiveSeasonalCropCycleFilePath
protected String effectiveCropCycleNodeFilePath
protected String effectiveCropCycleConnectionFilePath
protected String effectiveInterventionFilePath
protected String effectiveSpeciesStadeFilePath
protected String effectiveToolsCouplingFilePath
protected String effectiveInvolvedRuleFilePath
protected String abstractActionFilePath
protected String seedingActionSpeciesFilePath
protected String harverstingYealdFilePath
protected String abstractInputFilePath
protected String fertiMinUnifaFilePath
protected String phytoProductInputTargetsFilePath
protected String plotFilePath
protected String zoneFilePAth
protected String usersRolesFilePath
public CliStarter(String configFilePath)
public static void main(String[] args)
args - Optional Parameter: config file path (if null 'agrosyst-import.properties' will be used)public AgrosystTopiaPersistenceContext getPersistenceContext()
protected void processImport()
protected void processPzOCSVFilesParsing(Map<Class,ImportResults> allResults) throws FileNotFoundException
FileNotFoundExceptionprotected void validPracticedInterventionMainActionExists(Map<Class,ImportResults> allResults)
protected void validEffectiveInterventionMainActionExists(Map<Class,ImportResults> allResults)
protected void validEffectiveInterventions(ImportResults importResults, String zoneId, Collection<Pz0EffectiveIntervention> pz0Interventions)
protected void importDomainUniverse(String domainFilePath, String croppingPlanFilePath, String croppingPlanSpeciesFilePath, String equipmentFilePath, String toolsCouplingFilePath, String equipmentToToolsCouplingFilePath, String mainActionToToolsCouplingFilePath, String groundFilePath, Map<Class,ImportResults> allResults) throws FileNotFoundException
FileNotFoundExceptionprotected void validPracticedCropCycle(Map<Class,ImportResults> allResults)
protected void processEntitiesPersistence(Map<Class,ImportResults> allResults)
protected void addInterventionDomainId(Map<Class,ImportResults> allResults)
protected void setPracticeSeasonalInterventionsDomainCodeId(ImportResults practicedSystemsResult, Map.Entry<String,EntityAndDependencies> stringEntityAndDependenciesEntry, PracticedSystemAndDependencies practicedSystemAndDependencies, Collection<Pz0PracticedSeasonalCropCycle> pz0SeasonalCropCycles, String domainCodeId)
protected void setPracticedPhasesInterventionsDomainId(PracticedSystemAndDependencies practicedSystemAndDependencies, String domainId)
protected boolean isImportErrors(Map<Class,ImportResults> allResults)
protected void importDomains(String domainFilePath, Map<Class,ImportResults> allResults) throws FileNotFoundException
FileNotFoundExceptionprotected void importCroppingPlans(String croppingPlanFilePath, Map<Class,ImportResults> allResults) throws FileNotFoundException
FileNotFoundExceptionprotected void importCroppingPlanSpecies(String croppingPlanSpeciesFilePath, Map<Class,ImportResults> allResults) throws FileNotFoundException
FileNotFoundExceptionprotected void importEquipments(String equipmentFilePath, Map<Class,ImportResults> allResults) throws FileNotFoundException
FileNotFoundExceptionprotected void importGrounds(String groundFilePath, Map<Class,ImportResults> allResults) throws FileNotFoundException
FileNotFoundExceptionprotected void importToolsCouplings(String toolsCouplingFilePath, String equipmentToToolCouplingFilePath, String mainActionToToolCouplingFilePath, Map<Class,ImportResults> allResults) throws FileNotFoundException
FileNotFoundExceptionprotected void validToolsCouplingMainActionExist(Map<String,EntityAndDependencies> domainsAndDependencies, ImportResults toolsCouplingsImportResults)
protected void validToolsCouplingsEquipmentPreconditions(Map<String,EntityAndDependencies> domainsAndDependencies, ImportResults toolsCouplingsImportResults)
protected void importEquipmentToToolCoupling(String equipmentToToolCouplingFilePath, Map<Class,ImportResults> allResults) throws FileNotFoundException
FileNotFoundExceptionprotected void importToolsCouplingMainsActions(String mainsActionsToolCouplingFilePath, Map<Class,ImportResults> allResults, ImportResults toolsCouplingsImportResults) throws FileNotFoundException
FileNotFoundExceptionprotected void importGrowingPlans(String growingPlanFilePath, Map<Class,ImportResults> allResults) throws FileNotFoundException
FileNotFoundExceptionprotected void importGrowingSystems(String growingSystemFilePath, String growingSystemNetworksFilePath, Map<Class,ImportResults> allResults) throws FileNotFoundException
FileNotFoundExceptionprotected void importPlots(String plotFilePath, String zoneFilePAth, Map<Class,ImportResults> allResults) throws FileNotFoundException
FileNotFoundExceptionprotected void importPracticedSystems(String practicedSystemFilePath, Map<Class,ImportResults> allResults) throws FileNotFoundException
FileNotFoundExceptionprotected void importPracticedPlots(String practicedPlotFilePath, Map<Class,ImportResults> allResults) throws FileNotFoundException
FileNotFoundExceptionprotected void importPracticedCropCycle(String practicedCropCycleFilePath, String practicedSeasonalCropCycleFilePath, String practicedCropCycleNodeFilePath, String practicedCropCycleConnectionFilePath, String practicedPerennialCropCycleFilePath, String practicedCropCyclePhaseFilePath, String practicedCropCycleSpeciesFilePath, Map<Class,ImportResults> allResults) throws FileNotFoundException
FileNotFoundExceptionprotected void importPracticedSeasonalCropCycle(String practicedSeasonalCropCycleFilePath, String practicedCropCycleNodeFilePath, String practicedCropCycleConnectionFilePath, Map<Class,ImportResults> allResults) throws FileNotFoundException
FileNotFoundExceptionprotected void importPracticedPerennialCropCycle(String practicedPerennialCropCycleFilePath, String practicedCropCyclePhaseFilePath, String practicedCropCycleSpeciesFilePath, Map<Class,ImportResults> allResults) throws FileNotFoundException
FileNotFoundExceptionprotected void importPracticedIntervention(String practicedInterventionFilePath, String practiceInterventionToolsCouplingFilePath, Map<Class,ImportResults> allResults) throws FileNotFoundException
FileNotFoundExceptionprotected void importPracticeInterventionToolsCoupling(String practiceInterventionToolsCouplingFilePath, Map<Class,ImportResults> allResults) throws FileNotFoundException
FileNotFoundExceptionprotected void importEffectiveCropCycleUniverse(String effectivePerennialCropCycleFilePath, String effectiveCropCycleSpeciesFilePath, String effectivePhaseFilePath, String effectiveSeasonalCropCycleFilePath, String effectiveCropCycleNodeFilePath, String effectiveCropCycleConnectionFilePath, String effectiveInterventionFilePath, String effectiveSpeciesStadeFilePath, String effectiveToolsCouplingFilePath, String effectiveInvolvedRuleFilePath, Map<Class,ImportResults> allResults) throws FileNotFoundException
FileNotFoundExceptionprotected void importPracticedSystemUniverse(String practicedSystemFilePath, String practicedPlotFilePath, String practicedCropCycleFilePath, String practicedSeasonalCropCycleFilePath, String practicedCropCycleNodeFilePath, String practicedCropCycleConnectionFilePath, String practicedPerennialCropCycleFilePath, String practicedCropCyclePhaseFilePath, String practicedCropCycleSpeciesFilePath, String practiceInterventionToolsCouplingFilePath, String practicedInterventionFilePath, Map<Class,ImportResults> allResults) throws FileNotFoundException
FileNotFoundExceptionprotected void importAbstractAction(String abstractActionFilePath, Map<Class,ImportResults> allResults) throws FileNotFoundException
FileNotFoundExceptionprotected void importHarverstingYeald(String harverstingYealdFilePath, Map<Class,ImportResults> allResults) throws FileNotFoundException
FileNotFoundExceptionprotected void importSeedingActionSpecies(String seedingActionSpeciesFilePath, Map<Class,ImportResults> allResults) throws FileNotFoundException
FileNotFoundExceptionprotected void importAbstractInput(String inputFilePath, String fertiMinFilePath, String phytoProductInputTargetsFilePath, Map<Class,ImportResults> allResults) throws FileNotFoundException
FileNotFoundExceptionprotected void importUsersRolesImporter(String usersRolesFilePath, Map<Class,ImportResults> allResults) throws FileNotFoundException
FileNotFoundExceptionprotected void displayImportResult(ImportResults importResults)
protected void displayPersistenceImportResult(Map<Class,ImportResults> allResults)
protected void userAuthentication()
protected void createAdminUser(String email, String password, String firstName, String lastName, AgrosystUserTopiaDao userDao)
protected ServiceContext getServiceContext()
protected void init()
Copyright © 2013–2015 Inra. All rights reserved.