Interface MessageTemplateDAO

    • Method Detail

      • findByLanguage

        List<MessageTemplate> findByLanguage​(String language,
                                             long tenantId)
        Finds the templates by given language
        Parameters:
        language - the language
        tenantId - identifier of the tenant
        Returns:
        collection of templates
      • findByName

        List<MessageTemplate> findByName​(String name,
                                         long tenantId)
        Finds the templates by given name, you may have the same name but for different languages.
        Parameters:
        name - name of the template
        tenantId - identifier of the tenant
        Returns:
        collection of templates
      • findByNameAndLanguage

        MessageTemplate findByNameAndLanguage​(String name,
                                              String language,
                                              long tenantId)
        Finds the template by the alternate key. If the template is not found for the specified language, the 'en' will be used instead.
        Parameters:
        name - name of the template
        language - the language, if null 'en' will be used instead
        tenantId - the tenant
        Returns:
        The found template or the 'en' if none was found
      • findByTypeAndLanguage

        List<MessageTemplate> findByTypeAndLanguage​(String type,
                                                    String language,
                                                    long tenantId)
        Finds the templates by the type.
        Parameters:
        type - type of the template
        language - the language
        tenantId - the tenant
        Returns:
        the found templates