Class CreateBlackListItemServiceValidator

java.lang.Object
com.skava.validator.services.UserValidatorComponent
com.skava.validator.services.CreateBlackListItemServiceValidator
All Implemented Interfaces:
com.skava.core.EcommComponent, com.skava.core.validation.ValidatorComponent

@Component public class CreateBlackListItemServiceValidator extends UserValidatorComponent
This class defines create BlackListItem service validator. This validator component used for validating the given request model BlackListItemRequest
Author:
Infosys Equinox
  • Constructor Details

    • CreateBlackListItemServiceValidator

      @Autowired public CreateBlackListItemServiceValidator(UserCommonServices userCommonServices)
      Default Constructor.
  • Method Details

    • preProcess

      public void preProcess(@Valid @Valid com.skava.core.validation.InputModel model)
      This pre process method is used to validate the input request model.If the validation fails then it will throw the validation error response will be return as a response with respective http status code, otherwise the main process implementation will execute.
      The following are the validation that occurs
      • Check whether the user's notes title and descriptions are null. If user's notes title and descriptions are null, then this pre process method will throw the validation error response will be return as a response with respective http status code Else the main process implementation will execute.
      Specified by:
      preProcess in interface com.skava.core.validation.ValidatorComponent
      Overrides:
      preProcess in class UserValidatorComponent
      Parameters:
      model - This InputModel model holds BlackListItemRequest request model which is used for validating the notes title and description.
    • isMandatoryPropertyMissing

      public boolean isMandatoryPropertyMissing(BlackListItem blackListItemRequest)
      Parameters:
      blackListItemRequest - blackListItemRequest
      Returns:
      boolean value