19 package org.sleuthkit.autopsy.ingest;
21 import com.google.common.annotations.Beta;
22 import java.time.DayOfWeek;
23 import java.util.prefs.Preferences;
24 import org.openide.util.NbPreferences;
59 return preferences.getBoolean(PAUSE_ENABLED_KEY, DEFAULT_ENABLED_VALUE);
70 preferences.putBoolean(PAUSE_ENABLED_KEY, enabled);
82 int dayOfWeek = preferences.getInt(PAUSE_DAY_OF_WEEK_KEY, DayOfWeek.SUNDAY.getValue());
83 return DayOfWeek.of(dayOfWeek);
95 preferences.putInt(PAUSE_DAY_OF_WEEK_KEY, dayOfWeek.getValue());
108 return preferences.getInt(PAUSE_TIME_HOUR_KEY, DEFAULT_TIME_VALUE);
121 if (hour < 0 || hour > 23) {
122 throw new IllegalArgumentException(
"hour must be 0-23");
124 preferences.putInt(PAUSE_TIME_HOUR_KEY, hour);
137 return preferences.getInt(PAUSE_TIME_MINUTES_KEY, DEFAULT_TIME_VALUE);
150 if (timeInMinutes < 0 || timeInMinutes > 59) {
151 throw new IllegalArgumentException(
"timeInMinutes must be 0-59");
153 preferences.putInt(PAUSE_TIME_MINUTES_KEY, timeInMinutes);
165 return preferences.getInt(PAUSE_DURATION_MINUTES_KEY, DEFAULT_PAUSE_DURATION_VALUE);
177 preferences.putInt(PAUSE_DURATION_MINUTES_KEY, durationInMinutes);
static int getPauseStartTimeMinute()
static final String PAUSE_DURATION_MINUTES_KEY
static int getPauseStartTimeHour()
static final String PAUSE_TIME_MINUTES_KEY
static final String PAUSE_ENABLED_KEY
static boolean getPauseEnabled()
static final Preferences preferences
static void setPauseStartTimeMinute(int timeInMinutes)
static final int DEFAULT_TIME_VALUE
static void setPauseDurationMinutes(int durationInMinutes)
ScheduledIngestPauseSettings()
static void setPauseStartTimeHour(int hour)
static final String PAUSE_TIME_HOUR_KEY
static void setPauseEnabled(boolean enabled)
static int getPauseDurationMinutes()
static final String PAUSE_DAY_OF_WEEK_KEY
static final int DEFAULT_PAUSE_DURATION_VALUE
static void setPauseDayOfWeek(DayOfWeek dayOfWeek)
static final boolean DEFAULT_ENABLED_VALUE
static DayOfWeek getPauseDayOfWeek()