org.matalon.pagerankhits.conf
Class PropertiesManager

java.lang.Object
  extended byorg.matalon.pagerankhits.conf.PropertiesManager

public class PropertiesManager
extends java.lang.Object

This class is responsible for managing all program's properties.

Author:
Yonatan Matalon.

Field Summary
private static PropertiesManager theOnlyOne
           
private  Configuration tldProperties
           
private  Configuration webProperties
           
 
Constructor Summary
private PropertiesManager()
          Constructor.
 
Method Summary
 java.util.Collection getAllValues(java.lang.String propertiesType)
           
 boolean getBoolean(java.lang.String propertiesType, java.lang.String key)
           
static PropertiesManager getInstance()
           
 int getInt(java.lang.String propertiesType, java.lang.String key)
           
 Configuration getPropertiesByType(java.lang.String propertiesType)
           
 java.lang.String getString(java.lang.String propertiesType, java.lang.String key)
           
 Configuration getTldProperties()
           
 Configuration getWebProperties()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

theOnlyOne

private static PropertiesManager theOnlyOne

webProperties

private Configuration webProperties

tldProperties

private Configuration tldProperties
Constructor Detail

PropertiesManager

private PropertiesManager()
Constructor.

Method Detail

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.