dk.vajhoej.model.app
Class Control

java.lang.Object
  extended by dk.vajhoej.model.app.Control

public class Control
extends java.lang.Object

Class Control reads and writes setup XML files.


Constructor Summary
Control()
           
 
Method Summary
static Data load(java.lang.String fnm)
          Read setup XML file.
static void replaceStore(Data data, java.lang.String s1, java.lang.String s2)
          Replace in all storage locations.
static void save(Data data, java.lang.String fnm)
          Write setup XML file.
static void saveAll(Data data, java.lang.String fnm)
          Write setup XML file and write all the rest of the data to the designated storage..
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Control

public Control()
Method Detail

load

public static Data load(java.lang.String fnm)
                 throws ModelException
Read setup XML file.

Parameters:
fnm - file name
Returns:
setup data
Throws:
ModelException - if problem

save

public static void save(Data data,
                        java.lang.String fnm)
                 throws ModelException
Write setup XML file.

Parameters:
data - setup data
fnm - file name
Throws:
ModelException - if problem

saveAll

public static void saveAll(Data data,
                           java.lang.String fnm)
                    throws ModelException
Write setup XML file and write all the rest of the data to the designated storage..

Parameters:
data - setup data
fnm - file name
Throws:
ModelException - if problem

replaceStore

public static void replaceStore(Data data,
                                java.lang.String s1,
                                java.lang.String s2)
Replace in all storage locations.

Parameters:
data - setup data
s1 - string to search for
s2 - string to replace with