Java Doc for TagScript.java in  » Library » Apache-commons-jelly-1.0-src » org » apache » commons » jelly » impl » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Library » Apache commons jelly 1.0 src » org.apache.commons.jelly.impl 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.commons.jelly.impl.TagScript

All known Subclasses:   org.apache.commons.jelly.impl.StaticTagScript,
TagScript
public class TagScript implements Script(Code)

TagScript is a Script that evaluates a custom tag.

Note that this class should be re-entrant and used concurrently by multiple threads.
author:
   James Strachan
version:
   $Revision: 165507 $


Field Summary
protected  Mapattributes
    

Constructor Summary
public  TagScript()
    
public  TagScript(TagFactory tagFactory)
    

Method Summary
public  voidaddAttribute(String name, Expression expression)
     Add an initialization attribute for the tag.
protected  voidapplyLocation(LocationAware locationAware)
    
public  Scriptcompile()
    
protected  voidconfigureTag(Tag tag, JellyContext context)
     Compiles a newly created tag if required, sets its parent and body.
protected  ObjectconvertType(Object value, Class requiredType)
     Converts the given value to the required type.
Parameters:
  value - is the value to be converted.
protected  JellyExceptioncreateJellyException(String reason)
    
protected  JellyExceptioncreateJellyException(String reason, Exception cause)
    
protected  TagcreateTag()
     Factory method to create a new Tag instance.
protected  voidendNamespacePrefixes(XMLOutput output)
    
public  intgetColumnNumber()
    
public  StringgetElementName()
    
public  StringgetFileName()
    
public  intgetLineNumber()
    
public  StringgetLocalName()
    
public synchronized  MapgetNamespaceContext()
     Returns the namespace context of this tag.
public  TagScriptgetParent()
     Returns the parent.
public  AttributesgetSaxAttributes()
    
public  TaggetTag(JellyContext context)
    
public  ScriptgetTagBody()
     Returns the tagBody.
public  TagFactorygetTagFactory()
     Returns the Factory of Tag instances.
protected  voidhandleException(JellyTagException e)
     A helper method to handle this Jelly exception.
protected  voidhandleException(JellyException e)
     A helper method to handle this Jelly exception.
protected  voidhandleException(Exception e)
     A helper method to handle this non-Jelly exception.
protected  voidhandleException(Error e)
     A helper method to handle this non-Jelly exception.
public static  TagScriptnewInstance(Class tagClass)
    
public  voidrun(JellyContext context, XMLOutput output)
    
public  voidsetColumnNumber(int columnNumber)
    
protected  voidsetContextURLs(JellyContext context)
    
public  voidsetElementName(String elementName)
    
public  voidsetFileName(String fileName)
    
public  voidsetLineNumber(int lineNumber)
    
public  voidsetLocalName(String localName)
     Sets the local, non namespaced name of this tag.
public  voidsetLocator(Locator locator)
    
public  voidsetParent(TagScript parent)
     Sets the parent.
public  voidsetSaxAttributes(Attributes saxAttributes)
    
protected  voidsetTag(Tag tag, JellyContext context)
    
public  voidsetTagBody(Script tagBody)
     Sets the tagBody.
public  voidsetTagFactory(TagFactory tagFactory)
     Sets the Factory of Tag instances.
public  voidsetTagNamespacesMap(Map tagNamespacesMap)
    
protected  voidstartNamespacePrefixes(XMLOutput output)
    
public  StringtoString()
    

Field Detail
attributes
protected Map attributes(Code)
The attribute expressions that are created




Constructor Detail
TagScript
public TagScript()(Code)



TagScript
public TagScript(TagFactory tagFactory)(Code)




Method Detail
addAttribute
public void addAttribute(String name, Expression expression)(Code)
Add an initialization attribute for the tag. This method must be called after the setTag() method



applyLocation
protected void applyLocation(LocationAware locationAware)(Code)



compile
public Script compile() throws JellyException(Code)
Compiles the tags body



configureTag
protected void configureTag(Tag tag, JellyContext context) throws JellyException(Code)
Compiles a newly created tag if required, sets its parent and body.



convertType
protected Object convertType(Object value, Class requiredType) throws JellyException(Code)
Converts the given value to the required type.
Parameters:
  value - is the value to be converted. This will not be null
Parameters:
  requiredType - the type that the value should be converted to



createJellyException
protected JellyException createJellyException(String reason)(Code)
Creates a new Jelly exception, adorning it with location information



createJellyException
protected JellyException createJellyException(String reason, Exception cause)(Code)
Creates a new Jelly exception, adorning it with location information



createTag
protected Tag createTag() throws JellyException(Code)
Factory method to create a new Tag instance. The default implementation is to delegate to the TagFactory



endNamespacePrefixes
protected void endNamespacePrefixes(XMLOutput output) throws SAXException(Code)
End the new namespace prefixes mapped for the current element



getColumnNumber
public int getColumnNumber()(Code)
the column number of the tag



getElementName
public String getElementName()(Code)
the element name which caused the problem



getFileName
public String getFileName()(Code)
the Jelly file which caused the problem



getLineNumber
public int getLineNumber()(Code)
the line number of the tag



getLocalName
public String getLocalName()(Code)
Returns the local, non namespaced XML name of this tag String



getNamespaceContext
public synchronized Map getNamespaceContext()(Code)
Returns the namespace context of this tag. This is all the prefixes in scope in the document where this tag is used which are mapped to their namespace URIs. a Map with the keys are namespace prefixes and the values arenamespace URIs.



getParent
public TagScript getParent()(Code)
Returns the parent. TagScript



getSaxAttributes
public Attributes getSaxAttributes()(Code)
Returns the SAX attributes of this tag Attributes



getTag
public Tag getTag(JellyContext context) throws JellyException(Code)
the tag to be evaluated, creating it lazily if required.



getTagBody
public Script getTagBody()(Code)
Returns the tagBody. Script



getTagFactory
public TagFactory getTagFactory()(Code)
Returns the Factory of Tag instances. the factory



handleException
protected void handleException(JellyTagException e) throws JellyTagException(Code)
A helper method to handle this Jelly exception. This method adorns the JellyException with location information such as adding line number information etc.



handleException
protected void handleException(JellyException e) throws JellyTagException(Code)
A helper method to handle this Jelly exception. This method adorns the JellyException with location information such as adding line number information etc.



handleException
protected void handleException(Exception e) throws JellyTagException(Code)
A helper method to handle this non-Jelly exception. This method will rethrow the exception, wrapped in a JellyException while adding line number information etc.



handleException
protected void handleException(Error e) throws Error, JellyTagException(Code)
A helper method to handle this non-Jelly exception. This method will rethrow the exception, wrapped in a JellyException while adding line number information etc. Is this method wise?



newInstance
public static TagScript newInstance(Class tagClass)(Code)
a new TagScript based on whetherthe given Tag class is a bean tag or DynaTag



run
public void run(JellyContext context, XMLOutput output) throws JellyTagException(Code)
Evaluates the body of a tag



setColumnNumber
public void setColumnNumber(int columnNumber)(Code)
Sets the column number of the tag



setContextURLs
protected void setContextURLs(JellyContext context) throws JellyTagException(Code)
Set the context's root and current URL if not present
Parameters:
  context -
throws:
  JellyTagException -



setElementName
public void setElementName(String elementName)(Code)
Sets the element name which caused the problem



setFileName
public void setFileName(String fileName)(Code)
Sets the Jelly file which caused the problem



setLineNumber
public void setLineNumber(int lineNumber)(Code)
Sets the line number of the tag



setLocalName
public void setLocalName(String localName)(Code)
Sets the local, non namespaced name of this tag.
Parameters:
  localName - The localName to set



setLocator
public void setLocator(Locator locator)(Code)
Configures this TagScript from the SAX Locator, setting the column and line numbers



setParent
public void setParent(TagScript parent)(Code)
Sets the parent.
Parameters:
  parent - The parent to set



setSaxAttributes
public void setSaxAttributes(Attributes saxAttributes)(Code)
Sets the SAX attributes of this tag
Parameters:
  saxAttributes - The saxAttributes to set



setTag
protected void setTag(Tag tag, JellyContext context)(Code)
Allows the script to set the tag instance to be used, such as in a StaticTagScript when a StaticTag is switched with a DynamicTag



setTagBody
public void setTagBody(Script tagBody)(Code)
Sets the tagBody.
Parameters:
  tagBody - The tagBody to set



setTagFactory
public void setTagFactory(TagFactory tagFactory)(Code)
Sets the Factory of Tag instances.
Parameters:
  tagFactory - The factory to set



setTagNamespacesMap
public void setTagNamespacesMap(Map tagNamespacesMap)(Code)
Sets the optional namespaces prefix -> URI map of the namespaces attached to this Tag



startNamespacePrefixes
protected void startNamespacePrefixes(XMLOutput output) throws SAXException(Code)
Output the new namespace prefixes used for this element



toString
public String toString()(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.