org.keridwen.core.settings
Class ApplicationSettings

java.lang.Object
  extended by org.keridwen.core.settings.ApplicationSettings

public class ApplicationSettings
extends Object

Keridwen's project
General application settings tool.

Author:
B.Thiebault, Artenum SARL

Constructor Summary
ApplicationSettings()
          Default constructor.
 
Method Summary
static String getProperty(String key)
          Get the property of the given key-name as a String.
static File getPropertyAsFile(String key)
          Get the property of the given key-name as a File, if file exists, null otherwise.
static int getPropertyAsInt(String key)
          Get the property of the given key-name as a simple int, if the cast is possible, NumberFormatException exception otherwise.
static void setInputFile(File inputFile)
           
static void setSystemPropertyName(String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApplicationSettings

public ApplicationSettings()
Default constructor.

Method Detail

setSystemPropertyName

public static void setSystemPropertyName(String name)

setInputFile

public static void setInputFile(File inputFile)

getProperty

public static String getProperty(String key)
Get the property of the given key-name as a String.

Parameters:
key - - keyname of the property
Returns:
- the property

getPropertyAsFile

public static File getPropertyAsFile(String key)
Get the property of the given key-name as a File, if file exists, null otherwise.

Parameters:
key - - keyname of the property.
Returns:
- The corresponding File, if exists, null otherwise.

getPropertyAsInt

public static int getPropertyAsInt(String key)
Get the property of the given key-name as a simple int, if the cast is possible, NumberFormatException exception otherwise.

Parameters:
key - - keyname of the property.
Returns:
- The value of the property.


Copyright © 2012-2013 Artenum. All Rights Reserved.