synesketch.util
Class PropertiesManager

java.lang.Object
  extended by synesketch.util.PropertiesManager

public class PropertiesManager
extends java.lang.Object

A class for handling XML property files.

Version:
1.0
Author:
Uros Krcadinac email: uros@krcadinac.com

Constructor Summary
PropertiesManager(java.lang.String fileName)
          Class constructor that loads properties from XML file.
 
Method Summary
 boolean getBooleanProperty(java.lang.String key)
          Property getter for boolean properties.
 int[] getIntArrayProperty(java.lang.String key)
          Property getter for array of ints properties.
 int getIntProperty(java.lang.String key)
          Property getter for int properties.
 long getLongProperty(java.lang.String key)
          Property getter for long properties.
 java.lang.String getProperty(java.lang.String key)
          Property getter for String properties.
 void put(java.lang.Object key, java.lang.Object value)
          Puts an object into properties.
 void save()
          Stores propeties to XML propety file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertiesManager

public PropertiesManager(java.lang.String fileName)
Class constructor that loads properties from XML file.

Parameters:
fileName - name of the XML property file
Method Detail

getProperty

public java.lang.String getProperty(java.lang.String key)
Property getter for String properties.

Parameters:
key - property name
Returns:
String value

getIntProperty

public int getIntProperty(java.lang.String key)
Property getter for int properties.

Parameters:
key - property name
Returns:
int value

getIntArrayProperty

public int[] getIntArrayProperty(java.lang.String key)
Property getter for array of ints properties.

Parameters:
key - property name
Returns:
array of ints value

getBooleanProperty

public boolean getBooleanProperty(java.lang.String key)
Property getter for boolean properties.

Parameters:
key - property name
Returns:
boolean value

getLongProperty

public long getLongProperty(java.lang.String key)
Property getter for long properties.

Parameters:
key - property name
Returns:
long value

put

public void put(java.lang.Object key,
                java.lang.Object value)
Puts an object into properties.

Parameters:
key - property name
value - property value

save

public void save()
Stores propeties to XML propety file.