e1e3de80a281ff1f7ec7a1689daa07dd4b8c5348
[jalview.git] / src / jalview / ws / sifts / SiftsSettings.java
1 package jalview.ws.sifts;
2
3 import java.util.Objects;
4
5 public class SiftsSettings
6 {
7   private static boolean mapWithSifts = false;
8
9   private static String siftDownloadDirectory;
10
11   private static int cacheThresholdInDays;
12
13   private static int failSafePIDThreshold;
14
15   public static boolean isMapWithSifts()
16   {
17     return mapWithSifts;
18   }
19
20   public static void setMapWithSifts(boolean mapWithSifts)
21   {
22     SiftsSettings.mapWithSifts = mapWithSifts;
23   }
24
25   public static String getSiftDownloadDirectory()
26   {
27     return siftDownloadDirectory;
28   }
29
30   public static void setSiftDownloadDirectory(String siftDownloadDirectory)
31   {
32     SiftsSettings.siftDownloadDirectory = siftDownloadDirectory;
33   }
34
35   public static int getCacheThresholdInDays()
36   {
37     return cacheThresholdInDays;
38   }
39
40   public static void setCacheThresholdInDays(String cacheThresholdInDays)
41   {
42     Objects.requireNonNull(cacheThresholdInDays);
43     SiftsSettings.cacheThresholdInDays = Integer
44             .valueOf(cacheThresholdInDays);
45   }
46
47   public static int getFailSafePIDThreshold()
48   {
49     return failSafePIDThreshold;
50   }
51
52   public static void setFailSafePIDThreshold(String failSafePIDThreshold)
53   {
54     Objects.requireNonNull(failSafePIDThreshold);
55     SiftsSettings.failSafePIDThreshold = Integer
56             .valueOf(failSafePIDThreshold);
57   }
58 }