Interface EmailTemplateFactory<Type extends Email>

  • Type Parameters:
    Type - Type of email

    public interface EmailTemplateFactory<Type extends Email>
    An interface to reference a an OSGI Service for creating EmailTemplates.
    This allow to share an instance wide configuration, like a From address or charSet
    Since:
    5.4
    • Method Detail

      • create

        EmailTemplate<? extends Type> create​(Resource resource)
                                      throws RepositoryException
        Parameters:
        resource - containing the data to be set on the email-template
        Returns:
        template or null if the Resource didn't allow to build one
        Throws:
        RepositoryException - in case of error accessing the underlying Repository