Class CreateConsentValidator

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

@Component public class CreateConsentValidator extends UserValidatorComponent
This class defines create consent validator. This validator component used for validating the given request model ConsentRequest
Author:
Infosys Equinox
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default Constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    preProcess(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.

    Methods inherited from class com.skava.validator.services.UserValidatorComponent

    destroy, init, onEvent, postProcess

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.skava.core.validation.ValidatorComponent

    preProcess
  • Constructor Details

    • CreateConsentValidator

      public CreateConsentValidator()
      Default Constructor
  • Method Details

    • preProcess

      public void preProcess(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 consent's title,status are null and consent's required flag is false. If consent's title,status are null and required flag is false, 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 ConsentRequest request model used for the validation of consent title, status and required flag.