/** * @return The character encoding to be used when connecting to this server or null * if the default encoding should be used */ public String getEncoding() { if(null == encoding) { return PreferencesFactory.get().getProperty("browser.charset.encoding"); } return encoding; }
/** * New thread pool with first-in-first-out ordered fair wait queue and unlimited number of threads. * * @param prefix Thread name prefix */ public DefaultThreadPool(final String prefix) { this(prefix, PreferencesFactory.get().getInteger("threading.pool.size.max")); }
public QloudsonicVoucherFinder() { super(SupportDirectoryFinderFactory.get().find(), new Filter<Local>() { @Override public boolean accept(final Local file) { return "qloudsonicvoucher".equals(FilenameUtils.getExtension(file.getName())); } @Override public Pattern toPattern() { return Pattern.compile("qloudsonicvoucher"); } }); }
public DownloadFilterOptions() { final Preferences preferences = PreferencesFactory.get(); segments = preferences.getBoolean("queue.download.segments"); permissions = preferences.getBoolean("queue.download.permissions.change"); timestamp = preferences.getBoolean("queue.download.timestamp.change"); wherefrom = preferences.getBoolean("queue.download.wherefrom"); icon = preferences.getBoolean("queue.download.icon.update"); checksum = preferences.getBoolean("queue.download.checksum.calculate"); }
public void setSortedAscending(boolean sortAscending) { //cache custom sorting preference this.sortAscending = sortAscending; //set default value PreferencesFactory.get().setProperty("browser.sort.ascending", this.sortAscending); }
public static synchronized Preferences get() { if(null == preferences) { set(new DefaultLoggingMemoryPreferenes()); } return preferences; }
@Override protected void setLogging() { this.setDefault("logging.config", "log4j.xml"); super.setLogging(); } }
@Override public String getContext() { return PreferencesFactory.get().getProperty("openstack.authentication.context"); } }
public UploadFilterOptions() { // Defaults final Preferences preferences = PreferencesFactory.get(); permissions = preferences.getBoolean("queue.upload.permissions.change"); acl = preferences.getBoolean("queue.upload.permissions.change"); timestamp = preferences.getBoolean("queue.upload.timestamp.change"); temporary = preferences.getBoolean("queue.upload.file.temporary"); metadata = preferences.getBoolean("queue.upload.file.metadata.change"); encryption = preferences.getBoolean("queue.upload.file.encryption.change"); redundancy = preferences.getBoolean("queue.upload.file.redundancy.change"); checksum = preferences.getBoolean("queue.upload.checksum.calculate"); }
@Override public int getConnectionTimeout() { return PreferencesFactory.get().getInteger("connection.timeout.seconds") * 1000; }
@Override public String getDefaultHostname() { // Blank by default return PreferencesFactory.get().getProperty("connection.hostname.default"); }
@Override public boolean isSortedAscending() { if(null == sortAscending) { //return default value return PreferencesFactory.get().getBoolean("browser.sort.ascending"); } return sortAscending; }
@Override public int getSocketTimeout() { return PreferencesFactory.get().getInteger("connection.timeout.seconds") * 1000; }
@Override public String getDefault() { return PreferencesFactory.get().getProperty("s3.storage.class"); }
public Speedometer(final long timestamp) { this(timestamp, PreferencesFactory.get().getBoolean("browser.filesize.decimal")); this.timestamp = timestamp; }
@Override public String getAuthorization() { return PreferencesFactory.get().getProperty("s3.signature.version"); }