Class BTPresignedUrlGenerator
java.lang.Object
overit.geocall.bl.BusinessTask<AgendaAffinityPresignedUrlGeneratorEvent>
overit.geocallapp.wfm.ai.bl.agendaaffinity.task.BTPresignedUrlGenerator
- All Implemented Interfaces:
Serializable,Tool
@Event(AgendaAffinityPresignedUrlGeneratorEvent.class)
public class BTPresignedUrlGenerator
extends BusinessTask<AgendaAffinityPresignedUrlGeneratorEvent>
This task is going to generate the presigned urls needed for VRP call.
- Since:
- 9.3
- See Also:
- GCApi:
- task
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumData type supported for presigned urls generator. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected Stringprotected static final Stringprotected static final Stringprotected intprotected S3WebResourceFactoryprotected static final LogChannelprotected static final Stringprotected Stringprotected software.amazon.awssdk.services.s3.presigner.S3Presignerprotected software.amazon.awssdk.services.s3.S3Clientprotected String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbody(AgendaAffinityPresignedUrlGeneratorEvent event, PoolKit pk) Implements this method to write the specific task logic to handle the input parameter.protected voidMethod thay generate the cluster mapping's presigned url.protected List<BOConfigurationParams> getConfigurationParameters(Long algorithmId, Long operationCenterId, PoolKit pk) protected voidMethod thay generate the model's presigned url.protected voidMethod thay generate the orders's presigned url.This method will populate and return the object presignedUrls.This object contains the model orders, cluster generdated urls.getPresignedUrls(BTPresignedUrlGenerator.DataType objectToTake) This method will populate and return the object presignedUrls with only one url inside, it will contain the url associated with the DataType you passed as inout.protected voidloadConfiguration(Long algorithmId, Long operationCenterId) Method that will load the last configuration it finds with given algorithm.We don't care about the task used, so we will put it with a default value == train.Methods inherited from class overit.geocall.bl.BusinessTask
start, start, startAlone, startInBackground
-
Field Details
-
DEFAULT_TASK
- See Also:
-
CLUSTER_FILE_NAME
- See Also:
-
ORDERS_FILE_NAME
- See Also:
-
LOG
-
aiAlgorithm
-
presigner
protected software.amazon.awssdk.services.s3.presigner.S3Presigner presigner -
s3Client
protected software.amazon.awssdk.services.s3.S3Client s3Client -
aiModel
-
presignedUrls
-
s3DataRoot
-
expTimeInMins
protected int expTimeInMins -
factory
-
path
-
-
Constructor Details
-
BTPresignedUrlGenerator
public BTPresignedUrlGenerator()
-
-
Method Details
-
body
protected void body(AgendaAffinityPresignedUrlGeneratorEvent event, PoolKit pk) throws DAException, DAValidateException Description copied from class:BusinessTaskImplements this method to write the specific task logic to handle the input parameter.- Specified by:
bodyin classBusinessTask<AgendaAffinityPresignedUrlGeneratorEvent>- Parameters:
event- the object upon which the task will works onpk- the poolkit containing the reference to the database connection that can be used- Throws:
DAException- in case of database errorDAValidateException- in case of database validation error
-
loadConfiguration
protected void loadConfiguration(Long algorithmId, Long operationCenterId) throws DAValidateException, DAException, software.amazon.awssdk.services.s3.model.S3Exception Method that will load the last configuration it finds with given algorithm.We don't care about the task used, so we will put it with a default value == train.- Parameters:
algorithmId-operationCenterId-- Throws:
DAValidateExceptionDAExceptionsoftware.amazon.awssdk.services.s3.model.S3Exception
-
getConfigurationParameters
protected List<BOConfigurationParams> getConfigurationParameters(Long algorithmId, Long operationCenterId, PoolKit pk) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
getPresignedUrls
This method will populate and return the object presignedUrls.This object contains the model orders, cluster generdated urls.- Returns:
- the presigned urls
- Throws:
DAValidateException- the DA validate exception
-
getPresignedUrls
public Map<String,String> getPresignedUrls(BTPresignedUrlGenerator.DataType objectToTake) throws DAValidateException This method will populate and return the object presignedUrls with only one url inside, it will contain the url associated with the DataType you passed as inout.- Parameters:
objectToTake- a DataType of the url you want to create.- Returns:
- the presigned urls
- Throws:
DAValidateException- the DA validate exception
-
getModelPresignedUrl
Method thay generate the model's presigned url.- Throws:
DAValidateException- the DA validate exception
-
getOrdersPresignedUrl
Method thay generate the orders's presigned url.- Throws:
DAValidateException- the DA validate exception
-
getClusterMappingPresignedUrl
Method thay generate the cluster mapping's presigned url.- Throws:
DAValidateException- the DA validate exception
-