cz.zcu.fav.kiv.editor.template
Class TemplateController

java.lang.Object
  extended by cz.zcu.fav.kiv.editor.template.TemplateController

public class TemplateController
extends java.lang.Object

The TemplateController class contains method for reading templates.

Version:
1.0, 05/2007
Author:
Marta Vaclavikova

Method Summary
static TemplateController getInstance()
          Static methods return instance of TemplateController.
 void readTemplate(ConfigData configData, java.lang.String templateFile)
          Reads a template defined by its path templateFile.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static TemplateController getInstance()
Static methods return instance of TemplateController. If the instance is null, initializes a new one.

Returns:
the instance of TemplateController.

readTemplate

public void readTemplate(ConfigData configData,
                         java.lang.String templateFile)
                  throws ConfigException,
                         FileNotFoundException
Reads a template defined by its path templateFile.

Parameters:
configData - the data containing editor data structure.
templateFile - the path to the file with template.
Throws:
ConfigException - if the template or its XML schema isn't well-formed.
FileNotFoundException - if the template or its XML schema doesn't exist.