static boolean getBoolean(Properties properties, String key) { return getBoolean(properties, key, false); }
public static int getInteger(Properties properties, String key) { return getInteger(properties, key, 0); } }
static boolean getBoolean(Properties properties, String key) { return getBoolean(properties, key, false); }
public static int getInteger(Properties properties, String key) { return getInteger(properties, key, 0); } }
public Builder withProperties(Properties properties) { if (properties.containsKey("okreplay.tapeRoot")) { tapeRoot(new File(properties.getProperty("okreplay.tapeRoot"))); } if (properties.containsKey("okreplay.defaultMode")) { defaultMode(TapeMode.valueOf(properties.getProperty("okreplay.defaultMode"))); } if (properties.containsKey("okreplay.defaultMatchRules")) { String property = properties.getProperty("okreplay.defaultMatchRules"); List<MatchRule> rules = new ArrayList<>(); for (String s : Arrays.asList(property.split(","))) { rules.add(MatchRules.valueOf(s)); } defaultMatchRule(ComposedMatchRule.of(rules)); } if (properties.containsKey("okreplay.ignoreHosts")) { ignoreHosts(Arrays.asList(properties.getProperty("okreplay.ignoreHosts").split(","))); } if (properties.containsKey("okreplay.ignoreLocalhost")) { ignoreLocalhost(Boolean.valueOf(properties.getProperty("okreplay.ignoreLocalhost"))); } if (properties.containsKey("okreplay.sslEnabled")) { sslEnabled(TypedProperties.getBoolean(properties, "okreplay.sslEnabled")); } return this; }
public Builder withProperties(Properties properties) { if (properties.containsKey("okreplay.tapeRoot")) { tapeRoot(new File(properties.getProperty("okreplay.tapeRoot"))); } if (properties.containsKey("okreplay.defaultMode")) { defaultMode(TapeMode.valueOf(properties.getProperty("okreplay.defaultMode"))); } if (properties.containsKey("okreplay.defaultMatchRules")) { String property = properties.getProperty("okreplay.defaultMatchRules"); List<MatchRule> rules = new ArrayList<>(); for (String s : Arrays.asList(property.split(","))) { rules.add(MatchRules.valueOf(s)); } defaultMatchRule(ComposedMatchRule.of(rules)); } if (properties.containsKey("okreplay.ignoreHosts")) { ignoreHosts(Arrays.asList(properties.getProperty("okreplay.ignoreHosts").split(","))); } if (properties.containsKey("okreplay.ignoreLocalhost")) { ignoreLocalhost(Boolean.valueOf(properties.getProperty("okreplay.ignoreLocalhost"))); } if (properties.containsKey("okreplay.sslEnabled")) { sslEnabled(TypedProperties.getBoolean(properties, "okreplay.sslEnabled")); } return this; }