Class TravelBackofficeCommonValidator

java.lang.Object
de.hybris.platform.travelbackofficeservices.validator.TravelBackofficeCommonValidator

public class TravelBackofficeCommonValidator extends Object
Validator to provide functionality for custom validation for the backoffice wizards.
  • Constructor Details

    • TravelBackofficeCommonValidator

      public TravelBackofficeCommonValidator()
  • Method Details

    • validateUniqueForAttributes

      public boolean validateUniqueForAttributes(Map<String,Object> attributes, String typeCode)
      This method checks if a model of type corresponding to the typeCode for the specified attributes. Attributes is a Map<String, Object> where the key is the name of the attributes and the value is the value of that attribute. If a ModelNotFoundException is caught, it means that no items exist, so the validation result is true; if no exceptions are caught, it means that at least one model exists, so the validation result is false.
      Parameters:
      attributes - the map of the name of the attribute and the value
      typeCode - the typeCode
      Returns:
      true if the validation is successful, false otherwise
    • getTravelBackofficeGenericDao

      protected TravelBackofficeGenericDao getTravelBackofficeGenericDao()
      Returns:
      the travelBackofficeGenericDao
    • setTravelBackofficeGenericDao

      public void setTravelBackofficeGenericDao(TravelBackofficeGenericDao travelBackofficeGenericDao)
      Parameters:
      travelBackofficeGenericDao - the travelBackofficeGenericDao to set