Class KymaUpdateConsumedDestinationsJobPerformable
java.lang.Object
de.hybris.platform.servicelayer.cronjob.AbstractJobPerformable<CronJobModel>
de.hybris.platform.kymaintegrationservices.jobs.KymaUpdateConsumedDestinationsJobPerformable
- All Implemented Interfaces:
JobPerformable<CronJobModel>
public class KymaUpdateConsumedDestinationsJobPerformable
extends AbstractJobPerformable<CronJobModel>
A job responsible for updating consumed destinations of a destination target and registration of exposed destinations
-
Field Summary
FieldsFields inherited from class de.hybris.platform.servicelayer.cronjob.AbstractJobPerformable
flexibleSearchService, modelService, sessionService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ConsumedDestinationModelgetConsumedDestination(DestinationTargetModel destinationTarget, String serviceId) protected DestinationService<AbstractDestinationModel>protected DestinationTargetServiceprotected ModelServiceprotected RestTemplateWrapperbooleanChecks whether the execution is implemented abortable.protected booleanneedUpdateConsumedDestinations(KymaServicesUrls urls, DestinationTargetModel destinationTarget) perform(CronJobModel cronJob) The execution body for aServicelayerJob.protected voidregisterExposedDestinations(DestinationTargetModel destinationTarget) voidsetDestinationService(DestinationService<AbstractDestinationModel> destinationService) voidsetDestinationTargetService(DestinationTargetService destinationTargetService) voidsetRestTemplate(RestTemplateWrapper restTemplate) protected voidupdateConsumedDestination(ConsumedDestinationModel consumedDestination, String destinationUrl) protected voidupdateConsumedDestinations(DestinationTargetModel destinationTarget, KymaServicesUrls urls) protected voidupdateDestinationTargetRegistrationStatus(DestinationTargetModel destinationTarget, RegistrationStatus status) protected voidupdateDestinationTargetRegistrationStatusInfo(DestinationTargetModel destinationTarget, String statusInfo) protected voidvalidateConsumedDestinations(KymaServicesUrls urls, DestinationTargetModel destinationTarget) protected booleanvalidateInfoData(KymaInfoData infoData) protected booleanMethods inherited from class de.hybris.platform.servicelayer.cronjob.AbstractJobPerformable
clearAbortRequestedIfNeeded, isPerformable, setFlexibleSearchService, setModelService, setSessionService
-
Field Details
-
CRONJOB_LIFESPAN_PROP_KEY
- See Also:
-
DEFAULT_CRONJOB_LIFESPAN
public static final int DEFAULT_CRONJOB_LIFESPAN- See Also:
-
-
Constructor Details
-
KymaUpdateConsumedDestinationsJobPerformable
public KymaUpdateConsumedDestinationsJobPerformable()
-
-
Method Details
-
perform
Description copied from interface:JobPerformableThe execution body for aServicelayerJob. Implement here your execution logic. It can be called synchronous or asynchronous. So be aware of thread-safety. Method will return a result object saying if the execution has reached end and if it was successful.- Specified by:
performin interfaceJobPerformable<CronJobModel>- Specified by:
performin classAbstractJobPerformable<CronJobModel>- Parameters:
cronJob- the related CronJob in whose context the execution will be performed.- Returns:
- a
PerformResultthat indicates whether theexecutionwas successfully executed or not and has finished or not.
-
isAbortable
public boolean isAbortable()Description copied from interface:JobPerformableChecks whether the execution is implemented abortable.- Specified by:
isAbortablein interfaceJobPerformable<CronJobModel>- Overrides:
isAbortablein classAbstractJobPerformable<CronJobModel>- Returns:
- true if the execution can be aborted
-
validateInfoData
-
validateInfoUrls
-
updateDestinationTargetRegistrationStatus
protected void updateDestinationTargetRegistrationStatus(DestinationTargetModel destinationTarget, RegistrationStatus status) -
updateDestinationTargetRegistrationStatusInfo
protected void updateDestinationTargetRegistrationStatusInfo(DestinationTargetModel destinationTarget, String statusInfo) -
updateConsumedDestinations
protected void updateConsumedDestinations(DestinationTargetModel destinationTarget, KymaServicesUrls urls) throws ApiRegistrationException - Throws:
ApiRegistrationException
-
registerExposedDestinations
protected void registerExposedDestinations(DestinationTargetModel destinationTarget) throws ApiRegistrationException - Throws:
ApiRegistrationException
-
validateConsumedDestinations
protected void validateConsumedDestinations(KymaServicesUrls urls, DestinationTargetModel destinationTarget) throws ApiRegistrationException - Throws:
ApiRegistrationException
-
getConsumedDestination
protected ConsumedDestinationModel getConsumedDestination(DestinationTargetModel destinationTarget, String serviceId) -
needUpdateConsumedDestinations
protected boolean needUpdateConsumedDestinations(KymaServicesUrls urls, DestinationTargetModel destinationTarget) -
updateConsumedDestination
protected void updateConsumedDestination(ConsumedDestinationModel consumedDestination, String destinationUrl) -
getDestinationTargetService
-
setDestinationTargetService
-
getDestinationService
-
setDestinationService
-
getModelService
-
getRestTemplate
-
setRestTemplate
-