Package ch.tocco.nice2.userbase.api
Interface EmailTemplateLoadService
- All Known Implementing Classes:
EmailTemplateLoadServiceImpl
public interface EmailTemplateLoadService
Loads email templates from Email_template entity.
-
Method Summary
Modifier and TypeMethodDescriptiongetTemplate
(String uniqueId) Load email template with givenuniqueId
from the user's currentBusinessUnit
.Loads a email template.Load email template with givenuniqueId
from the user's currentBusinessUnit
.Deprecated.Deprecated.UsegetTemplate
orload
without a business
-
Method Details
-
load
Deprecated.UsegetTemplate
orload
without a businessLoads a email template for the specified business unit. Note: you probably need to load it in privileged mode to have read permission in another business unit.- Parameters:
uniqueId
- unique id of templatebusinessUnitUniqueId
- unique id of business unit- Returns:
- the email template
-
load
Deprecated.UsegetTemplate
orload
without a business- Parameters:
uniqueId
- unique id of templatebusinessUnitEntity
- business unit entity- Returns:
- the email template
- See Also:
-
load
Loads a email template.- Parameters:
emailTemplateEntity
- template entity- Returns:
- the email template
-
getTemplate
Load email template with givenuniqueId
from the user's currentBusinessUnit
. ==== In case the current **user is in a business unit**, the template returned is selected as follows: 1. If in the currentBusinessUnit
a template with the correctuniqueId
exists, it is returned. 2. Otherwise, If a template with theuniqueId
and noBusinessUnit
association exists, it is returned. 3. Otherwise,Optional.empty()
is returned. In case the **user is not in a business unit** (e.g. he is in the {BusinessUnit.NULL_BUSINESS_UNIT}): 1. If a template with theuniqueId
and noBusinessUnit
exists, it is returned. 2. Otherwise,Optional.empty()
is returned. Use #load if you prefer an exception is thrown if the email template is missing.- Parameters:
uniqueId
- Unique id of the template- Returns:
- The
EmailTemplate
-
load
Load email template with givenuniqueId
from the user's currentBusinessUnit
. ==== In case the current **user is in a business unit**, the template returned is selected as follows: 1. If in the currentBusinessUnit
a template with the correctuniqueId
exists, it is returned. 2. Otherwise, If a template with theuniqueId
and noBusinessUnit
association exists, it is returned. 3. Otherwise, aRuntimeException
is is thrown. In case the **user is not in a business unit** (e.g. he is in the {BusinessUnit.NULL_BUSINESS_UNIT}): 1. If a template with theuniqueId
and noBusinessUnit
exists, it is returned. 2. Otherwise, aRuntimeException
is is thrown. Use #load if you prefer Optional.empty() is returned if the email template is missing.- Parameters:
uniqueId
- Unique id of the template- Returns:
- The
EmailTemplate
-
getTemplate
orload
without a business