import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
import org.onap.portalsdk.core.onboarding.exception.CipherUtilException;
import org.onap.portalsdk.core.onboarding.util.CipherUtil;
+import org.onap.portalsdk.core.onboarding.util.KeyConstants;
+import org.onap.portalsdk.core.onboarding.util.KeyProperties;
import org.onap.portalsdk.core.util.SystemProperties;
import org.slf4j.MDC;
import org.springframework.beans.factory.annotation.Autowired;
if(!encriptedPwd.isEmpty() || encriptedPwd != null || StringUtils.isEmpty(encriptedPwd)){
try {
decreptedAppPwd = CipherUtil.decryptPKC(encriptedPwd,
- SystemProperties.getProperty(SystemProperties.Decryption_Key));
+ KeyProperties.getProperty(KeyConstants.CIPHER_ENCRYPTION_KEY));
} catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "createClientFor failed to decrypt", e);
+ logger.error(EELFLoggerDelegate.errorLogger, "createClientFor failed to decrypt", e.getMessage());
}
}
WebClient client = createClientForPath(appBaseUri, restPath);
String decreptedexternalAppPwd = StringUtils.EMPTY;
try {
decreptedexternalAppPwd = CipherUtil.decryptPKC(password,
- SystemProperties.getProperty(SystemProperties.Decryption_Key));
+ KeyProperties.getProperty(KeyConstants.CIPHER_ENCRYPTION_KEY));
} catch (CipherUtilException e) {
logger.error(EELFLoggerDelegate.errorLogger, "failed to decreptedexternalAppPwd when external app pwd is null", e);
}
MDC.put(EPCommonSystemProperties.EXTERNAL_API_RESPONSE_CODE,
Integer.toString(HttpServletResponse.SC_INTERNAL_SERVER_ERROR));
EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeRestApiGeneralError, e);
- logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while making the GET REST API call", e);
+ logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while making the GET REST API call", e.getMessage());
}
return response;
}
MDC.put(EPCommonSystemProperties.EXTERNAL_API_RESPONSE_CODE,
Integer.toString(HttpServletResponse.SC_INTERNAL_SERVER_ERROR));
EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeRestApiGeneralError, e);
- logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while making the POST REST API call", e);
+ logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while making the POST REST API call", e.getMessage());
}
if (response != null) {
MDC.put(EPCommonSystemProperties.EXTERNAL_API_RESPONSE_CODE,
Integer.toString(HttpServletResponse.SC_INTERNAL_SERVER_ERROR));
EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeRestApiGeneralError, e);
- logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while making the PUT REST API call", e);
+ logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while making the PUT REST API call", e.getMessage());
}
if (response != null) {