Returns the given configuration property name or the provided default
value if not found.
@param propertyName the property name
@param defaultValue the default value
@return the config property
191409
public String getConfigProperty(String propertyName, String defaultValue) {
        return getConfig().getString(propertyName, defaultValue);
    }
1173781
protected String getPropertyDefaultValue(AnnotatedElement element) {
        if (element.isAnnotationPresent(DefaultValue.class)) {
            return element.getAnnotation(DefaultValue.class).value();
        }
        return null;
    }
107185
public static Double getDouble(String propertyName, Double defaultValue) {
		Double propertyValue = NumberUtil.toDoubleObject(System.getProperty(propertyName), null);
		return propertyValue != null ? propertyValue : defaultValue;
	}
1295569
public static String getSystemProperty(String name, String defaultValue) {
        String value;
        value = System.getProperty(name, null);
        if (value != null) {
            return value;
        }
        value = System.getenv(name);
        if (value != null) {
            return value;
        }
        return defaultValue;
    }
1327241
public static String getRuntimeProperty(String property, String defaultValue)
   {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "getRuntimeProperty", new Object[] {property, defaultValue});
                                           
      String runtimeProp = RuntimeInfo.getPropertyWithMsg(property, defaultValue);
                                           
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "getRuntimeProperty", runtimeProp);
      
      return runtimeProp;
   }
340370
public static String getString(String propertyName, String envName, String defaultValue) {
		checkEnvName(envName);
		String propertyValue = System.getProperty(propertyName);
		if (propertyValue != null) {
			return propertyValue;
		} else {
			propertyValue = System.getenv(envName);
			return propertyValue != null ? propertyValue : defaultValue;
		}
	}
1007278
public String findProperty( final String propertyName )
    {
        String value = null;
        if( m_properties != null )
        {
            value = m_properties.getProperty( propertyName );
        }
        return value;
    }
466370
public static Long getLong(String propertyName, String envName, Long defaultValue) {
		checkEnvName(envName);
		Long propertyValue = NumberUtil.toLongObject(System.getProperty(propertyName), null);
		if (propertyValue != null) {
			return propertyValue;
		} else {
			propertyValue = NumberUtil.toLongObject(System.getenv(envName), null);
			return propertyValue != null ? propertyValue : defaultValue;
		}
	}
1319101
public boolean getProperty(String key, boolean defaultValue) {
        String value = getProperty(key, String.class);
        return StringUtils.isEmpty(value) ? defaultValue : Boolean.parseBoolean(value);
    }
1026531
public static Collection<String> getPropertyValue(Properties properties, String propertyName,
            Collection<String> defaultValue) {
        Collection<String> result = defaultValue;
        String propertyValue = properties.getProperty(propertyName);
        if (propertyValue != null) {
            result = toCollection(propertyValue);
            if (result.contains("*") && result.size() > 1) {
                throw new ConfigurationException(propertyName + " must be a comma-separated list or *");
            }
        }
        return result;
    }
1298315
public String findProperty( final String propertyName )
    {
        String value = null;
        if( m_properties != null )
        {
            value = (String) m_properties.get( propertyName );
        }
        if( value != null && value.trim().length() == 0 )
        {
            value = null;
        }
        return value;
    }
393095
public static String getProperty(InputStream input, String key, String defaultValue) {
		String property = null;
		try {
			property = PropertiesFactory.load(input).getProperty(key);
		} catch (IOException e) {}
		return property == null ? defaultValue : property;
	}
290760
public ConfigOptionBuilder setDefaultWith( Object defaultValue ) {
        co.setHasDefault( true );
        co.setValue( defaultValue );
        return setOptional();
    }
328228
public String getProperty(String key, String defaultValue) {

		String property = configProperties.getProperty(key, defaultValue);
		if (property != null) {
			property = property.trim();
		}
		return property;
	}
1298451
public static DefaultValueFunction defaultValue(String fieldName, Object defaultValue) {

		Assert.hasText(fieldName, "Fieldname must not be 'empty' for default value operation.");
		Assert.notNull(defaultValue, "DefaultValue must not be 'null'.");

		return defaultValue(new SimpleField(fieldName), defaultValue);
	}
445475
public static String getSystemProperty(String key, @Nullable String defaultValue) {
    String value;
    try {
      value = System.getProperty(key);
    } catch (AccessControlException ex) {
      return defaultValue;
    }
    return value != null ? value : defaultValue;
  }
936102
public String getParameterValue(String name, String defaultValue)
   {
      String value = defaultValue;
      SimpleParameterEntry p = parameters.get(name);
      if (p != null)
      {
         value = p.getValue();
      }
      return value;
   }