public class WebResultService extends Object
Modifier and Type | Field and Description |
---|---|
protected CoserApplicationContext |
applicationContext |
Constructor and Description |
---|
WebResultService(CoserApplicationContext applicationContext) |
Modifier and Type | Method and Description |
---|---|
protected void |
cleanCurrentProjectDirectory(ProjectService projectService,
File projectsDirectory,
Collection<String> newResultIds)
Fait le menage dans le dossier courant des projets en supprimant
tout les resulat qui ont un result id present dans la liste
newResultIds . |
void |
deleteResults(CoserRequestContext context,
DeleteResultsRequest request) |
protected CoserRequestExecutor |
executeAll(CoserMainRepositoryProvider repositoryProvider,
CoserRequestContext context,
CoserRequest request) |
CoserRequestExecutor |
executeAll(CoserRequestContext context,
CoserRequest request) |
protected CoserRequestExecutor |
executeFirst(CoserMainRepositoryProvider repositoryProvider,
CoserRequestContext context,
CoserRequest request) |
CoserRequestExecutor |
executeFirst(CoserRequestContext context,
CoserRequest request) |
protected CoserRequestExecutor |
executeUnique(CoserMainRepositoryProvider repositoryProvider,
CoserRequestContext context,
CoserRequest request) |
CoserRequestExecutor |
executeUnique(CoserRequestContext context,
CoserRequest request) |
FileResult |
extractRawDataAndResults(CoserRequestContext context,
ExtractRawDataAndResultsRequest request)
Extract some raw data and results from repositories and assembly them as an archive.
|
protected void |
generatedAndSendNewResultNotifications(String login,
fr.ifremer.coser.services.WebResultService.NewUploadContext uploadContext) |
protected CoserBusinessConfig |
getConfig() |
protected FileFilter |
getCopyFileFilter(ProjectService projectService,
File scanDirectory,
boolean mapResults)
Retourne un file filter qui ne copiera que les dossiers resultat
correspondant au type demandé.
|
protected Extracts |
getExtracts() |
protected CoserMainRepositoryProvider |
getInternalRepositoryProvider() |
Map<String,ResultRepositoryType> |
getRepositoryTypes() |
protected ZoneMap |
getZoneMap() |
protected Map<String,String> |
getZonesIds(ProjectService projectService,
File scanDirectory,
Boolean indicatorResults,
Boolean mapResults,
Boolean dataResults)
Recupere dans un repertoire donné, les zoneid des resultat avec
pour chaque id, le nom du projet associé.
|
CoserRequestContext |
newRequestContext(Locale locale) |
void |
registerNewUploadedResults(CoserRequestContext context,
String login,
File archiveFile)
Traite le fichier uploade par l'application client et l'enregistre
dans le stockage coté web.
|
protected void |
registerNewUploadedResultsForEchoBase(fr.ifremer.coser.services.WebResultService.NewUploadContext uploadContext,
File basedir,
GetResultNameRequest indicatorsRequest,
GetResultNameRequest mapsRequest,
GetResultNameRequest rawDataRequest) |
protected void |
registerNewUploadedResultsForRSufi(fr.ifremer.coser.services.WebResultService.NewUploadContext uploadContext,
File tempDirectory,
GetResultNameRequest indicatorsRequest,
GetResultNameRequest mapsRequest,
GetResultNameRequest rawDataRequest) |
protected <R extends CoserRequest> |
requestBuilder(CoserRequestContext context,
Class<R> requestType) |
void |
resetRepositories() |
protected void |
sendNewResultNotifications(String login,
int count,
String detail)
Envoi un mail de notification apres la publication des resultat à la
liste des adresses email renseignées dans la configuration.
|
protected final CoserApplicationContext applicationContext
public WebResultService(CoserApplicationContext applicationContext)
public CoserRequestContext newRequestContext(Locale locale)
public CoserRequestExecutor executeUnique(CoserRequestContext context, CoserRequest request)
public CoserRequestExecutor executeFirst(CoserRequestContext context, CoserRequest request)
public CoserRequestExecutor executeAll(CoserRequestContext context, CoserRequest request)
public FileResult extractRawDataAndResults(CoserRequestContext context, ExtractRawDataAndResultsRequest request)
context
- request contextrequest
- extract requestpublic void deleteResults(CoserRequestContext context, DeleteResultsRequest request)
public void resetRepositories()
public Map<String,ResultRepositoryType> getRepositoryTypes()
public void registerNewUploadedResults(CoserRequestContext context, String login, File archiveFile)
login
- user loginarchiveFile
- uploaded fileprotected void registerNewUploadedResultsForEchoBase(fr.ifremer.coser.services.WebResultService.NewUploadContext uploadContext, File basedir, GetResultNameRequest indicatorsRequest, GetResultNameRequest mapsRequest, GetResultNameRequest rawDataRequest)
protected void registerNewUploadedResultsForRSufi(fr.ifremer.coser.services.WebResultService.NewUploadContext uploadContext, File tempDirectory, GetResultNameRequest indicatorsRequest, GetResultNameRequest mapsRequest, GetResultNameRequest rawDataRequest) throws CoserBusinessException, IOException
CoserBusinessException
IOException
protected void generatedAndSendNewResultNotifications(String login, fr.ifremer.coser.services.WebResultService.NewUploadContext uploadContext)
protected CoserRequestExecutor executeUnique(CoserMainRepositoryProvider repositoryProvider, CoserRequestContext context, CoserRequest request)
protected CoserRequestExecutor executeFirst(CoserMainRepositoryProvider repositoryProvider, CoserRequestContext context, CoserRequest request)
protected CoserRequestExecutor executeAll(CoserMainRepositoryProvider repositoryProvider, CoserRequestContext context, CoserRequest request)
protected <R extends CoserRequest> CoserRequestBuilder<R> requestBuilder(CoserRequestContext context, Class<R> requestType)
protected CoserBusinessConfig getConfig()
protected ZoneMap getZoneMap()
protected Extracts getExtracts()
protected CoserMainRepositoryProvider getInternalRepositoryProvider()
protected void sendNewResultNotifications(String login, int count, String detail)
login
- user logincount
- updated data countdetail
- body mail detailprotected void cleanCurrentProjectDirectory(ProjectService projectService, File projectsDirectory, Collection<String> newResultIds) throws CoserBusinessException
newResultIds
.
Supprime egalement les selections qui n'ont plus de résultats et
les projets qui n'ont plus de selection.projectService
- service to load projectprojectsDirectory
- projectsDirectorynewResultIds
- new idsCoserBusinessException
protected FileFilter getCopyFileFilter(ProjectService projectService, File scanDirectory, boolean mapResults) throws CoserBusinessException
projectService
- service to load projectscanDirectory
- directory containing result to copymapResults
- result type to getCoserBusinessException
protected Map<String,String> getZonesIds(ProjectService projectService, File scanDirectory, Boolean indicatorResults, Boolean mapResults, Boolean dataResults) throws CoserBusinessException
Boolean
car si la valeur
est null
, on ne tient pas compte du critere lors de la recherche.projectService
- service to load projectscanDirectory
- le repertoire a scannerindicatorResults
- if true get indicator resultsmapResults
- if true get map resultsdataResults
- if true get data allowed resultCoserBusinessException
Copyright © 2010–2015 Ifremer. All rights reserved.