org.makumba.commons
Class MakumbaJspAnalyzer

java.lang.Object
  extended by org.makumba.commons.MakumbaJspAnalyzer
All Implemented Interfaces:
JspAnalyzer
Direct Known Subclasses:
JspRelationsAnalyzer

public class MakumbaJspAnalyzer
extends Object
implements JspAnalyzer

This class analyzes a JSP taking into account the specifics of Makumba tags. When implementing a new Makumba tag, be sure to add it to on of listTags, oldFormTags or formTags. TODO maybe extract some commonly used methods and add them to a generic analyser

TODO maybe extract some commonly used methods and add them to a generic analyser

Version:
$Id: MakumbaJspAnalyzer.java 5148 2010-05-18 18:56:03Z rosso_nero $
Author:
Cristian Bogdan

Field Summary
static String ADD_FORM_DATA_TYPE
           
static String BASE_POINTER_TYPES
           
static String DS_ATTR
           
static String EL_CACHE
           
static String EL_DATA_CACHE
           
(package private) static Map<String,Class<?>> elClasses
           
(package private) static String[] elExpressionNames
           
(package private) static String[] elExpressions
           
static String FORM_TAGS_DEPENDENCY_CACHE
           
static String FORMATTERS
           
(package private) static String[] formTagNames
           
(package private) static List<String> formTagNamesList
           
(package private) static String[] formTags
           
static String INPUT_TYPES
           
static String LAZY_EVALUATED_INPUTS
           
(package private) static String[] listTags
           
static String NESTED_FORM_NAMES
           
(package private) static String[] oldFormTags
           
static String PROJECTION_ORIGIN_CACHE
           
static String QL_HQL
           
static String QL_OQL
           
static String QUERY
           
static String QUERY_LANGUAGE
           
static String SECTION_DATA
           
static String SECTION_EVENT_TO_ID
           
static String SECTION_IDEVENT_TO_TYPE
           
static String TAG_CACHE
           
static String TAG_DATA_CACHE
           
(package private) static Map<String,Class<?>> tagClasses
           
static String VALUE_COMPUTERS
           
 
Constructor Summary
protected MakumbaJspAnalyzer()
           
 
Method Summary
 void elExpression(ELData ed, Object status)
          Performs analysis for a EL expression (see Expression)
 Object endPage(Object status)
          The end of the page
 void endTag(TagData td, Object status)
          Performs analysis for the end of a tag
static JspAnalyzer getInstance()
           
static String getQueryLanguage(PageCache pageCache)
           
protected  void handleNonMakumbaSystemTags(TagData td, Object status)
          Handles non-mak system tags.
protected  void handleNonMakumbaTags(TagData td, Object status)
          Handles non-mak tags.
static boolean isHQLPage(PageCache pageCache)
           
static boolean isOQLPage(PageCache pageCache)
           
 Object makeStatusHolder(Object initialStatus)
          Makes a status holder, which is passed to all other methods
 void simpleTag(TagData td, Object status)
          Performs analysis for a simple tag
 void startTag(TagData td, Object status)
          Performs analysis for the start of a tag
 void systemTag(TagData td, Object status)
          Performs analysis for a system tag FIXME this should be thought of much more
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TAG_CACHE

public static final String TAG_CACHE
See Also:
Constant Field Values

EL_CACHE

public static final String EL_CACHE
See Also:
Constant Field Values

EL_DATA_CACHE

public static final String EL_DATA_CACHE
See Also:
Constant Field Values

TAG_DATA_CACHE

public static final String TAG_DATA_CACHE
See Also:
Constant Field Values

FORM_TAGS_DEPENDENCY_CACHE

public static final String FORM_TAGS_DEPENDENCY_CACHE
See Also:
Constant Field Values

NESTED_FORM_NAMES

public static final String NESTED_FORM_NAMES
See Also:
Constant Field Values

INPUT_TYPES

public static final String INPUT_TYPES
See Also:
Constant Field Values

LAZY_EVALUATED_INPUTS

public static final String LAZY_EVALUATED_INPUTS
See Also:
Constant Field Values

BASE_POINTER_TYPES

public static final String BASE_POINTER_TYPES
See Also:
Constant Field Values

VALUE_COMPUTERS

public static final String VALUE_COMPUTERS
See Also:
Constant Field Values

QUERY

public static final String QUERY
See Also:
Constant Field Values

QUERY_LANGUAGE

public static final String QUERY_LANGUAGE
See Also:
Constant Field Values

DS_ATTR

public static final String DS_ATTR
See Also:
Constant Field Values

FORMATTERS

public static final String FORMATTERS
See Also:
Constant Field Values

PROJECTION_ORIGIN_CACHE

public static final String PROJECTION_ORIGIN_CACHE
See Also:
Constant Field Values

ADD_FORM_DATA_TYPE

public static final String ADD_FORM_DATA_TYPE
See Also:
Constant Field Values

SECTION_EVENT_TO_ID

public static final String SECTION_EVENT_TO_ID
See Also:
Constant Field Values

SECTION_IDEVENT_TO_TYPE

public static final String SECTION_IDEVENT_TO_TYPE
See Also:
Constant Field Values

SECTION_DATA

public static final String SECTION_DATA
See Also:
Constant Field Values

listTags

static String[] listTags

oldFormTags

static String[] oldFormTags

formTags

static String[] formTags

formTagNames

static String[] formTagNames

elExpressions

static String[] elExpressions

elExpressionNames

static String[] elExpressionNames

tagClasses

static final Map<String,Class<?>> tagClasses

elClasses

static final Map<String,Class<?>> elClasses

formTagNamesList

static final List<String> formTagNamesList

QL_OQL

public static final String QL_OQL
See Also:
Constant Field Values

QL_HQL

public static final String QL_HQL
See Also:
Constant Field Values
Constructor Detail

MakumbaJspAnalyzer

protected MakumbaJspAnalyzer()
Method Detail

getInstance

public static JspAnalyzer getInstance()

systemTag

public void systemTag(TagData td,
                      Object status)
Performs analysis for a system tag FIXME this should be thought of much more

Specified by:
systemTag in interface JspAnalyzer
Parameters:
td - the TagData holding the information
status - the status of the parsing

simpleTag

public void simpleTag(TagData td,
                      Object status)
Performs analysis for a simple tag

Specified by:
simpleTag in interface JspAnalyzer
Parameters:
td - the TagData holding the information
status - the status of the parsing

elExpression

public void elExpression(ELData ed,
                         Object status)
Performs analysis for a EL expression (see Expression)

Specified by:
elExpression in interface JspAnalyzer
Parameters:
td - the TagData holding the information
status - the status of the parsing

handleNonMakumbaTags

protected void handleNonMakumbaTags(TagData td,
                                    Object status)
Handles non-mak tags. To be implemented by classes that extend this one

Parameters:
td - the TagData holding the information
status - the status of the parsing

handleNonMakumbaSystemTags

protected void handleNonMakumbaSystemTags(TagData td,
                                          Object status)
Handles non-mak system tags. To be implemented by classes that extend this one

Parameters:
td - the TagData holding the information
status - the status of the parsing

startTag

public void startTag(TagData td,
                     Object status)
Performs analysis for the start of a tag

Specified by:
startTag in interface JspAnalyzer
Parameters:
td - the TagData holding the information
status - the status of the parsing
See Also:
JspAnalyzer.endTag(TagData, Object)

endTag

public void endTag(TagData td,
                   Object status)
Performs analysis for the end of a tag

Specified by:
endTag in interface JspAnalyzer
Parameters:
td - the TagData holding the information
status - the status of the parsing

makeStatusHolder

public Object makeStatusHolder(Object initialStatus)
Description copied from interface: JspAnalyzer
Makes a status holder, which is passed to all other methods

Specified by:
makeStatusHolder in interface JspAnalyzer
Parameters:
initialStatus - an initial status to be passed to the JspAnalyzer. for example, the pageContext for an example-based analyzer

endPage

public Object endPage(Object status)
Description copied from interface: JspAnalyzer
The end of the page

Specified by:
endPage in interface JspAnalyzer
Parameters:
status - the status of the parsing
Returns:
The result of the analysis

getQueryLanguage

public static String getQueryLanguage(PageCache pageCache)

isOQLPage

public static boolean isOQLPage(PageCache pageCache)

isHQLPage

public static boolean isHQLPage(PageCache pageCache)