*/
package jalview.ws.sifts;
-import jalview.bin.ApplicationSingletonProvider;
-import jalview.bin.ApplicationSingletonProvider.ApplicationSingletonI;
-
import java.util.Objects;
-public class SiftsSettings implements ApplicationSingletonI
+public class SiftsSettings
{
+ private static boolean mapWithSifts = false;
- /**
- * public only for testng
- *
- * @return
- */
- public static SiftsSettings getInstance()
- {
- return (SiftsSettings) ApplicationSingletonProvider
- .getInstance(SiftsSettings.class);
- }
-
- private SiftsSettings()
- {
- // singleton; use getInstance()
- }
-
- private boolean mapWithSifts = false;
-
- private String siftDownloadDirectory;
+ private static String siftDownloadDirectory;
- private int cacheThresholdInDays;
+ private static int cacheThresholdInDays;
- private int failSafePIDThreshold;
+ private static int failSafePIDThreshold;
public static boolean isMapWithSifts()
{
- return getInstance().mapWithSifts;
+ return mapWithSifts;
}
public static void setMapWithSifts(boolean mapWithSifts)
{
- getInstance().mapWithSifts = mapWithSifts;
+ SiftsSettings.mapWithSifts = mapWithSifts;
}
public static String getSiftDownloadDirectory()
{
- return getInstance().siftDownloadDirectory;
+ return siftDownloadDirectory;
}
public static void setSiftDownloadDirectory(String siftDownloadDirectory)
{
- getInstance().siftDownloadDirectory = siftDownloadDirectory;
+ SiftsSettings.siftDownloadDirectory = siftDownloadDirectory;
}
public static int getCacheThresholdInDays()
{
- return getInstance().cacheThresholdInDays;
+ return cacheThresholdInDays;
}
public static void setCacheThresholdInDays(String cacheThresholdInDays)
{
Objects.requireNonNull(cacheThresholdInDays);
- getInstance().cacheThresholdInDays = Integer
+ SiftsSettings.cacheThresholdInDays = Integer
.valueOf(cacheThresholdInDays);
}
public static int getFailSafePIDThreshold()
{
- return getInstance().failSafePIDThreshold;
+ return failSafePIDThreshold;
}
public static void setFailSafePIDThreshold(String failSafePIDThreshold)
{
Objects.requireNonNull(failSafePIDThreshold);
- getInstance().failSafePIDThreshold = Integer
+ SiftsSettings.failSafePIDThreshold = Integer
.valueOf(failSafePIDThreshold);
}
}