tvaultapi/src/main/java/com/tmobile/cso/vault/api/service/SSLCertificateService.java
private void populateMetadataDetailsByAppNameDetails(SSLCertificateOnboardRequest sslCertificateRequest,
			SSLCertificateMetadataDetails sslCertificateMetadataDetails) {
		// Get Application details
		String applicationName = sslCertificateRequest.getAppName();
		if (StringUtils.isEmpty(applicationName)) {
			log.debug(JSONUtil.getJSON(ImmutableMap.<String, String>builder()
					.put(LogMessage.USER, ThreadLocalContext.getCurrentMap().get(LogMessage.USER))
					.put(LogMessage.ACTION, "populateSSLCertificateMetadataForOnboard ")
					.put(LogMessage.MESSAGE,
							String.format("ERROR -[%s]- Application Name is not available in the certificate details. ",
									sslCertificateRequest.getCertificateName()))
					.put(LogMessage.APIURL, ThreadLocalContext.getCurrentMap().get(LogMessage.APIURL)).build()));
		} else {
			ResponseEntity<String> appResponse = workloadDetailsService.getWorkloadDetailsByAppName(applicationName);
			if (HttpStatus.OK.equals(appResponse.getStatusCode())) {
				JsonParser jsonParser = new JsonParser();
				JsonObject response = (JsonObject) jsonParser.parse(appResponse.getBody());
				processWorkloadDetailsAndConstructMetadata(sslCertificateRequest, sslCertificateMetadataDetails,
						applicationName, response);
			} else {
				log.debug(JSONUtil.getJSON(ImmutableMap.<String, String>builder()
						.put(LogMessage.USER, ThreadLocalContext.getCurrentMap().get(LogMessage.USER))
						.put(LogMessage.ACTION, "Getting Application Details by app name during Meta data creation ")
						.put(LogMessage.MESSAGE,
								String.format("Application details will not insert/update in metadata  "
										+ "for an application =  [%s] ", applicationName))
						.put(LogMessage.APIURL, ThreadLocalContext.getCurrentMap().get(LogMessage.APIURL)).build()));
			}
		}
	}
/**
	 * Method to populate the sslCertificateMetadataDetails based on the App name details from workload api
	 * @param sslCertificateRequest
	 * @param sslCertificateMetadataDetails
	 */
Method to populate the sslCertificateMetadataDetails based on the App name details from workload api
@param sslCertificateRequest
@param sslCertificateMetadataDetails
Method to populate the sslCertificateMetadataDetails based on the App name details from workload api @param sslCertificateRequest @param sslCertificateMetadataDetails
private void populateMetadataDetailsByAppNameDetails(SSLCertificateOnboardRequest sslCertificateRequest,
			SSLCertificateMetadataDetails sslCertificateMetadataDetails) {
		String applicationName = sslCertificateRequest.getAppName();
		if (StringUtils.isEmpty(applicationName)) {
			log.debug(JSONUtil.getJSON(ImmutableMap.<String, String>builder()
					.put(LogMessage.USER, ThreadLocalContext.getCurrentMap().get(LogMessage.USER))
					.put(LogMessage.ACTION, "populateSSLCertificateMetadataForOnboard ")
					.put(LogMessage.MESSAGE,
							String.format("ERROR -[%s]- Application Name is not available in the certificate details. ",
									sslCertificateRequest.getCertificateName()))
					.put(LogMessage.APIURL, ThreadLocalContext.getCurrentMap().get(LogMessage.APIURL)).build()));
		} else {
			ResponseEntity<String> appResponse = workloadDetailsService.getWorkloadDetailsByAppName(applicationName);
			if (HttpStatus.OK.equals(appResponse.getStatusCode())) {
				JsonParser jsonParser = new JsonParser();
				JsonObject response = (JsonObject) jsonParser.parse(appResponse.getBody());
				processWorkloadDetailsAndConstructMetadata(sslCertificateRequest, sslCertificateMetadataDetails,
						applicationName, response);
			} else {
				log.debug(JSONUtil.getJSON(ImmutableMap.<String, String>builder()
						.put(LogMessage.USER, ThreadLocalContext.getCurrentMap().get(LogMessage.USER))
						.put(LogMessage.ACTION, "Getting Application Details by app name during Meta data creation ")
						.put(LogMessage.MESSAGE,
								String.format("Application details will not insert/update in metadata  "
										+ "for an application =  [%s] ", applicationName))
						.put(LogMessage.APIURL, ThreadLocalContext.getCurrentMap().get(LogMessage.APIURL)).build()));
			}
		}
	}
private void populateMetadataDetailsByAppNameDetails ( SSLCertificateOnboardRequest sslCertificateRequest , SSLCertificateMetadataDetails sslCertificateMetadataDetails ) { String applicationName = sslCertificateRequest . getAppName ( ) ; if ( StringUtils . isEmpty ( applicationName ) ) { log . debug ( JSONUtil . getJSON ( ImmutableMap . < String , String > builder ( ) . put ( LogMessage . USER , ThreadLocalContext . getCurrentMap ( ) . get ( LogMessage . USER ) ) . put ( LogMessage . ACTION , "populateSSLCertificateMetadataForOnboard " ) . put ( LogMessage . MESSAGE , String . format ( "ERROR -[%s]- Application Name is not available in the certificate details. " , sslCertificateRequest . getCertificateName ( ) ) ) . put ( LogMessage . APIURL , ThreadLocalContext . getCurrentMap ( ) . get ( LogMessage . APIURL ) ) . build ( ) ) ) ; } else { ResponseEntity < String > appResponse = workloadDetailsService . getWorkloadDetailsByAppName ( applicationName ) ; if ( HttpStatus . OK . equals ( appResponse . getStatusCode ( ) ) ) { JsonParser jsonParser = new JsonParser ( ) ; JsonObject response = ( JsonObject ) jsonParser . parse ( appResponse . getBody ( ) ) ; processWorkloadDetailsAndConstructMetadata ( sslCertificateRequest , sslCertificateMetadataDetails , applicationName , response ) ; } else { log . debug ( JSONUtil . getJSON ( ImmutableMap . < String , String > builder ( ) . put ( LogMessage . USER , ThreadLocalContext . getCurrentMap ( ) . get ( LogMessage . USER ) ) . put ( LogMessage . ACTION , "Getting Application Details by app name during Meta data creation " ) . put ( LogMessage . MESSAGE , String . format ( "Application details will not insert/update in metadata  " + "for an application =  [%s] " , applicationName ) ) . put ( LogMessage . APIURL , ThreadLocalContext . getCurrentMap ( ) . get ( LogMessage . APIURL ) ) . build ( ) ) ) ; } } }
Method to populate the sslCertificateMetadataDetails based on the App name details from workload api
 @param sslCertificateRequest
 @param sslCertificateMetadataDetails
Method to populate the sslCertificateMetadataDetails based on the App name details from workload api @param sslCertificateRequest @param sslCertificateMetadataDetails
// Get Application details