use of org.estatio.module.settings.dom.ApplicationSettingForEstatio in project estatio by estatio.
the class LeaseInvoicingSettingsService method updateEpochDate.
/**
* @see LeaseInvoicingSettingKey#epochDate
*/
@Programmatic
public void updateEpochDate(final LocalDate newEpochDate) {
// getApplicationSettings().installDefaultsIfRequired();
final ApplicationSettingForEstatio setting = (ApplicationSettingForEstatio) applicationSettingsService.find(LeaseInvoicingSettingKey.epochDate);
if (setting != null) {
if (newEpochDate != null) {
setting.updateAsLocalDate(newEpochDate);
} else {
setting.delete();
}
} else {
if (newEpochDate != null) {
applicationSettingsService.newLocalDate(ApplicationSettingCreator.Helper.getKey(LeaseInvoicingSettingKey.epochDate), "Cutover date to Estatio", newEpochDate);
}
// else no-op
}
cachedEpochDate = null;
}
use of org.estatio.module.settings.dom.ApplicationSettingForEstatio in project estatio by estatio.
the class ReplayCommandExecutionControllerUsingSettings method getApplicationSetting.
private ApplicationSettingForEstatio getApplicationSetting() {
ApplicationSetting setting = applicationSettingsService.find(KEY);
if (setting == null) {
final State initialState = State.PAUSED;
setting = applicationSettingsService.newString(KEY, "Controls whether ReplayCommandExecution quartz job runs or pauses", initialState.name());
}
return (ApplicationSettingForEstatio) setting;
}
Aggregations