tvaultapi/src/main/java/com/tmobile/cso/vault/api/service/IAMServiceAccountsService.java
private boolean updateMetadata(String token, IAMServiceAccount iamSvcAcc, String iamSvcAccName, String iamSvcAccMetaPath) {

		Response metadataResponse = ControllerUtil.updateMetadataOnIAMSvcUpdate(iamSvcAccMetaPath, iamSvcAcc, token);

		if (HttpStatus.NO_CONTENT.equals(metadataResponse.getHttpstatus()) || HttpStatus.OK.equals(metadataResponse.getHttpstatus())) {
			log.debug(JSONUtil.getJSON(ImmutableMap.<String, String>builder()
					.put(LogMessage.USER, ThreadLocalContext.getCurrentMap().get(LogMessage.USER))
					.put(LogMessage.ACTION, IAMServiceAccountConstants.IAM_SVCACC_CREATION_TITLE)
					.put(LogMessage.MESSAGE, String.format("Successfully updated Metadata [%s] for the IAM Service Account [%s]",
							iamSvcAccMetaPath, iamSvcAccName))
					.put(LogMessage.APIURL, ThreadLocalContext.getCurrentMap().get(LogMessage.APIURL)).build()));
		} else {
			log.error(JSONUtil.getJSON(ImmutableMap.<String, String>builder()
					.put(LogMessage.USER, ThreadLocalContext.getCurrentMap().get(LogMessage.USER))
					.put(LogMessage.ACTION, IAMServiceAccountConstants.IAM_SVCACC_CREATION_TITLE)
					.put(LogMessage.MESSAGE,
							String.format("Updating metadata [%s] for IAM Service Account [%s] failed.",
									iamSvcAccMetaPath, iamSvcAccName))
					.put(LogMessage.APIURL, ThreadLocalContext.getCurrentMap().get(LogMessage.APIURL)).build()));
			return false;
		}
		return true;
	}
/**
	 * Updates the metadata for IAM service account.
	 * It does this by getting the current metadata and updating
	 * the fields based on the passed IAMServiceAccount object.
	 * @param token
	 * @param iamSvcAcc
	 * @param iamSvcAccMetaPath
	 * @return boolean
	 */
Updates the metadata for IAM service account.
It does this by getting the current metadata and updating
the fields based on the passed IAMServiceAccount object.
Updates the metadata for IAM service account . It does this by getting the current metadata and updating the fields based on the passed IAMServiceAccount object .
private boolean updateMetadata(String token, IAMServiceAccount iamSvcAcc, String iamSvcAccName, String iamSvcAccMetaPath) {
		Response metadataResponse = ControllerUtil.updateMetadataOnIAMSvcUpdate(iamSvcAccMetaPath, iamSvcAcc, token);
		if (HttpStatus.NO_CONTENT.equals(metadataResponse.getHttpstatus()) || HttpStatus.OK.equals(metadataResponse.getHttpstatus())) {
			log.debug(JSONUtil.getJSON(ImmutableMap.<String, String>builder()
					.put(LogMessage.USER, ThreadLocalContext.getCurrentMap().get(LogMessage.USER))
					.put(LogMessage.ACTION, IAMServiceAccountConstants.IAM_SVCACC_CREATION_TITLE)
					.put(LogMessage.MESSAGE, String.format("Successfully updated Metadata [%s] for the IAM Service Account [%s]",
							iamSvcAccMetaPath, iamSvcAccName))
					.put(LogMessage.APIURL, ThreadLocalContext.getCurrentMap().get(LogMessage.APIURL)).build()));
		} else {
			log.error(JSONUtil.getJSON(ImmutableMap.<String, String>builder()
					.put(LogMessage.USER, ThreadLocalContext.getCurrentMap().get(LogMessage.USER))
					.put(LogMessage.ACTION, IAMServiceAccountConstants.IAM_SVCACC_CREATION_TITLE)
					.put(LogMessage.MESSAGE,
							String.format("Updating metadata [%s] for IAM Service Account [%s] failed.",
									iamSvcAccMetaPath, iamSvcAccName))
					.put(LogMessage.APIURL, ThreadLocalContext.getCurrentMap().get(LogMessage.APIURL)).build()));
			return false;
		}
		return true;
	}
private boolean updateMetadata ( String token , IAMServiceAccount iamSvcAcc , String iamSvcAccName , String iamSvcAccMetaPath ) { Response metadataResponse = ControllerUtil . updateMetadataOnIAMSvcUpdate ( iamSvcAccMetaPath , iamSvcAcc , token ) ; if ( HttpStatus . NO_CONTENT . equals ( metadataResponse . getHttpstatus ( ) ) || HttpStatus . OK . equals ( metadataResponse . getHttpstatus ( ) ) ) { log . debug ( JSONUtil . getJSON ( ImmutableMap . < String , String > builder ( ) . put ( LogMessage . USER , ThreadLocalContext . getCurrentMap ( ) . get ( LogMessage . USER ) ) . put ( LogMessage . ACTION , IAMServiceAccountConstants . IAM_SVCACC_CREATION_TITLE ) . put ( LogMessage . MESSAGE , String . format ( "Successfully updated Metadata [%s] for the IAM Service Account [%s]" , iamSvcAccMetaPath , iamSvcAccName ) ) . put ( LogMessage . APIURL , ThreadLocalContext . getCurrentMap ( ) . get ( LogMessage . APIURL ) ) . build ( ) ) ) ; } else { log . error ( JSONUtil . getJSON ( ImmutableMap . < String , String > builder ( ) . put ( LogMessage . USER , ThreadLocalContext . getCurrentMap ( ) . get ( LogMessage . USER ) ) . put ( LogMessage . ACTION , IAMServiceAccountConstants . IAM_SVCACC_CREATION_TITLE ) . put ( LogMessage . MESSAGE , String . format ( "Updating metadata [%s] for IAM Service Account [%s] failed." , iamSvcAccMetaPath , iamSvcAccName ) ) . put ( LogMessage . APIURL , ThreadLocalContext . getCurrentMap ( ) . get ( LogMessage . APIURL ) ) . build ( ) ) ) ; return false ; } return true ; }
Updates the metadata for IAM service account.
Updates the metadata for IAM service account .