1 package org.openkilda.utility;
3 import org.slf4j.Logger;
4 import org.slf4j.LoggerFactory;
6 import org.springframework.stereotype.Component;
8 import java.util.Properties;
16 private static final Logger LOGGER = LoggerFactory.getLogger(
MessageUtil.class);
18 public static final String
CODE =
".code";
19 public static final String
MESSAGE =
".message";
20 public static final String
AUXILARY =
".auxilary";
22 private static Properties messages;
34 Properties localProperties =
new Properties();
36 localProperties.load(
MessageUtil.class.getClassLoader().getResourceAsStream(
38 }
catch (Exception e) {
39 LOGGER.error(
"[loadPropertiesFile] Exception : ", e);
41 return localProperties;
50 public static String
getCode(
final String msg) {
51 return messages.getProperty(msg +
CODE);
61 return messages.getProperty(msg +
MESSAGE);
71 return messages.getProperty(msg +
AUXILARY);
81 return messages.getProperty(msg);
static String getAuxilaryMessage(final String msg)
static final String AUXILARY
static final String MESSAGE
static String getMessage(final String msg)
static Properties loadPropertiesFile(final String fileName)
static String getCode(final String msg)
static String getPropertyValue(final String msg)