Source Code Cross Referenced for NestedTag.java in  » Testing » mockrunner-0.4 » com » mockrunner » tag » 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 » Testing » mockrunner 0.4 » com.mockrunner.tag 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package com.mockrunner.tag;
002:
003:        import java.util.List;
004:        import java.util.Map;
005:
006:        import javax.servlet.jsp.JspException; //import javax.servlet.jsp.tagext.JspTag;
007:        import javax.servlet.jsp.tagext.TagSupport;
008:
009:        /**
010:         * <code>NestedTag</code> is used to simulate tags with static body
011:         * content and child tags. It can be used to test the interaction
012:         * of different tags. A <code>NestedTag</code> always wraps a real tag
013:         * class (the actual testee).
014:         * {@link TagTestModule} works with <code>NestedTag</code> instances 
015:         * internally. If you only want to test the ouptput of one single tag
016:         * without interaction with other tags, you do not have to care about
017:         * <code>NestedTag</code>. Use it, if you want to write sophisticated
018:         * tests of body tags. <code>NestedTag</code> instances are created using
019:         * {@link TagTestModule#createNestedTag}. You do not need to create them 
020:         * on your own in the tests.
021:         */
022:        public interface NestedTag {
023:            /**
024:             * Specify if the <code>release</code> method should be called
025:             * after processing the tag lifecycle. Defaults to <code>false</code>. 
026:             * It's the container behaviour to call <code>release</code> when the tag
027:             * goes back to the pool. It's usually not necessary in the tests
028:             * to call this method, because the tag instances are not pooled and 
029:             * reused during a test run.
030:             * This method sets the <code>doRelease</code> flag for this tag but
031:             * does not set the flag for child tags.
032:             * @param doRelease should release be called, default is <code>false</code>
033:             */
034:            public void setDoRelease(boolean doRelease);
035:
036:            /**
037:             * Specify if the <code>release</code> method should be called
038:             * after processing the tag lifecycle. Defaults to <code>false</code>. 
039:             * It's the container behaviour to call <code>release</code> when the tag
040:             * goes back to the pool. It's usually not necessary in the tests
041:             * to call this method, because the tag instances are not pooled and 
042:             * reused during a test run.
043:             * This method sets the <code>doRelease</code> flag for this
044:             * tag and all child tags recursively.
045:             * @param doRelease should release be called, default is <code>false</code>
046:             */
047:            public void setDoReleaseRecursive(boolean doRelease);
048:
049:            /**
050:             * Populates the attributes of the underlying tag. The setters
051:             * of the tag are called. Please note that child tags are not
052:             * populated.
053:             */
054:            public void populateAttributes();
055:
056:            /**
057:             * Performs the tag lifecycle. All <code>doBody</code> and <code>doTag</code> 
058:             * methods are called as  in the real web container. The evaluation of the body 
059:             * is simulated by performing the lifecycle recursively for all childs of the 
060:             * <code>NestedTag</code>. Calls <code>release</code> on the tag after
061:             * processing the tag lifecycle, if <code>doRelease</code> is <code>true</code> 
062:             * (use {@link #setDoRelease(boolean)}).
063:             * @return the result of the final <code>doEndTag</code> call
064:             */
065:            public int doLifecycle() throws JspException;
066:
067:            /**
068:             * Returns the wrapped tag (the testee).
069:             * @return the wrapped tag
070:             */
071:            public TagSupport getTag();
072:
073:            /**
074:             * Returns the wrapped tag (the testee).
075:             * @return the wrapped tag
076:             */
077:            //public JspTag getWrappedTag();
078:            /**
079:             * Removes all childs.
080:             */
081:            public void removeChilds();
082:
083:            /**
084:             * Returns the <code>List</code> of childs.
085:             * @return the <code>List</code> of childs
086:             */
087:            public List getChilds();
088:
089:            /**
090:             * Returns a child specified by its index.
091:             * @param index the index
092:             * @return the child
093:             */
094:            public Object getChild(int index);
095:
096:            /**
097:             * Adds a text child simulating static body content.
098:             * @param text the static text
099:             */
100:            public void addTextChild(String text);
101:
102:            /**
103:             * Adds a dynamic child simulating scriptlets and
104:             * EL expressions. Check out
105:             * {@link com.mockrunner.tag.TagUtil#evalBody(List, Object)}
106:             * for details about child handling.
107:             * @param child the dynamic child instance
108:             */
109:            public void addDynamicChild(DynamicChild child);
110:
111:            /**
112:             * Adds a tag child simulating nested tags.
113:             * The corresponding <code>NestedTag</code> will be created 
114:             * automatically wrapping the specified tag. An empty attribute 
115:             * <code>Map</code> will be used for the tag.
116:             * @param tag the tag class
117:             */
118:            public NestedTag addTagChild(Class tag);
119:
120:            /**
121:             * Adds a tag child simulating nested tags.
122:             * The corresponding <code>NestedTag</code> will be created 
123:             * automatically wrapping the specified tag. The attributes 
124:             * <code>Map</code>  contains the attributes of this tag 
125:             * (<i>propertyname</i> maps to <i>propertyvalue</i>).
126:             * @param tag the tag class
127:             * @param attributeMap the attribute map
128:             */
129:            public NestedTag addTagChild(Class tag, Map attributeMap);
130:
131:            /**
132:             * Adds a tag child simulating nested tags.
133:             * <code>NestedTag</code> will be created automatically
134:             * wrapping the specified tag. An empty attribute <code>Map</code> 
135:             * will be used for the tag.
136:             * @param tag the tag
137:             */
138:            public NestedTag addTagChild(TagSupport tag);
139:
140:            /**
141:             * Adds a tag child simulating nested tags.
142:             * The corresponding <code>NestedTag</code> will be created 
143:             * automatically wrapping the specified tag. The attributes 
144:             * <code>Map</code>  contains the attributes of this tag 
145:             * (<i>propertyname</i> maps to <i>propertyvalue</i>).
146:             * @param tag the tag
147:             * @param attributeMap the attribute map
148:             */
149:            public NestedTag addTagChild(TagSupport tag, Map attributeMap);
150:
151:            /**
152:             * Adds a tag child simulating nested tags.
153:             * <code>NestedTag</code> will be created automatically
154:             * wrapping the specified tag. An empty attribute <code>Map</code> 
155:             * will be used for the tag.
156:             * @param tag the tag
157:             */
158:            //public NestedTag addTagChild(JspTag tag);
159:            /**
160:             * Adds a tag child simulating nested tags.
161:             * The corresponding <code>NestedTag</code> will be created 
162:             * automatically wrapping the specified tag. The attributes 
163:             * <code>Map</code>  contains the attributes of this tag 
164:             * (<i>propertyname</i> maps to <i>propertyvalue</i>).
165:             * @param tag the tag
166:             * @param attributeMap the attribute map
167:             */
168:            //public NestedTag addTagChild(JspTag tag, Map attributeMap);
169:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.