javax.servlet.jsp.tagext
Class TagInfo

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagInfo
Direct Known Subclasses:
TagInfoExt, TempTagInfo

public class TagInfo
extends java.lang.Object

Represents the tag information from the tld. TagExtraInfo classes can use this to help in validation or in variable creation.

 <tag>
   <name>foo</name>
   <tagclass>com.caucho.tags.FooTag</tagclass>
   <teiclass>com.caucho.tags.FooTagInfo</teiclass>
   <bodycontent>jsp</bodycontent>

   <attribute>
     ...
   </attribute>
 </tag>
 


Field Summary
static java.lang.String BODY_CONTENT_EMPTY
          Constant for the "empty" body content
static java.lang.String BODY_CONTENT_JSP
          Constant for standard "jsp" processed body content
static java.lang.String BODY_CONTENT_SCRIPTLESS
          Constant for tags which forbid scripts
static java.lang.String BODY_CONTENT_TAG_DEPENDENT
          Constant for "tag-dependent" unprocessed verbatim body content
 
Constructor Summary
TagInfo(java.lang.String tagName, java.lang.String tagClassName, java.lang.String bodyContent, java.lang.String infoString, TagLibraryInfo taglib, TagExtraInfo tagExtraInfo, TagAttributeInfo[] attributeInfo)
          Constructor for TagInfo.
TagInfo(java.lang.String tagName, java.lang.String tagClassName, java.lang.String bodyContent, java.lang.String infoString, TagLibraryInfo taglib, TagExtraInfo tagExtraInfo, TagAttributeInfo[] attributeInfo, java.lang.String displayName, java.lang.String smallIcon, java.lang.String largeIcon, TagVariableInfo[] tvi)
          Constructor for TagInfo.
TagInfo(java.lang.String tagName, java.lang.String tagClassName, java.lang.String bodyContent, java.lang.String infoString, TagLibraryInfo taglib, TagExtraInfo tagExtraInfo, TagAttributeInfo[] attributeInfo, java.lang.String displayName, java.lang.String smallIcon, java.lang.String largeIcon, TagVariableInfo[] tvi, boolean dynamicAttributes)
          Constructor for TagInfo.
 
Method Summary
 TagAttributeInfo[] getAttributes()
          Returns information about the tags allowed attributes.
 java.lang.String getBodyContent()
          Returns the body content type.
 java.lang.String getDisplayName()
          Returns the display name to be displayed by tools.
 java.lang.String getInfoString()
          Returns the tag's infomation string.
 java.lang.String getLargeIcon()
          Returns the path to the large icon to be displayed by the tools.
 java.lang.String getSmallIcon()
          Returns the path to the small icon to be displayed by the tools.
 java.lang.String getTagClassName()
          Returns the tag's class name.
 TagExtraInfo getTagExtraInfo()
          Returns the tag extra info for the tag.
 TagLibraryInfo getTagLibrary()
          Returns the TagLibraryInfo for the tag.
 java.lang.String getTagName()
          Returns the tag's name.
 TagVariableInfo[] getTagVariableInfos()
          Returns the tag variable info in the tld
 VariableInfo[] getVariableInfo(TagData data)
          Information about the variables created by the tag at runtime.
 boolean hasDynamicAttributes()
          Retursn true if dynamic attributes are supported.
 boolean isValid(TagData data)
          Returns true if the tag instance is valid.
 void setTagExtraInfo(TagExtraInfo tei)
          Sets the tag extra info for the tag.
 void setTagLibrary(TagLibraryInfo info)
          Sets the TagLibraryInfo for the tag.
 ValidationMessage[] validate(TagData data)
          Validate attributes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BODY_CONTENT_EMPTY

public static final java.lang.String BODY_CONTENT_EMPTY
Constant for the "empty" body content

See Also:
Constant Field Values

BODY_CONTENT_JSP

public static final java.lang.String BODY_CONTENT_JSP
Constant for standard "jsp" processed body content

See Also:
Constant Field Values

BODY_CONTENT_SCRIPTLESS

public static final java.lang.String BODY_CONTENT_SCRIPTLESS
Constant for tags which forbid scripts

See Also:
Constant Field Values

BODY_CONTENT_TAG_DEPENDENT

public static final java.lang.String BODY_CONTENT_TAG_DEPENDENT
Constant for "tag-dependent" unprocessed verbatim body content

See Also:
Constant Field Values
Constructor Detail

TagInfo

public TagInfo(java.lang.String tagName,
               java.lang.String tagClassName,
               java.lang.String bodyContent,
               java.lang.String infoString,
               TagLibraryInfo taglib,
               TagExtraInfo tagExtraInfo,
               TagAttributeInfo[] attributeInfo)
Constructor for TagInfo. Created by the JSP engine at compile time for the benefit of TagExtraInfo classes.

Parameters:
tagName - tag name
tagClassName - the tag's class name
bodyContent - description of the expected body contents
infoString - informatino string of the tag
taglib - pointer to the TagLibraryInfo
tagExtraInfo - the tag's custom TagExtraInfo.
tagAttributeInfo - information about the tags attribute from the tld.

TagInfo

public TagInfo(java.lang.String tagName,
               java.lang.String tagClassName,
               java.lang.String bodyContent,
               java.lang.String infoString,
               TagLibraryInfo taglib,
               TagExtraInfo tagExtraInfo,
               TagAttributeInfo[] attributeInfo,
               java.lang.String displayName,
               java.lang.String smallIcon,
               java.lang.String largeIcon,
               TagVariableInfo[] tvi)
Constructor for TagInfo. Created by the JSP engine at compile time for the benefit of TagExtraInfo classes.

Parameters:
tagName - tag name
tagClassName - the tag's class name
bodyContent - description of the expected body contents
infoString - informatino string of the tag
taglib - pointer to the TagLibraryInfo
tagExtraInfo - the tag's custom TagExtraInfo.
tagAttributeInfo - information about the tags attribute from the tld.
displayName - the GUI builder's display name
smallIcon - small icon for a GUI builder
largeIcon - large icon for a GUI builder
tvi - variable info in the tld

TagInfo

public TagInfo(java.lang.String tagName,
               java.lang.String tagClassName,
               java.lang.String bodyContent,
               java.lang.String infoString,
               TagLibraryInfo taglib,
               TagExtraInfo tagExtraInfo,
               TagAttributeInfo[] attributeInfo,
               java.lang.String displayName,
               java.lang.String smallIcon,
               java.lang.String largeIcon,
               TagVariableInfo[] tvi,
               boolean dynamicAttributes)
Constructor for TagInfo. Created by the JSP engine at compile time for the benefit of TagExtraInfo classes.

Parameters:
tagName - tag name
tagClassName - the tag's class name
bodyContent - description of the expected body contents
infoString - informatino string of the tag
taglib - pointer to the TagLibraryInfo
tagExtraInfo - the tag's custom TagExtraInfo.
tagAttributeInfo - information about the tags attribute from the tld.
displayName - the GUI builder's display name
smallIcon - small icon for a GUI builder
largeIcon - large icon for a GUI builder
tvi - variable info in the tld
Method Detail

getTagName

public java.lang.String getTagName()
Returns the tag's name.


getInfoString

public java.lang.String getInfoString()
Returns the tag's infomation string.


getTagClassName

public java.lang.String getTagClassName()
Returns the tag's class name.


getBodyContent

public java.lang.String getBodyContent()
Returns the body content type.


getDisplayName

public java.lang.String getDisplayName()
Returns the display name to be displayed by tools.


getLargeIcon

public java.lang.String getLargeIcon()
Returns the path to the large icon to be displayed by the tools.


getSmallIcon

public java.lang.String getSmallIcon()
Returns the path to the small icon to be displayed by the tools.


getAttributes

public TagAttributeInfo[] getAttributes()
Returns information about the tags allowed attributes.


getTagVariableInfos

public TagVariableInfo[] getTagVariableInfos()
Returns the tag variable info in the tld


getVariableInfo

public VariableInfo[] getVariableInfo(TagData data)
Information about the variables created by the tag at runtime.

Parameters:
data - information about the tag instance

hasDynamicAttributes

public boolean hasDynamicAttributes()
Retursn true if dynamic attributes are supported.


isValid

public boolean isValid(TagData data)
Returns true if the tag instance is valid.

Parameters:
data - information about the tag instance

getTagExtraInfo

public TagExtraInfo getTagExtraInfo()
Returns the tag extra info for the tag.


setTagExtraInfo

public void setTagExtraInfo(TagExtraInfo tei)
Sets the tag extra info for the tag.


getTagLibrary

public TagLibraryInfo getTagLibrary()
Returns the TagLibraryInfo for the tag.


setTagLibrary

public void setTagLibrary(TagLibraryInfo info)
Sets the TagLibraryInfo for the tag.


validate

public ValidationMessage[] validate(TagData data)
Validate attributes.