org.jboss.testharness.properties
Class PropertiesManager
java.lang.Object
org.jboss.testharness.properties.PropertiesManager
public class PropertiesManager
- extends java.lang.Object
Utility class to load deployment properties
- Author:
- Pete Muir
|
Method Summary |
boolean |
getBooleanValue(java.lang.String propertyName,
boolean _default,
boolean required)
|
<T> java.util.Set<java.lang.Class<T>> |
|
getClasses(java.lang.String propertyName,
java.lang.Class<T> expectedType)
Gets the possible implementation class for a given property for which the
values are classanames |
|
getClassValue(java.lang.String propertyName,
java.lang.Class<T> expectedType,
boolean required)
|
|
getInstanceValue(java.lang.String propertyName,
java.lang.Class<T> expectedType,
boolean required)
|
int |
getIntValue(java.lang.String propertyName,
int _default,
boolean required)
|
long |
getLongValue(java.lang.String propertyName,
long _default,
boolean required)
|
java.util.Set<java.lang.String> |
getPropertyValues(java.lang.String key)
Get a list of possible values for a given key. |
java.lang.String |
getStringValue(java.lang.String propertyName,
java.lang.String _default,
boolean required)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RESOURCE_BUNDLE
public static final java.lang.String RESOURCE_BUNDLE
- See Also:
- Constant Field Values
PropertiesManager
public PropertiesManager()
- Constructor
- Parameters:
classLoader - The classloader to work on
getPropertyValues
public java.util.Set<java.lang.String> getPropertyValues(java.lang.String key)
- Get a list of possible values for a given key.
First, System properties are tried, followed by the specified resource
bundle (first in classpath only).
- Parameters:
key - The key to search for
- Returns:
- A list of possible values. An empty list is returned if there are
no matches.
getClasses
public <T> java.util.Set<java.lang.Class<T>> getClasses(java.lang.String propertyName,
java.lang.Class<T> expectedType)
- Gets the possible implementation class for a given property for which the
values are classanames
- Parameters:
deploymentProperties - The deployment properties object to useresourceLoader - The resource laoder to use to attemptpropertyName - The name of the property to load
- Returns:
- A set of classes specified
getClassValue
public <T> java.lang.Class<T> getClassValue(java.lang.String propertyName,
java.lang.Class<T> expectedType,
boolean required)
getInstanceValue
public <T> T getInstanceValue(java.lang.String propertyName,
java.lang.Class<T> expectedType,
boolean required)
getBooleanValue
public boolean getBooleanValue(java.lang.String propertyName,
boolean _default,
boolean required)
getIntValue
public int getIntValue(java.lang.String propertyName,
int _default,
boolean required)
getLongValue
public long getLongValue(java.lang.String propertyName,
long _default,
boolean required)
getStringValue
public java.lang.String getStringValue(java.lang.String propertyName,
java.lang.String _default,
boolean required)
Copyright © 2009-2010. All Rights Reserved.