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

@param request
@return request - after validation
@throws NdsApplicationException
@throws NdsBusinessException
Validates a PRSPenaltySearch request @param request @return request - after validation @throws NdsApplicationException @throws NdsBusinessException
public PRSPenaltySearchNdsRequest validate(final PRSPenaltySearchNdsRequest request)
            throws NdsApplicationException, NdsBusinessException {
        List<ValidationViolation> violations = new ArrayList<ValidationViolation>();
        logger.info("Validating PRSPenaltySearch request");
        if (request.getPenaltySearch() == null) {
            throw new NdsApplicationException("Penalty search details expected but found null");
        }
        request.getPenaltySearch().validate("penaltySearch", violations,
                new ValidationContext<PenaltySearchEsbModel>(new PenaltySearchEsbModel() {
                    @Override
                    public PenaltySearch getPenaltySearch() {
                        return request.getPenaltySearch();
                    }
                }, ValidationDomain.COMPLETE, scriptsLoader, getModelAnnotationsProvider(), null));
        if (violations.size() > 0) {
            throw new NdsBusinessException(PRSPenaltySearchNdsResponse.class, violations);
        }
        return request;
    }
public PRSPenaltySearchNdsRequest validate ( final PRSPenaltySearchNdsRequest request ) throws NdsApplicationException , NdsBusinessException { List < ValidationViolation > violations = new ArrayList < ValidationViolation > ( ) ; logger . info ( "Validating PRSPenaltySearch request" ) ; if ( request . getPenaltySearch ( ) == null ) { throw new NdsApplicationException ( "Penalty search details expected but found null" ) ; } request . getPenaltySearch ( ) . validate ( "penaltySearch" , violations , new ValidationContext < PenaltySearchEsbModel > ( new PenaltySearchEsbModel ( ) { @ Override public PenaltySearch getPenaltySearch ( ) { return request . getPenaltySearch ( ) ; } } , ValidationDomain . COMPLETE , scriptsLoader , getModelAnnotationsProvider ( ) , null ) ) ; if ( violations . size ( ) > 0 ) { throw new NdsBusinessException ( PRSPenaltySearchNdsResponse . class , violations ) ; } return request ; }
Validates a PRSPenaltySearch request
Validates a PRSPenaltySearch request