Rio Project 4.2 API Documentation



org.rioproject.resources.util
Class PropertyHelper

java.lang.Object
  extended by org.rioproject.resources.util.PropertyHelper

public class PropertyHelper
extends Object

Property helper

Author:
Dennis Reedy

Field Summary
static String[] PARSETIME
           
static String[] RUNTIME
           
 
Constructor Summary
PropertyHelper()
           
 
Method Summary
static String expandProperties(String arg)
          Expand any properties in the String.
static String expandProperties(String arg, String[] delimeters)
          Expand any properties in the String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARSETIME

public static final String[] PARSETIME

RUNTIME

public static final String[] RUNTIME
Constructor Detail

PropertyHelper

public PropertyHelper()
Method Detail

expandProperties

public static String expandProperties(String arg)
Expand any properties in the String. Properties are declared with the pattern of : ${property}

Parameters:
arg - The string with properties to expand, must not be null
Returns:
If the string has properties declared (in the form ${property}), return a formatted string with the properties expanded. If there are no property elements declared, return the original string.
Throws:
IllegalArgumentException - if any of the arguments are null

expandProperties

public static String expandProperties(String arg,
                                      String[] delimeters)
Expand any properties in the String. Properties are declared with the pattern of : property

Parameters:
arg - The string with properties to expand, must not be null
delimeters - The string patterns indicating the starting and ending property delimiter
Returns:
If the string has properties declared (in the form property), return a formatted string with the properties expanded. If there are no property elements declared, return the original string.
Throws:
IllegalArgumentException - if any of the arguments are null or if the delimeters argument does not contain at least 2 entries, or if a property value cannot be obtained

Copyright © Rio Project.

Copyright © 2006-2011 Rio Project. All Rights Reserved.