NdsBeisEsb/src/main/java/com/northgateps/nds/beis/esb/process/ValidatePRSExemptionSearchNdsRequest.java
/**
     * Validates a PRSExemptionSearch request
     * 
     * @param request
     * @return request - after validation
     * @throws NdsApplicationException
     * @throws NdsBusinessException
     */
Validates a PRSExemptionSearch request

@param request
@return request - after validation
@throws NdsApplicationException
@throws NdsBusinessException
Validates a PRSExemptionSearch request @param request @return request - after validation @throws NdsApplicationException @throws NdsBusinessException
public PRSExemptionSearchNdsRequest validate(final PRSExemptionSearchNdsRequest request)
            throws NdsApplicationException, NdsBusinessException {
        List<ValidationViolation> violations = new ArrayList<ValidationViolation>();
        logger.info("Validating PRSExemmptionSearch request");
       if (request.getExemptionSearch() == null) {
            throw new NdsApplicationException("Exemption search details expected but found null");
        } 
       request.getExemptionSearch().validate("exemptionSearch", violations,
               new ValidationContext<ExemptionSearchEsbModel>(new ExemptionSearchEsbModel() {
                   @Override
                   public ExemptionSearch getExemptionSearch() {
                       return request.getExemptionSearch();
                   }
               }, ValidationDomain.COMPLETE, scriptsLoader, getModelAnnotationsProvider(), null));
        if (violations.size() > 0) {
            throw new NdsBusinessException(PRSExemptionSearchNdsResponse.class, violations);
        }
       return request;
    }
public PRSExemptionSearchNdsRequest validate ( final PRSExemptionSearchNdsRequest request ) throws NdsApplicationException , NdsBusinessException { List < ValidationViolation > violations = new ArrayList < ValidationViolation > ( ) ; logger . info ( "Validating PRSExemmptionSearch request" ) ; if ( request . getExemptionSearch ( ) == null ) { throw new NdsApplicationException ( "Exemption search details expected but found null" ) ; } request . getExemptionSearch ( ) . validate ( "exemptionSearch" , violations , new ValidationContext < ExemptionSearchEsbModel > ( new ExemptionSearchEsbModel ( ) { @ Override public ExemptionSearch getExemptionSearch ( ) { return request . getExemptionSearch ( ) ; } } , ValidationDomain . COMPLETE , scriptsLoader , getModelAnnotationsProvider ( ) , null ) ) ; if ( violations . size ( ) > 0 ) { throw new NdsBusinessException ( PRSExemptionSearchNdsResponse . class , violations ) ; } return request ; }
Validates a PRSExemptionSearch request
Validates a PRSExemptionSearch request