de.folt.models.applicationmodel.guimodel.editor.datasourceeditor
Class EditorConfiguration

java.lang.Object
  extended by de.folt.models.applicationmodel.guimodel.editor.datasourceeditor.EditorConfiguration

public class EditorConfiguration
extends java.lang.Object

Author:
klemens To change the template for this generated type comment go to Window - Preferences - Java - Code Generation - Code and Comments

Constructor Summary
EditorConfiguration(org.eclipse.swt.widgets.Shell currentShell, java.lang.String configDirectory, java.lang.String currentUser)
           
EditorConfiguration(org.eclipse.swt.widgets.Shell currentShell, java.lang.String configDirectory, java.lang.String applicationName, java.lang.String currentUser)
           
 
Method Summary
 java.lang.String adaptToAscii(java.lang.String string)
          adaptToAscii replaces non ASCII chars with "_" in the given string
 java.lang.Boolean loadBooleanValueForKey(java.lang.String key)
          loadBooleanValueForKey load a value for a given key
 int loadIntValueForKey(java.lang.String key)
          loadBooleanValueForKey load a value for a given key
 java.lang.String loadValueForKey(java.lang.String key)
          loadValueForKey load a value for a given key
 boolean saveKeyValuePair(java.lang.String key, boolean value)
          saveKeyValuePair saves a value for the given user for a key
 boolean saveKeyValuePair(java.lang.String key, int value)
          saveKeyValuePair saves a value for the given user for a key
 boolean saveKeyValuePair(java.lang.String key, java.lang.String value)
          saveKeyValuePair saves a value for the given user for a key
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EditorConfiguration

public EditorConfiguration(org.eclipse.swt.widgets.Shell currentShell,
                           java.lang.String configDirectory,
                           java.lang.String currentUser)
Parameters:
currentShell - the shell - can be null; for error messages
configDirectory - the directory where the configuration file should be stored
currentUser - the user to create/read the configurations from

EditorConfiguration

public EditorConfiguration(org.eclipse.swt.widgets.Shell currentShell,
                           java.lang.String configDirectory,
                           java.lang.String applicationName,
                           java.lang.String currentUser)
Parameters:
currentShell - the shell - can be null; for error messages
configDirectory - the directory where the configuration file should be stored
applicationName - the name of the application
currentUser - the user to create/read the configurations from
Method Detail

adaptToAscii

public java.lang.String adaptToAscii(java.lang.String string)
adaptToAscii replaces non ASCII chars with "_" in the given string

Parameters:
string - the string name to adapt
Returns:
the adapted string

loadBooleanValueForKey

public java.lang.Boolean loadBooleanValueForKey(java.lang.String key)
loadBooleanValueForKey load a value for a given key

Parameters:
key - the key to search for
Returns:
the boolean value for the key

loadIntValueForKey

public int loadIntValueForKey(java.lang.String key)
loadBooleanValueForKey load a value for a given key

Parameters:
key - the key to search for
Returns:
the int value for the key

loadValueForKey

public java.lang.String loadValueForKey(java.lang.String key)
loadValueForKey load a value for a given key

Parameters:
key - the key to search for
Returns:
the value for the key

saveKeyValuePair

public boolean saveKeyValuePair(java.lang.String key,
                                boolean value)
saveKeyValuePair saves a value for the given user for a key

Parameters:
key - the key for the value
value - the value to store
Returns:
true if successfully stored otherwise false

saveKeyValuePair

public boolean saveKeyValuePair(java.lang.String key,
                                int value)
saveKeyValuePair saves a value for the given user for a key

Parameters:
key - the key for the value
value - the value to store
Returns:
true if successfully stored otherwise false

saveKeyValuePair

public boolean saveKeyValuePair(java.lang.String key,
                                java.lang.String value)
saveKeyValuePair saves a value for the given user for a key

Parameters:
key - the key for the value
value - the value to store
Returns:
true if successfully stored otherwise false