Setting properties for ModelConfig in addition to DaoConfig
Setting properties for handling Email via the emailSender() bean
This commit is contained in:
@@ -36,6 +36,9 @@ public class HapiProperties {
|
||||
static final String SUBSCRIPTION_EMAIL_ENABLED = "subscription.email.enabled";
|
||||
static final String SUBSCRIPTION_RESTHOOK_ENABLED = "subscription.resthook.enabled";
|
||||
static final String TEST_PORT = "test.port";
|
||||
static final String ALLOW_CONTAINS_SEARCHES = "allow_contains_searches";
|
||||
static final String ALLOW_OVERRIDE_DEFAULT_SEARCH_PARAMS = "allow_override_default_search_params";
|
||||
static final String EMAIL_FROM = "email.from";
|
||||
|
||||
private static Properties properties;
|
||||
|
||||
@@ -235,4 +238,36 @@ public class HapiProperties {
|
||||
public static Boolean getSubscriptionRestHookEnabled() {
|
||||
return HapiProperties.getBooleanProperty(SUBSCRIPTION_RESTHOOK_ENABLED, true);
|
||||
}
|
||||
|
||||
public static Boolean getAllowContainsSearches() {
|
||||
return HapiProperties.getBooleanProperty(ALLOW_CONTAINS_SEARCHES, true);
|
||||
}
|
||||
|
||||
public static Boolean getAllowOverrideDefaultSearchParams() {
|
||||
return HapiProperties.getBooleanProperty(ALLOW_OVERRIDE_DEFAULT_SEARCH_PARAMS, true);
|
||||
}
|
||||
|
||||
public static String getEmailFrom() {
|
||||
return HapiProperties.getProperty(EMAIL_FROM, "some@test.com");
|
||||
}
|
||||
|
||||
public static Boolean getEmailEnabled() {
|
||||
return HapiProperties.getBooleanProperty("email.enabled", false);
|
||||
}
|
||||
|
||||
public static String getEmailHost() {
|
||||
return HapiProperties.getProperty("email.host");
|
||||
}
|
||||
|
||||
public static Integer getEmailPort() {
|
||||
return HapiProperties.getIntegerProperty("email.port", 0);
|
||||
}
|
||||
|
||||
public static String getEmailUsername() {
|
||||
return HapiProperties.getProperty("email.username");
|
||||
}
|
||||
|
||||
public static String getEmailPassword() {
|
||||
return HapiProperties.getProperty("email.password");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user