org.dbforms.config
Class ConfigLoader

java.lang.Object
  extended by org.dbforms.config.ConfigLoader

public class ConfigLoader
extends Object

Loads the configuration. With this class you can load the configuration data from an standalone application, e.g.: dbConfig = new DbFormsConfig(realPath); FileInputStream fis = new FileInputStream(fn); ConfigLoader loader = new ConfigLoader() loader.loadConfig(fis, dbConfig);

Author:
Ivan F. Martinez

Field Summary
static String BASE_CLASS_FIELD
          DOCUMENT ME!
static String BASE_CLASS_FOREIGNKEY
          DOCUMENT ME!
static String BASE_CLASS_QUERY
          DOCUMENT ME!
static String BASE_CLASS_REFERENCE
          DOCUMENT ME!
static String BASE_CLASS_TABLE
          DOCUMENT ME!
static String DEFAULT_CONFIG
          DOCUMENT ME!
static String DEFAULT_ERRORS
          DOCUMENT ME!
static String DEFAULT_RULES
          DOCUMENT ME!
static String DEFAULT_VALIDATION
          DOCUMENT ME!
 
Constructor Summary
ConfigLoader()
          Creates a new ConfigLoader object.
 
Method Summary
 String getConfig()
          DOCUMENT ME!
 String getErrors()
          DOCUMENT ME!
 String getValidation()
          DOCUMENT ME!
 String getValidatorRules()
          DOCUMENT ME!
protected  org.apache.commons.digester.Digester initDigester(DbFormsConfig dbFormsConfig)
          Construct and return a digester that uses the new configuration file format.
protected  org.apache.commons.digester.Digester initErrorsDigester(DbFormsErrors dbFormsErrors)
          Construct and return a digester that uses the new errors file format.
 void loadConfig(InputStream input, DbFormsConfig dbFormsConfig)
          Load Config from InputStream
 void loadErrors(InputStream input, DbFormsErrors dbFormsErrors)
          Load Errors Config from InputStream
 void setConfig(String config)
          DOCUMENT ME!
 void setErrors(String errors)
          DOCUMENT ME!
 void setFieldClassName(String className)
          DOCUMENT ME!
 void setForeignKeyClassName(String className)
          DOCUMENT ME!
 void setQueryClassName(String className)
          DOCUMENT ME!
 void setReferenceClassName(String className)
          DOCUMENT ME!
 void setTableClassName(String className)
          DOCUMENT ME!
 void setValidation(String validation)
          DOCUMENT ME!
 void setValidatorRules(String validator_rules)
          DOCUMENT ME!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BASE_CLASS_TABLE

public static final String BASE_CLASS_TABLE
DOCUMENT ME!

See Also:
Constant Field Values

BASE_CLASS_FIELD

public static final String BASE_CLASS_FIELD
DOCUMENT ME!

See Also:
Constant Field Values

BASE_CLASS_QUERY

public static final String BASE_CLASS_QUERY
DOCUMENT ME!

See Also:
Constant Field Values

BASE_CLASS_FOREIGNKEY

public static final String BASE_CLASS_FOREIGNKEY
DOCUMENT ME!

See Also:
Constant Field Values

BASE_CLASS_REFERENCE

public static final String BASE_CLASS_REFERENCE
DOCUMENT ME!

See Also:
Constant Field Values

DEFAULT_CONFIG

public static final String DEFAULT_CONFIG
DOCUMENT ME!

See Also:
Constant Field Values

DEFAULT_ERRORS

public static final String DEFAULT_ERRORS
DOCUMENT ME!

See Also:
Constant Field Values

DEFAULT_VALIDATION

public static final String DEFAULT_VALIDATION
DOCUMENT ME!

See Also:
Constant Field Values

DEFAULT_RULES

public static final String DEFAULT_RULES
DOCUMENT ME!

See Also:
Constant Field Values
Constructor Detail

ConfigLoader

public ConfigLoader()
Creates a new ConfigLoader object.

Method Detail

setConfig

public void setConfig(String config)
DOCUMENT ME!

Parameters:
config - DOCUMENT ME!

getConfig

public String getConfig()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setErrors

public void setErrors(String errors)
DOCUMENT ME!

Parameters:
errors - DOCUMENT ME!

getErrors

public String getErrors()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setFieldClassName

public void setFieldClassName(String className)
DOCUMENT ME!

Parameters:
className - DOCUMENT ME!

setForeignKeyClassName

public void setForeignKeyClassName(String className)
DOCUMENT ME!

Parameters:
className - DOCUMENT ME!

setQueryClassName

public void setQueryClassName(String className)
DOCUMENT ME!

Parameters:
className - DOCUMENT ME!

setReferenceClassName

public void setReferenceClassName(String className)
DOCUMENT ME!

Parameters:
className - DOCUMENT ME!

setTableClassName

public void setTableClassName(String className)
DOCUMENT ME!

Parameters:
className - DOCUMENT ME!

setValidation

public void setValidation(String validation)
DOCUMENT ME!

Parameters:
validation - DOCUMENT ME!

getValidation

public String getValidation()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setValidatorRules

public void setValidatorRules(String validator_rules)
DOCUMENT ME!

Parameters:
validator_rules - DOCUMENT ME!

getValidatorRules

public String getValidatorRules()
DOCUMENT ME!

Returns:
DOCUMENT ME!

loadConfig

public void loadConfig(InputStream input,
                       DbFormsConfig dbFormsConfig)
                throws IOException,
                       SAXException
Load Config from InputStream

Parameters:
input - InputStream to load Config
dbFormsConfig - object to load the Config
Throws:
IOException
SAXException

loadErrors

public void loadErrors(InputStream input,
                       DbFormsErrors dbFormsErrors)
                throws IOException,
                       SAXException
Load Errors Config from InputStream

Parameters:
input - InputStream to load Errors Config
dbFormsErrors - object to load the Errors config
Throws:
IOException
SAXException

initDigester

protected org.apache.commons.digester.Digester initDigester(DbFormsConfig dbFormsConfig)
Construct and return a digester that uses the new configuration file format.

Parameters:
dbFormsConfig - DOCUMENT ME!
Returns:
DOCUMENT ME!

initErrorsDigester

protected org.apache.commons.digester.Digester initErrorsDigester(DbFormsErrors dbFormsErrors)
Construct and return a digester that uses the new errors file format.

Parameters:
dbFormsErrors - DOCUMENT ME!
Returns:
DOCUMENT ME!


Copyright © 2002-2006 DbForms. All Rights Reserved.