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

org.openmetadata.service.util.TemplateProvider Maven / Gradle / Ivy

There is a newer version: 1.5.11
Show newest version
package org.openmetadata.service.util;

import freemarker.template.Template;
import java.io.IOException;
import java.util.Map;
import java.util.Set;
import org.openmetadata.schema.email.EmailTemplatePlaceholder;
import org.openmetadata.schema.email.TemplateValidationResponse;

public interface TemplateProvider {

  Template getTemplate(String templateName) throws IOException;

  /**
   * Validates an email template document by checking for the presence of required placeholders.
   * @return A map containing validation results:
   *         - "valid" (boolean): Indicates whether the template is valid.
   *         - "missingParameters" (List): If validation fails, lists the placeholders that are missing.
   */
  TemplateValidationResponse validateEmailTemplate(String docName, String actualContent);

  /**
   * Maps each template's name to a list of
   * {@link EmailTemplatePlaceholder}s extracted from the template data.
   */
  Map> getDocumentPlaceHolders();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy