Class StaticPackageValidationHandler
java.lang.Object
de.hybris.platform.staticpackagebackoffice.widgets.handler.StaticPackageValidationHandler
- All Implemented Interfaces:
com.hybris.cockpitng.widgets.configurableflow.FlowActionHandler
public class StaticPackageValidationHandler
extends Object
implements com.hybris.cockpitng.widgets.configurableflow.FlowActionHandler
The Static Package Validation Handler class for the Static Package creation wizard.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected de.hybris.platform.servicelayer.model.ModelServiceGets model service.protected com.hybris.cockpitng.util.notifications.NotificationServiceGets notification service.protected de.hybris.platform.servicelayer.time.TimeServiceGets time service.protected TravelBackofficeCommonValidatorvoidperform(com.hybris.cockpitng.config.jaxb.wizard.CustomType customType, com.hybris.cockpitng.widgets.configurableflow.FlowActionHandlerAdapter flowActionHandlerAdapter, Map<String, String> map) This method performs a validation of the general information provided for a static package.voidsetModelService(de.hybris.platform.servicelayer.model.ModelService modelService) Sets model service.voidsetNotificationService(com.hybris.cockpitng.util.notifications.NotificationService notificationService) Sets notification service.voidsetTimeService(de.hybris.platform.servicelayer.time.TimeService timeService) Sets time service.voidsetTravelBackofficeCommonValidator(TravelBackofficeCommonValidator travelBackofficeCommonValidator)
-
Constructor Details
-
StaticPackageValidationHandler
public StaticPackageValidationHandler()
-
-
Method Details
-
perform
public void perform(com.hybris.cockpitng.config.jaxb.wizard.CustomType customType, com.hybris.cockpitng.widgets.configurableflow.FlowActionHandlerAdapter flowActionHandlerAdapter, Map<String, String> map) This method performs a validation of the general information provided for a static package. Checks if: 1) All the mandatory fields have been added through the wizard. 2) The Id is unique in the db and the number of characters is less than 255. 3) The duration of the static package is a number greater than 0. 4) All the availability dates must be onwards. 5) The passenger type must be unique in the list of guest counts.- Specified by:
performin interfacecom.hybris.cockpitng.widgets.configurableflow.FlowActionHandler- Parameters:
customType- the customTypeflowActionHandlerAdapter- the flowActionHandlerAdaptermap- the map
-
getModelService
protected de.hybris.platform.servicelayer.model.ModelService getModelService()Gets model service.- Returns:
- the model service
-
setModelService
public void setModelService(de.hybris.platform.servicelayer.model.ModelService modelService) Sets model service.- Parameters:
modelService- the model service
-
getNotificationService
protected com.hybris.cockpitng.util.notifications.NotificationService getNotificationService()Gets notification service.- Returns:
- the notification service
-
setNotificationService
public void setNotificationService(com.hybris.cockpitng.util.notifications.NotificationService notificationService) Sets notification service.- Parameters:
notificationService- the notification service
-
getTravelBackofficeCommonValidator
- Returns:
- the travelBackofficeCommonValidator
-
setTravelBackofficeCommonValidator
public void setTravelBackofficeCommonValidator(TravelBackofficeCommonValidator travelBackofficeCommonValidator) - Parameters:
travelBackofficeCommonValidator- the travelBackofficeCommonValidator to set
-
getTimeService
protected de.hybris.platform.servicelayer.time.TimeService getTimeService()Gets time service.- Returns:
- the time service
-
setTimeService
public void setTimeService(de.hybris.platform.servicelayer.time.TimeService timeService) Sets time service.- Parameters:
timeService- the time service
-