tvaultapi/src/main/java/com/tmobile/cso/vault/api/service/SSLCertificateService.java
private void constructCertificateData(JsonObject jsonElement, CertificateData certificateData) {
		certificateData.setCertificateId(Integer.parseInt(jsonElement.get(SSLCertificateConstants.CERTIFICATE_ID).getAsString()));
		certificateData.setExpiryDate(validateString(jsonElement.get("NotAfter")));
		certificateData.setCreateDate(validateString(jsonElement.get("NotBefore")));
		certificateData.setContainerName(validateString(jsonElement.get(SSLCertificateConstants.CONTAINER_NAME)));
		certificateData
				.setCertificateStatus(validateString(jsonElement.get(SSLCertificateConstants.CERTIFICATE_STATUS)));
		certificateData.setCertificateName(getCertficateName(jsonElement.get("sortedSubjectName").getAsString()));
		certificateData.setAuthority((!StringUtils.isEmpty(jsonElement.get("enrollServiceInfo"))
				? validateString(jsonElement.get("enrollServiceInfo").getAsJsonObject().get("name"))
				: null));
		certificateData.setPreviousCertId((!ObjectUtils.isEmpty(jsonElement.get("previous"))
				? Integer.parseInt(jsonElement.get("previous").getAsString())
				: null));
		if (Objects.nonNull(jsonElement.getAsJsonObject("subjectAltName"))) {
			JsonObject subjectAltNameObject = jsonElement.getAsJsonObject("subjectAltName");
			JsonArray jsonArr = subjectAltNameObject.getAsJsonArray("dns");
			if (!ObjectUtils.isEmpty(jsonArr)) {
				List<String> list = new ArrayList<>();
				for (int index = 0; index < jsonArr.size(); index++) {
					list.add(jsonArr.get(index).getAsString());
				}
				certificateData.setDnsNames(list);
			}
		}
		setCertificateTypeBasedOnContainerId(jsonElement, certificateData);
	}
/**
	 * Method to populate CertificateData object
	 *
	 * @param jsonElement
	 * @param certificateData
	 */
Method to populate CertificateData object
@param jsonElement
@param certificateData
Method to populate CertificateData object @param jsonElement @param certificateData
private void constructCertificateData(JsonObject jsonElement, CertificateData certificateData) {
		certificateData.setCertificateId(Integer.parseInt(jsonElement.get(SSLCertificateConstants.CERTIFICATE_ID).getAsString()));
		certificateData.setExpiryDate(validateString(jsonElement.get("NotAfter")));
		certificateData.setCreateDate(validateString(jsonElement.get("NotBefore")));
		certificateData.setContainerName(validateString(jsonElement.get(SSLCertificateConstants.CONTAINER_NAME)));
		certificateData
				.setCertificateStatus(validateString(jsonElement.get(SSLCertificateConstants.CERTIFICATE_STATUS)));
		certificateData.setCertificateName(getCertficateName(jsonElement.get("sortedSubjectName").getAsString()));
		certificateData.setAuthority((!StringUtils.isEmpty(jsonElement.get("enrollServiceInfo"))
				? validateString(jsonElement.get("enrollServiceInfo").getAsJsonObject().get("name"))
				: null));
		certificateData.setPreviousCertId((!ObjectUtils.isEmpty(jsonElement.get("previous"))
				? Integer.parseInt(jsonElement.get("previous").getAsString())
				: null));
		if (Objects.nonNull(jsonElement.getAsJsonObject("subjectAltName"))) {
			JsonObject subjectAltNameObject = jsonElement.getAsJsonObject("subjectAltName");
			JsonArray jsonArr = subjectAltNameObject.getAsJsonArray("dns");
			if (!ObjectUtils.isEmpty(jsonArr)) {
				List<String> list = new ArrayList<>();
				for (int index = 0; index < jsonArr.size(); index++) {
					list.add(jsonArr.get(index).getAsString());
				}
				certificateData.setDnsNames(list);
			}
		}
		setCertificateTypeBasedOnContainerId(jsonElement, certificateData);
	}
private void constructCertificateData ( JsonObject jsonElement , CertificateData certificateData ) { certificateData . setCertificateId ( Integer . parseInt ( jsonElement . get ( SSLCertificateConstants . CERTIFICATE_ID ) . getAsString ( ) ) ) ; certificateData . setExpiryDate ( validateString ( jsonElement . get ( "NotAfter" ) ) ) ; certificateData . setCreateDate ( validateString ( jsonElement . get ( "NotBefore" ) ) ) ; certificateData . setContainerName ( validateString ( jsonElement . get ( SSLCertificateConstants . CONTAINER_NAME ) ) ) ; certificateData . setCertificateStatus ( validateString ( jsonElement . get ( SSLCertificateConstants . CERTIFICATE_STATUS ) ) ) ; certificateData . setCertificateName ( getCertficateName ( jsonElement . get ( "sortedSubjectName" ) . getAsString ( ) ) ) ; certificateData . setAuthority ( ( ! StringUtils . isEmpty ( jsonElement . get ( "enrollServiceInfo" ) ) ? validateString ( jsonElement . get ( "enrollServiceInfo" ) . getAsJsonObject ( ) . get ( "name" ) ) : null ) ) ; certificateData . setPreviousCertId ( ( ! ObjectUtils . isEmpty ( jsonElement . get ( "previous" ) ) ? Integer . parseInt ( jsonElement . get ( "previous" ) . getAsString ( ) ) : null ) ) ; if ( Objects . nonNull ( jsonElement . getAsJsonObject ( "subjectAltName" ) ) ) { JsonObject subjectAltNameObject = jsonElement . getAsJsonObject ( "subjectAltName" ) ; JsonArray jsonArr = subjectAltNameObject . getAsJsonArray ( "dns" ) ; if ( ! ObjectUtils . isEmpty ( jsonArr ) ) { List < String > list = new ArrayList < > ( ) ; for ( int index = 0 ; index < jsonArr . size ( ) ; index ++ ) { list . add ( jsonArr . get ( index ) . getAsString ( ) ) ; } certificateData . setDnsNames ( list ) ; } } setCertificateTypeBasedOnContainerId ( jsonElement , certificateData ) ; }
Method to populate CertificateData object
 @param jsonElement
 @param certificateData
Method to populate CertificateData object @param jsonElement @param certificateData