info.informatica.ui.html
Class HTMLViewDatabase

java.lang.Object
  extended by info.informatica.ui.html.HTMLViewDatabase

public class HTMLViewDatabase
extends Object

HTML form view database.

Author:
Carlos Amengual

Nested Class Summary
static interface HTMLViewDatabase.ViewLoader
           
 
Constructor Summary
HTMLViewDatabase(HTMLViewDatabase.ViewLoader viewLoader)
           
 
Method Summary
 DataViewConfig getDataViewConfig(String viewid)
          Gets the view config with the given identifier.
 void init()
          Initialize the database.
 boolean isChecked(String viewId)
          Is the given view in the database?
 DataViewConfig loadDefaultViewConfig(MetaData md)
          Loads a default view configuration to the database, based on the given metadata.
 void parseView(String viewId, String formText, DataDict dict)
          Parses a form and extracts its view configuration.
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HTMLViewDatabase

public HTMLViewDatabase(HTMLViewDatabase.ViewLoader viewLoader)
Method Detail

init

public void init()
Initialize the database.


getDataViewConfig

public DataViewConfig getDataViewConfig(String viewid)
                                 throws DataViewException,
                                        IOException
Gets the view config with the given identifier.

Parameters:
viewid - the form identifier.
Returns:
the view config, or null if none could be found.
Throws:
DataException - if an error happened when handling the metadata.
IOException - if an error happens when reading the configuration file.
DataViewException

loadDefaultViewConfig

public DataViewConfig loadDefaultViewConfig(MetaData md)
Loads a default view configuration to the database, based on the given metadata.

Parameters:
md - the metadata.
Returns:
the default view configuration.

parseView

public void parseView(String viewId,
                      String formText,
                      DataDict dict)
               throws DataException,
                      IOException
Parses a form and extracts its view configuration.

Parameters:
viewId - the identifier for the form.
formText - the string containing the form.
dict - the data dictionary.
Throws:
DataException - if an error happened when handling the metadata.
IOException - if an error happens when reading the form.

isChecked

public boolean isChecked(String viewId)
Is the given view in the database?

Parameters:
viewId - the identifier of the form to be checked.
Returns:
true if the form with the given identifier was checked into the database, or false if it is not.

toString

public String toString()
Overrides:
toString in class Object