|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectjavax.servlet.jsp.tagext.TagSupport
org.makumba.analyser.AnalysableTag
public abstract class AnalysableTag
Extend this class in order to get analysis support for your tag.
| Field Summary | |
|---|---|
static ThreadLocal<TagData> |
analyzedTag
|
static String[] |
ATTRIBUTE_VALUES_TRUE_FALSE
Commonly used Attribute values. |
static ThreadLocal<TagData> |
runningTag
|
TagData |
tagData
The TagData object holding the composite data collected by the analysis. |
MultipleKey |
tagKey
A tag key, used to find cached resources. |
(package private) static ThreadLocal<Stack<TagData>> |
tagStack
|
static String |
TYPES
Cache names, for PageCache of analysis |
| Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
|---|
id, pageContext |
| Fields inherited from interface javax.servlet.jsp.tagext.IterationTag |
|---|
EVAL_BODY_AGAIN |
| Fields inherited from interface javax.servlet.jsp.tagext.Tag |
|---|
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
| Constructor Summary | |
|---|---|
AnalysableTag()
|
|
| Method Summary | |
|---|---|
void |
addTagText(StringBuffer sb)
Dumps the tag line during analysis |
boolean |
allowsIdenticalKey()
Determines whether the tag can have the same key as others in the page |
boolean |
canHaveBody()
Determines whether this tag can have a body or not. |
protected void |
checkValidAttributeValues(String attributeName,
String value,
String[] allowedAttributeValues)
|
protected void |
doAnalyzedCleanup()
Called by doEndTag in its finally block. |
int |
doAnalyzedEndTag(PageCache pageCache)
makumba-specific endTag |
int |
doAnalyzedStartTag(PageCache pageCache)
makumba-specific startTag. |
void |
doEndAnalyze(PageCache pageCache)
End the analysis of the tag, after all tags in the page were visited. |
int |
doEndTag()
Handles exceptions and calls doMakumbaEndTag() |
void |
doStartAnalyze(PageCache pageCache)
Starts the analysis of the tag, without knowing what tags follow it in the page. |
int |
doStartTag()
Handles exceptions, initialises state and calls doAnalyzedStartTag
FIXME some of the exception handling should not be here |
static TagData |
getAnalyzedTag()
|
static TagData |
getCurrentBodyTag()
|
static PageCache |
getPageCache(PageContext pageContext,
JspAnalyzer analyzer)
Static method to get the PageCache object for the current page. |
PageContext |
getPageContext()
|
String |
getPageTextInfo()
Prints the page data collected during analysis in readable format |
static TagData |
getRunningTag()
|
MultipleKey |
getTagKey()
Gets the key that identifies this makumba tag |
String |
getTagText()
Returns the declaration text of the tag parsed at analysis time |
static Stack<TagData> |
getThreadTagStack()
|
static void |
initializeThread()
|
protected boolean |
needPageCache()
Checks if the tag needs the page cache |
protected void |
onlyInt(String s,
String value)
|
void |
setTagDataAtAnalysis(TagData tagData)
|
void |
setTagKey(PageCache pageCache)
Sets tagKey to uniquely identify this tag. |
| Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
|---|
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String[] ATTRIBUTE_VALUES_TRUE_FALSE
public static final String TYPES
public static ThreadLocal<TagData> analyzedTag
public static ThreadLocal<TagData> runningTag
static ThreadLocal<Stack<TagData>> tagStack
public TagData tagData
public MultipleKey tagKey
| Constructor Detail |
|---|
public AnalysableTag()
| Method Detail |
|---|
public static TagData getRunningTag()
public static TagData getAnalyzedTag()
public static TagData getCurrentBodyTag()
public static void initializeThread()
public static Stack<TagData> getThreadTagStack()
public static PageCache getPageCache(PageContext pageContext,
JspAnalyzer analyzer)
pageContext - The PageContext object of the current pageanalyzer - the JSP analyzerpublic void setTagDataAtAnalysis(TagData tagData)
public void addTagText(StringBuffer sb)
sb - StringBuffer holding the tag textpublic String getTagText()
public PageContext getPageContext()
public void setTagKey(PageCache pageCache)
pageCache - The page cache for the current pagedoAnalyzedStartTag(org.makumba.analyser.PageCache),
doStartAnalyze(org.makumba.analyser.PageCache)public void doStartAnalyze(PageCache pageCache)
pageCache - The page cache for the current pagepublic void doEndAnalyze(PageCache pageCache)
pageCache - The page cache for the current pagepublic String getPageTextInfo()
public int doAnalyzedStartTag(PageCache pageCache)
throws LogicException,
JspException
pageCache - The page cache for the current page
LogicException
JspExceptiondoStartTag()
public int doAnalyzedEndTag(PageCache pageCache)
throws LogicException,
JspException
pageCache - The page cache for the current page
LogicException
JspExceptiondoEndTag()protected boolean needPageCache()
true if page cache is needed, false otherwise
public int doStartTag()
throws JspException
doAnalyzedStartTag
FIXME some of the exception handling should not be here
doStartTag in interface TagdoStartTag in class TagSupportJspException
public int doEndTag()
throws JspException
doEndTag in interface TagdoEndTag in class TagSupportJspExceptionprotected void doAnalyzedCleanup()
public MultipleKey getTagKey()
public boolean allowsIdenticalKey()
true if the tag is allowed to have the same key as others in the page, false
otherwisepublic boolean canHaveBody()
true if the tag is allowed to have a body, false
otherwise
protected void onlyInt(String s,
String value)
throws JspException
JspException
protected void checkValidAttributeValues(String attributeName,
String value,
String[] allowedAttributeValues)
throws ProgrammerError
ProgrammerError
|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||