com.cinecolombia.interfases.control.web
Class ScreenFlowXmlDAO

java.lang.Object
  |
  +--com.cinecolombia.interfases.control.web.ScreenFlowXmlDAO

public class ScreenFlowXmlDAO
extends java.lang.Object

This DAO class provides the data bindings for the screendefinitions.xml and the requestmappings.xml files. The data obtained is maintained by the ScreenFlowManager

Author:
CincoSOFT
Created:
Mayo 2003

Field Summary
private static Debug debug
          The ubiquitous debugging object.
static java.lang.String DIRECT
           
static java.lang.String FLOW_HANDLER
           
static java.lang.String FLOW_HANDLER_CLASS
           
static java.lang.String HANDLER_RESULT
           
static java.lang.String KEY
           
static java.lang.String LANGUAGE
           
static java.lang.String NEXT_SCREEN
           
static java.lang.String PARAMETER
           
static java.lang.String REQUEST_HANDLER_CLASS
           
static java.lang.String RESULT
           
static java.lang.String SCREEN
           
static java.lang.String SCREEN_DEFINITION
           
static java.lang.String SCREEN_NAME
           
static java.lang.String TEMPLATE
           
static java.lang.String URL
           
static java.lang.String URL_MAPPING
           
static java.lang.String USE_FLOW_HANDLER
           
static java.lang.String USE_REQUEST_HANDLER
           
static java.lang.String VALUE
           
 
Constructor Summary
ScreenFlowXmlDAO()
           
 
Method Summary
private static java.util.HashMap getParameters(org.w3c.dom.Node node)
          auxiliary method for getScreens() that builds parameters sctructure corresponding to a screen
static java.util.HashMap getRequestMappings(org.w3c.dom.Element root)
          auxiliary method for loadRequestMappings() that builds urlMappings structure
static java.util.HashMap getScreenDefinitions(org.w3c.dom.Element root)
          auxliary method for loadScreenDefinitionMappings() that builds screensDefinitionsMappings structure
static java.util.HashMap getScreens(org.w3c.dom.Element root)
          auxiliary method for loadScreenDefinitions() that builds screens structure
private static java.lang.String getSubTagAttribute(org.w3c.dom.Element root, java.lang.String tagName, java.lang.String subTagName, java.lang.String attribute)
          auxiliary method for working with xml tree;
static java.lang.String getSubTagValue(org.w3c.dom.Element root, java.lang.String tagName, java.lang.String subTagName)
          auxiliary method for working with xml tree; invoked by getscreens() and getrequestMappings()
static java.lang.String getSubTagValue(org.w3c.dom.Node node, java.lang.String subTagName)
          auxiliary method for working with xml tree; invoked by getscreens() and getrequestMappings()
static java.lang.String getTagValue(org.w3c.dom.Element root, java.lang.String tagName)
          auxiliary method for working with xml tree; invoked by getscreens()
static org.w3c.dom.Element loadDocument(java.lang.String location)
          build tree from xml file
static java.util.HashMap loadRequestMappings(java.lang.String location)
          loads requestmappings.xml file and returns the equivalent HashMap
static java.util.HashMap loadScreenDefinitionMappings(java.lang.String location)
          load initial data of requestmappings.xml file for getting path of screensdefinitions.xml of each language
static java.util.HashMap loadScreenDefinitions(java.lang.String location)
          loads screendefinitions.xml file and returns the equivalent HashMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

URL_MAPPING

public static final java.lang.String URL_MAPPING
See Also:
Constant Field Values

SCREEN_DEFINITION

public static final java.lang.String SCREEN_DEFINITION
See Also:
Constant Field Values

URL

public static final java.lang.String URL
See Also:
Constant Field Values

LANGUAGE

public static final java.lang.String LANGUAGE
See Also:
Constant Field Values

TEMPLATE

public static final java.lang.String TEMPLATE
See Also:
Constant Field Values

RESULT

public static final java.lang.String RESULT
See Also:
Constant Field Values

NEXT_SCREEN

public static final java.lang.String NEXT_SCREEN
See Also:
Constant Field Values

USE_REQUEST_HANDLER

public static final java.lang.String USE_REQUEST_HANDLER
See Also:
Constant Field Values

USE_FLOW_HANDLER

public static final java.lang.String USE_FLOW_HANDLER
See Also:
Constant Field Values

FLOW_HANDLER_CLASS

public static final java.lang.String FLOW_HANDLER_CLASS
See Also:
Constant Field Values

REQUEST_HANDLER_CLASS

public static final java.lang.String REQUEST_HANDLER_CLASS
See Also:
Constant Field Values

HANDLER_RESULT

public static final java.lang.String HANDLER_RESULT
See Also:
Constant Field Values

FLOW_HANDLER

public static final java.lang.String FLOW_HANDLER
See Also:
Constant Field Values

KEY

public static final java.lang.String KEY
See Also:
Constant Field Values

VALUE

public static final java.lang.String VALUE
See Also:
Constant Field Values

DIRECT

public static final java.lang.String DIRECT
See Also:
Constant Field Values

SCREEN

public static final java.lang.String SCREEN
See Also:
Constant Field Values

SCREEN_NAME

public static final java.lang.String SCREEN_NAME
See Also:
Constant Field Values

PARAMETER

public static final java.lang.String PARAMETER
See Also:
Constant Field Values

debug

private static Debug debug
The ubiquitous debugging object.

Constructor Detail

ScreenFlowXmlDAO

public ScreenFlowXmlDAO()
Method Detail

loadDocument

public static org.w3c.dom.Element loadDocument(java.lang.String location)
build tree from xml file

Parameters:
location -
Returns:
Element

loadScreenDefinitionMappings

public static java.util.HashMap loadScreenDefinitionMappings(java.lang.String location)
load initial data of requestmappings.xml file for getting path of screensdefinitions.xml of each language

Parameters:
location -
Returns:
HashMap corresponding to screensDefinitionsMappings

loadScreenDefinitions

public static java.util.HashMap loadScreenDefinitions(java.lang.String location)
loads screendefinitions.xml file and returns the equivalent HashMap

Parameters:
location -
Returns:
HashMap corresponding to screens

loadRequestMappings

public static java.util.HashMap loadRequestMappings(java.lang.String location)
loads requestmappings.xml file and returns the equivalent HashMap

Parameters:
location -
Returns:
HashMap corresponding to urlMappings

getScreenDefinitions

public static java.util.HashMap getScreenDefinitions(org.w3c.dom.Element root)
auxliary method for loadScreenDefinitionMappings() that builds screensDefinitionsMappings structure

Parameters:
root -
Returns:
The screenDefinitions value

getScreens

public static java.util.HashMap getScreens(org.w3c.dom.Element root)
auxiliary method for loadScreenDefinitions() that builds screens structure

Parameters:
root -
Returns:
The screens value

getParameters

private static java.util.HashMap getParameters(org.w3c.dom.Node node)
auxiliary method for getScreens() that builds parameters sctructure corresponding to a screen

Parameters:
node -
Returns:
The parameters value

getRequestMappings

public static java.util.HashMap getRequestMappings(org.w3c.dom.Element root)
auxiliary method for loadRequestMappings() that builds urlMappings structure

Parameters:
root -
Returns:
The requestMappings value

getSubTagValue

public static java.lang.String getSubTagValue(org.w3c.dom.Node node,
                                              java.lang.String subTagName)
auxiliary method for working with xml tree; invoked by getscreens() and getrequestMappings()

Parameters:
node -
subTagName -
Returns:
The subTagValue value

getSubTagValue

public static java.lang.String getSubTagValue(org.w3c.dom.Element root,
                                              java.lang.String tagName,
                                              java.lang.String subTagName)
auxiliary method for working with xml tree; invoked by getscreens() and getrequestMappings()

Parameters:
root -
tagName -
subTagName -
Returns:
The subTagValue value

getTagValue

public static java.lang.String getTagValue(org.w3c.dom.Element root,
                                           java.lang.String tagName)
auxiliary method for working with xml tree; invoked by getscreens()

Parameters:
root -
tagName -
Returns:
The tagValue value

getSubTagAttribute

private static java.lang.String getSubTagAttribute(org.w3c.dom.Element root,
                                                   java.lang.String tagName,
                                                   java.lang.String subTagName,
                                                   java.lang.String attribute)
auxiliary method for working with xml tree;

Parameters:
root -
tagName -
subTagName -
attribute -
Returns:
The subTagAttribute value