protected String parseVariables(final String value, final Map<String, Object> context) {
    if (StringUtils.isNullOrEmpty(value) || context == null || context.isEmpty()) {
      return value;
    }

    String parsedValue = value;

    for (Entry<String, Object> entry : context.entrySet()) {
      parsedValue =
          parsedValue.replace(String.format("${%s}", entry.getKey()), entry.getValue().toString());
    }

    return parsedValue;
  }
  protected String checkLinkPath(String link) {
    if (StringUtils.isNullOrEmpty(link) || link.startsWith("http") || link.startsWith("https")) {
      return link;
    }

    ServletContext servletContext =
        ComponentProvider.getInstance().getComponent(ServletContext.class);

    if (!link.startsWith("/")) {
      link = String.format("/%s", link);
    }

    String url = String.format("%s%s", servletContext.getContextPath(), link);
    return url;
  }