tvaultapi/src/main/java/com/tmobile/cso/vault/api/service/SSLCertificateService.java
private boolean validateInputData(SSLCertificateRequest sslCertificateRequest, UserDetails userDetails) {
        boolean isValid = true;
        log.debug(JSONUtil.getJSON(ImmutableMap.<String, String>builder()
                .put(LogMessage.USER, ThreadLocalContext.getCurrentMap().get(LogMessage.USER))
                .put(LogMessage.ACTION, SSLCertificateConstants.VALIDATE_INPUT_DATA)
                .put(LogMessage.MESSAGE, "Trying to validate input data")
                .put(LogMessage.APIURL, ThreadLocalContext.getCurrentMap().get(LogMessage.APIURL))
                .build()));
        if ((!validateCertficateName(sslCertificateRequest.getCertificateName())) || sslCertificateRequest.getAppName().contains(" ") ||
                (!populateCertOwnerEmaild(sslCertificateRequest, userDetails)) ||
                sslCertificateRequest.getCertOwnerEmailId().contains(" ") || sslCertificateRequest.getCertType().contains(" ") ||
                (!sslCertificateRequest.getCertType().matches(SSLCertificateConstants.CERT_TYPE_MATCH_STRING))
                || (!validateDNSNames(sslCertificateRequest)) ||
                (!validateNotificationEmailsForOnboard(sslCertificateRequest.getNotificationEmail())) ||
                (!validatekeyUsageValue(sslCertificateRequest))) {
            isValid = false;
        }
        return isValid;
    }
/**
     * Validate input data
     * @param sslCertificateRequest
     * @return
     */
Validate input data
@param sslCertificateRequest
@return
Validate input data @param sslCertificateRequest @return
private boolean validateInputData(SSLCertificateRequest sslCertificateRequest, UserDetails userDetails) {
        boolean isValid = true;
        log.debug(JSONUtil.getJSON(ImmutableMap.<String, String>builder()
                .put(LogMessage.USER, ThreadLocalContext.getCurrentMap().get(LogMessage.USER))
                .put(LogMessage.ACTION, SSLCertificateConstants.VALIDATE_INPUT_DATA)
                .put(LogMessage.MESSAGE, "Trying to validate input data")
                .put(LogMessage.APIURL, ThreadLocalContext.getCurrentMap().get(LogMessage.APIURL))
                .build()));
        if ((!validateCertficateName(sslCertificateRequest.getCertificateName())) || sslCertificateRequest.getAppName().contains(" ") ||
                (!populateCertOwnerEmaild(sslCertificateRequest, userDetails)) ||
                sslCertificateRequest.getCertOwnerEmailId().contains(" ") || sslCertificateRequest.getCertType().contains(" ") ||
                (!sslCertificateRequest.getCertType().matches(SSLCertificateConstants.CERT_TYPE_MATCH_STRING))
                || (!validateDNSNames(sslCertificateRequest)) ||
                (!validateNotificationEmailsForOnboard(sslCertificateRequest.getNotificationEmail())) ||
                (!validatekeyUsageValue(sslCertificateRequest))) {
            isValid = false;
        }
        return isValid;
    }
private boolean validateInputData ( SSLCertificateRequest sslCertificateRequest , UserDetails userDetails ) { boolean isValid = true ; log . debug ( JSONUtil . getJSON ( ImmutableMap . < String , String > builder ( ) . put ( LogMessage . USER , ThreadLocalContext . getCurrentMap ( ) . get ( LogMessage . USER ) ) . put ( LogMessage . ACTION , SSLCertificateConstants . VALIDATE_INPUT_DATA ) . put ( LogMessage . MESSAGE , "Trying to validate input data" ) . put ( LogMessage . APIURL , ThreadLocalContext . getCurrentMap ( ) . get ( LogMessage . APIURL ) ) . build ( ) ) ) ; if ( ( ! validateCertficateName ( sslCertificateRequest . getCertificateName ( ) ) ) || sslCertificateRequest . getAppName ( ) . contains ( " " ) || ( ! populateCertOwnerEmaild ( sslCertificateRequest , userDetails ) ) || sslCertificateRequest . getCertOwnerEmailId ( ) . contains ( " " ) || sslCertificateRequest . getCertType ( ) . contains ( " " ) || ( ! sslCertificateRequest . getCertType ( ) . matches ( SSLCertificateConstants . CERT_TYPE_MATCH_STRING ) ) || ( ! validateDNSNames ( sslCertificateRequest ) ) || ( ! validateNotificationEmailsForOnboard ( sslCertificateRequest . getNotificationEmail ( ) ) ) || ( ! validatekeyUsageValue ( sslCertificateRequest ) ) ) { isValid = false ; } return isValid ; }
Validate input data
 @param sslCertificateRequest
 @return
Validate input data @param sslCertificateRequest @return