org.gcube.datatransformation.datatransformationlibrary
Class PropertiesManager

java.lang.Object
  extended by org.gcube.datatransformation.datatransformationlibrary.PropertiesManager

public class PropertiesManager
extends java.lang.Object

Author:
Dimitris Katris, NKUA This class supplies the DataTransformationLibrary components with the properties defined in the "dtslib.properties" file.

Constructor Summary
PropertiesManager()
           
 
Method Summary
static boolean getBooleanPropertyValue(java.lang.String propertyName, java.lang.String defaultValue)
          Returns the value of the property with name propertyName in boolean datatype.
static double getDoublePropertyValue(java.lang.String propertyName, java.lang.String defaultValue)
          Returns the value of the property with name propertyName in double datatype.
static java.util.Properties getDTSLibProperties()
          Returns the properties for DataTransformationLibrary.
static long getInMillisPropertyValue(java.lang.String propertyName, java.lang.String defaultValue)
          Returns the value of the property with name propertyName in milliseconds.
static int getIntPropertyValue(java.lang.String propertyName, java.lang.String defaultValue)
          Returns the value of the property with name propertyName in int datatype.
static long getLongPropertyValue(java.lang.String propertyName, java.lang.String defaultValue)
          Returns the value of the property with name propertyName in long datatype.
static java.lang.String getPropertyValue(java.lang.String propertyName, java.lang.String defaultValue)
          Returns the value of the property with name propertyName.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertiesManager

public PropertiesManager()
Method Detail

getDTSLibProperties

public static java.util.Properties getDTSLibProperties()
Returns the properties for DataTransformationLibrary.

Returns:
The singleton properties object.

getPropertyValue

public static java.lang.String getPropertyValue(java.lang.String propertyName,
                                                java.lang.String defaultValue)
Returns the value of the property with name propertyName.

Parameters:
propertyName - The name of the property.
defaultValue - The default value if the property is not contained in the properties file.
Returns:
The value of the property.

getInMillisPropertyValue

public static long getInMillisPropertyValue(java.lang.String propertyName,
                                            java.lang.String defaultValue)
Returns the value of the property with name propertyName in milliseconds.

Parameters:
propertyName - The name of the property.
defaultValue - The default value if the property is not contained in the properties file.
Returns:
The value of the property in milliseconds.

getLongPropertyValue

public static long getLongPropertyValue(java.lang.String propertyName,
                                        java.lang.String defaultValue)
Returns the value of the property with name propertyName in long datatype.

Parameters:
propertyName - The name of the property.
defaultValue - The default value if the property is not contained in the properties file.
Returns:
The value of the property in long datatype.

getIntPropertyValue

public static int getIntPropertyValue(java.lang.String propertyName,
                                      java.lang.String defaultValue)
Returns the value of the property with name propertyName in int datatype.

Parameters:
propertyName - The name of the property.
defaultValue - The default value if the property is not contained in the properties file.
Returns:
The value of the property in int datatype.

getDoublePropertyValue

public static double getDoublePropertyValue(java.lang.String propertyName,
                                            java.lang.String defaultValue)
Returns the value of the property with name propertyName in double datatype.

Parameters:
propertyName - The name of the property.
defaultValue - The default value if the property is not contained in the properties file.
Returns:
The value of the property in double datatype.

getBooleanPropertyValue

public static boolean getBooleanPropertyValue(java.lang.String propertyName,
                                              java.lang.String defaultValue)
Returns the value of the property with name propertyName in boolean datatype.

Parameters:
propertyName - The name of the property.
defaultValue - The default value if the property is not contained in the properties file.
Returns:
The value of the property in boolean datatype.