All Downloads are FREE. Search and download functionalities are using the official Maven repository.

tech.jhipster.lite.module.domain.file.TemplateRenderer Maven / Gradle / Ivy

There is a newer version: 1.22.0
Show newest version
package tech.jhipster.lite.module.domain.file;

import java.util.Map;
import tech.jhipster.lite.module.domain.JHipsterModuleContext;
import tech.jhipster.lite.shared.error.domain.Assert;

public interface TemplateRenderer {
  TemplateRenderer NOOP = (templateContent, context) -> templateContent;

  String render(String templateContent, Map context);

  default String render(String templateContent, JHipsterModuleContext context) {
    Assert.notNull("context", context);

    return render(templateContent, context.get());
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy