Cumulus4j API
(1.1.0)

org.cumulus4j.keymanager.back.shared
Class SystemPropertyUtil

java.lang.Object
  extended by org.cumulus4j.keymanager.back.shared.SystemPropertyUtil

public final class SystemPropertyUtil
extends Object

Helper class to work with system properties.

Author:
Marco หงุ่ยตระกูล-Schulze - marco at nightlabs dot de

Method Summary
static String resolveProperties(String raw, Properties properties)
          General core of resolveSystemProperties simplifying the creation of test functions.
static String resolveSystemProperties(String raw)
          Resolve system properties like "${java.io.tmpdir}" in a String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

resolveSystemProperties

public static String resolveSystemProperties(String raw)
Resolve system properties like "${java.io.tmpdir}" in a String. Note, that this method works recursively, i.e. you can specify a system property " aaa = someString/${bbb}/other" and a system property " bbb = xxx" and the string "yyy/${aaa}/zzz " will be resolved to "yyy/someString/xxx/other/zzz".

Parameters:
raw - the raw String, e.g. "${java.io.tmpdir}/mydirectory".
Returns:
the resolved String, e.g. "/tmp/mydirectory".

resolveProperties

public static String resolveProperties(String raw,
                                       Properties properties)
General core of resolveSystemProperties simplifying the creation of test functions.

Parameters:
raw - the raw String, e.g. "${java.io.tmpdir}/mydirectory".
properties - Properties to resolve
Returns:
the resolved String, e.g. "/tmp/mydirectory".

Cumulus4j API
(1.1.0)

Copyright © 2013 NightLabs Consulting GmbH. All Rights Reserved.