org.ow2.petals.component.framework.api.util
Class PropertiesUtil

java.lang.Object
  extended by org.ow2.petals.component.framework.api.util.PropertiesUtil

public class PropertiesUtil
extends java.lang.Object

Utility to handle a CDK properties file.

Since:
1.0
Author:
ofabre - EBM Websourcing

Constructor Summary
PropertiesUtil()
           
 
Method Summary
static java.util.Properties loadProperties(java.lang.String propertiesFilePath)
           Load a Properties object from a properties file path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertiesUtil

public PropertiesUtil()
Method Detail

loadProperties

public static final java.util.Properties loadProperties(java.lang.String propertiesFilePath)
                                                 throws com.ebmwebsourcing.easycommons.properties.PropertiesException

Load a Properties object from a properties file path. The file path can be relative path based on Petals root path or a valid URL.

Exemples :
Relative path : /conf/external.properties
Absolute path : file:///C:/conf/external.properties
URL : ftp://user:pwd@host:port/external.properties

Parameters:
propertiesFilePath - The file path can be relative path based on Petals root path or a valid URL
Returns:
a Properties object fill with properties value found in the targeted file
Throws:
com.ebmwebsourcing.easycommons.properties.PropertiesException - if an error occurs when reading external properties file


Copyright © 2005-2011 Petals Link (EBM Websourcing). All Rights Reserved.