org.gcube.portlets.user.speciesdiscovery.server.job
Class OccurrenceJobUtil

java.lang.Object
  extended by org.gcube.portlets.user.speciesdiscovery.server.job.OccurrenceJobUtil

public class OccurrenceJobUtil
extends Object


Field Summary
static String COMPLETED
           
static String FAILED
           
protected static org.apache.log4j.Logger logger
           
static String PENDING
           
static String RUNNING
           
 
Constructor Summary
OccurrenceJobUtil()
           
 
Method Summary
static int changeStatusOccurrenceJobById(String jobIdentifier, DownloadState state, OccurrenceJobPersistence occurrencesJobDao)
           
static SaveFileFormat converFileFormat(String fileFormat)
           
static OccurrencesSaveEnum convertCsvType(String csvType)
           
static JobOccurrencesModel convertJob(OccurrencesJob job, org.gcube.data.spd.stubs.types.Status statusResponse, OccurrenceJobPersistence occurrencesJobDao)
           
static String convertListKeyIntoStoreXMLString(List<String> keys)
           
static JobOccurrencesModel createOccurrenceJobOnServiceByKeys(JobOccurrencesModel jobModel, SpeciesService taxonomyService, OccurrenceJobPersistence occurrencesJobDao, List<String> keys, List<DataSource> dataSources, SaveFileFormat saveFileFormat, OccurrencesSaveEnum csvType, int expectedOccurrence)
           
static int deleteOccurrenceJobById(String jobIdentifier, OccurrenceJobPersistence occurrencesJobDao)
           
static DownloadState getDownloadState(String status)
           
static List<String> getListOfSelectedKey(FetchingSession<ResultRow> searchSession)
           
static OccurrenceKeys getListOfSelectedKeyByDataSource(String dataSource, org.gcube.application.framework.core.session.ASLSession session)
           
static List<String> revertListKeyFromStoredXMLString(String storedKeysAsXml)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPLETED

public static final String COMPLETED
See Also:
Constant Field Values

FAILED

public static final String FAILED
See Also:
Constant Field Values

RUNNING

public static final String RUNNING
See Also:
Constant Field Values

PENDING

public static final String PENDING
See Also:
Constant Field Values

logger

protected static org.apache.log4j.Logger logger
Constructor Detail

OccurrenceJobUtil

public OccurrenceJobUtil()
Method Detail

convertJob

public static JobOccurrencesModel convertJob(OccurrencesJob job,
                                             org.gcube.data.spd.stubs.types.Status statusResponse,
                                             OccurrenceJobPersistence occurrencesJobDao)

getDownloadState

public static DownloadState getDownloadState(String status)

convertCsvType

public static OccurrencesSaveEnum convertCsvType(String csvType)

converFileFormat

public static SaveFileFormat converFileFormat(String fileFormat)

deleteOccurrenceJobById

public static int deleteOccurrenceJobById(String jobIdentifier,
                                          OccurrenceJobPersistence occurrencesJobDao)

changeStatusOccurrenceJobById

public static int changeStatusOccurrenceJobById(String jobIdentifier,
                                                DownloadState state,
                                                OccurrenceJobPersistence occurrencesJobDao)

getListOfSelectedKey

public static List<String> getListOfSelectedKey(FetchingSession<ResultRow> searchSession)
                                         throws Exception
Throws:
Exception

getListOfSelectedKeyByDataSource

public static OccurrenceKeys getListOfSelectedKeyByDataSource(String dataSource,
                                                              org.gcube.application.framework.core.session.ASLSession session)

createOccurrenceJobOnServiceByKeys

public static JobOccurrencesModel createOccurrenceJobOnServiceByKeys(JobOccurrencesModel jobModel,
                                                                     SpeciesService taxonomyService,
                                                                     OccurrenceJobPersistence occurrencesJobDao,
                                                                     List<String> keys,
                                                                     List<DataSource> dataSources,
                                                                     SaveFileFormat saveFileFormat,
                                                                     OccurrencesSaveEnum csvType,
                                                                     int expectedOccurrence)

convertListKeyIntoStoreXMLString

public static String convertListKeyIntoStoreXMLString(List<String> keys)

revertListKeyFromStoredXMLString

public static List<String> revertListKeyFromStoredXMLString(String storedKeysAsXml)


Copyright © 2013. All Rights Reserved.