public static ConfigurationProperty getConfigPropertyForSysProp(String systemProperty) { ConfigurationProperty result = null; for ( ConfigurationProperty p : values()) { if ( p.getSystemProperty().equals(systemProperty)) { result = p; break; } } return result; }
public String getSystemProperty() { return delegate.getSystemProperty(); }
/** * Add to the provided propertyMap any properties available from this source * * Where the map already contains property values under a given key, extra property values should be * appended to the List * @return propertyMap, with parsed properties added */ public Map<ConfigurationProperty, List<String>> parseProperties(Map<ConfigurationProperty, List<String>> propertyMap, String... args) { for ( ConfigurationProperty p : getProperties()) { String value = System.getProperty(p.getSystemProperty()); if ( value != null ) { addValues(propertyMap, p, value); } } return propertyMap; }
private void checkIfMandatory(Map<ConfigurationProperty, List<String>> results, ConfigurationProperty p) throws InterpreterPropertyException { if ( p.isMandatory() && ! results.containsKey(p)) { throw new InterpreterPropertyException( "Mandatory property " + p + " was not set. " + "You can set this property with the -" + p.getSwitchName() + " switch, " + "the -" + p.getSwitchShortName() + " switch or the " + p.getSystemProperty() + " system property" ); } } }
public static ConfigurationProperty getConfigPropertyForSysProp(String systemProperty) { ConfigurationProperty result = null; for ( ConfigurationProperty p : values()) { if ( p.getSystemProperty().equals(systemProperty)) { result = p; break; } } return result; }