org.matalon.pagerankhits.conf
Class PropertiesManager
java.lang.Object
org.matalon.pagerankhits.conf.PropertiesManager
- public class PropertiesManager
- extends java.lang.Object
This class is responsible for managing all program's properties.
- Author:
- Yonatan Matalon.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
theOnlyOne
private static PropertiesManager theOnlyOne
webProperties
private Configuration webProperties
tldProperties
private Configuration tldProperties
PropertiesManager
private PropertiesManager()
- Constructor.
getInstance
public static PropertiesManager getInstance()
- Returns:
- Returns the only instance of PropertiesManager.
getAllValues
public java.util.Collection getAllValues(java.lang.String propertiesType)
- Parameters:
propertiesType
-
- Returns:
- Returns all the values of the given properties file type.
getBoolean
public boolean getBoolean(java.lang.String propertiesType,
java.lang.String key)
- Parameters:
propertiesType
- key
-
- Returns:
- Returns the boolean value of the given
key
, which is found inside the given
properties file type.
getInt
public int getInt(java.lang.String propertiesType,
java.lang.String key)
- Parameters:
propertiesType
- key
-
- Returns:
- Returns the int value of the given
key
, which is found inside the given
properties file type.
getString
public java.lang.String getString(java.lang.String propertiesType,
java.lang.String key)
- Parameters:
propertiesType
- key
-
- Returns:
- Returns the String value of the given
key
, which is found inside the given
properties file type.
getPropertiesByType
public Configuration getPropertiesByType(java.lang.String propertiesType)
- Parameters:
propertiesType
-
- Returns:
- Returns a Configuration (properties) according to the given properties type.
getWebProperties
public Configuration getWebProperties()
- Returns:
- Returns the webProperties.
getTldProperties
public Configuration getTldProperties()
- Returns:
- Returns the tldProperties.