org.yawlfoundation.yawl.scheduling.util
Class PropertyReader

java.lang.Object
  extended by org.yawlfoundation.yawl.scheduling.util.PropertyReader

public class PropertyReader
extends Object

Reads values from .properties files


Field Summary
static String SCHEDULING
           
static String YAWL
           
 
Method Summary
 boolean getBooleanProperty(String propFile, String key)
          Gets a boolean type property value from a .properties file
static PropertyReader getInstance()
           
 int getIntProperty(String propFile, String key)
          Gets an integer type property value from a .properties file
 long getLongProperty(String propFile, String key)
          Gets a long type property value from a .properties file
 String getProperty(String propFile, String key)
          Gets a property value from a .properties file
 String getSchedulingProperty(String key)
          Gets a property value from the yawl.properties file
 String getYAWLProperty(String key)
          Gets a property value from the yawl.properties file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

YAWL

public static final String YAWL
See Also:
Constant Field Values

SCHEDULING

public static final String SCHEDULING
See Also:
Constant Field Values
Method Detail

getInstance

public static PropertyReader getInstance()

getProperty

public String getProperty(String propFile,
                          String key)
                   throws IOException
Gets a property value from a .properties file

Parameters:
propFile - the name of the .properties file
key - the property key to get the value for
Returns:
the value for the requested key
Throws:
IOException - if the file can't be loaded or if it doesn't contain the key

getYAWLProperty

public String getYAWLProperty(String key)
                       throws IOException
Gets a property value from the yawl.properties file

Parameters:
key - the property key to get the value for
Returns:
the value for the requested key
Throws:
IOException - if the file can't be loaded or if it doesn't contain the key

getSchedulingProperty

public String getSchedulingProperty(String key)
                             throws IOException
Gets a property value from the yawl.properties file

Parameters:
key - the property key to get the value for
Returns:
the value for the requested key
Throws:
IOException - if the file can't be loaded or if it doesn't contain the key

getBooleanProperty

public boolean getBooleanProperty(String propFile,
                                  String key)
                           throws IOException
Gets a boolean type property value from a .properties file

Parameters:
propFile - the name of the .properties file
key - the property key to get the value for
Returns:
the value for the requested key
Throws:
IOException - if the file can't be loaded or if it doesn't contain the key

getIntProperty

public int getIntProperty(String propFile,
                          String key)
                   throws IOException
Gets an integer type property value from a .properties file

Parameters:
propFile - the name of the .properties file
key - the property key to get the value for
Returns:
the value for the requested key
Throws:
IOException - if the file can't be loaded or if it doesn't contain the key or the value is not a valid integer

getLongProperty

public long getLongProperty(String propFile,
                            String key)
                     throws IOException
Gets a long type property value from a .properties file

Parameters:
propFile - the name of the .properties file
key - the property key to get the value for
Returns:
the value for the requested key
Throws:
IOException - if the file can't be loaded or if it doesn't contain the key or the value is not a valid long


Copyright © 2004-2012 The YAWL Foundation.