|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ebmwebsourcing.easycommons.properties.PropertiesHelper
public final class PropertiesHelper
Utility to handle a CDK properties file.
| Constructor Summary | |
|---|---|
PropertiesHelper()
|
|
| Method Summary | |
|---|---|
static java.util.Map<java.lang.String,java.lang.String> |
flattenProperties(java.util.Properties properties)
Get a flat view of a Properties object including recursively,
default properties if any. |
static void |
resolveMap(java.util.Map<java.lang.String,java.lang.String> mapToResolve,
java.util.Properties propertiesToUse)
Resolve the place holders in the values of the specified Map
mapToResolve against the specified Properties propertiesToUse |
static void |
resolveMapWithNoException(java.util.Map<java.lang.String,java.lang.String> mapToResolve,
java.util.Properties propertiesToUse)
Resolve the place holders in the values of the specified Map
mapToResolve against the specified Properties propertiesToUse. |
static void |
resolveProperties(java.util.Properties propertiesToResolve,
java.util.Properties propertiesToUse)
Resolve the specified Properties propertiesToResolve against the
specified Properties propertiesToUse |
static java.io.ByteArrayInputStream |
resolvePropertiesForInputStream(java.io.InputStream inputStreamToResolve,
java.util.Properties propertiesToUse)
Resolve the place holders in the values of the specified InputStream
inputStreamToResolve against the specified Properties propertiesToUse |
static java.lang.String |
resolveString(java.lang.String str,
java.util.Properties propertiesToUse)
Replace the place holders by their values in the specified string str |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PropertiesHelper()
| Method Detail |
|---|
public static final void resolveProperties(java.util.Properties propertiesToResolve,
java.util.Properties propertiesToUse)
throws PropertiesException
Properties propertiesToResolve against the
specified Properties propertiesToUse
propertiesToResolve - the Properties to resolve (which contain place
holders)propertiesToUse - the Properties to use to resolve
PropertiesException - if an error occurs when resolving the Properties
public static final java.io.ByteArrayInputStream resolvePropertiesForInputStream(java.io.InputStream inputStreamToResolve,
java.util.Properties propertiesToUse)
throws java.io.IOException,
PropertiesException
InputStream
inputStreamToResolve against the specified Properties propertiesToUse
inputStreamToResolve - the InputStream containing properties value with place holders to
resolvepropertiesToUse - the Properties to use to resolve
PropertiesException - if an error occurs when resolving the Properties
IOException
java.io.IOException
public static final void resolveMap(java.util.Map<java.lang.String,java.lang.String> mapToResolve,
java.util.Properties propertiesToUse)
throws PropertiesException
Map
mapToResolve against the specified Properties propertiesToUse
mapToResolve - the Map containing string value with place holders to
resolvepropertiesToUse - the Properties to use to resolve
PropertiesException - if an error occurs when resolving the Properties
public static final void resolveMapWithNoException(java.util.Map<java.lang.String,java.lang.String> mapToResolve,
java.util.Properties propertiesToUse)
Map
mapToResolve against the specified Properties propertiesToUse. If
the place holders of a string value cannot be resolved, the string value
is not modified in the map.
mapToResolve - the Map containing string value with place holders to
resolvepropertiesToUse - the Properties to use to resolve
public static final java.lang.String resolveString(java.lang.String str,
java.util.Properties propertiesToUse)
throws PropertiesException
str - a string containing place holderspropertiesToUse - the Properties to resolve (which contains place
holders)
PropertiesException - if an error occurs when resolving a place holderpublic static final java.util.Map<java.lang.String,java.lang.String> flattenProperties(java.util.Properties properties)
Properties object including recursively,
default properties if any.
properties - Properties to consider.
Map.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||