Source Code Cross Referenced for TagInfo.java in  » EJB-Server-resin-3.1.5 » jsdk » javax » servlet » jsp » tagext » 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 » EJB Server resin 3.1.5 » jsdk » javax.servlet.jsp.tagext 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright (c) 1998-2003 Caucho Technology -- all rights reserved
003:         *
004:         * This file is part of Resin(R) Open Source
005:         *
006:         * Each copy or derived work must preserve the copyright notice and this
007:         * notice unmodified.
008:         *
009:         * Resin Open Source is free software; you can redistribute it and/or modify
010:         * it under the terms of the GNU General Public License as published by
011:         * the Free Software Foundation; either version 2 of the License, or
012:         * (at your option) any later version.
013:         *
014:         * Resin Open Source is distributed in the hope that it will be useful,
015:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
016:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, or any warranty
017:         * of NON-INFRINGEMENT.  See the GNU General Public License for more
018:         * details.
019:         *
020:         * You should have received a copy of the GNU General Public License
021:         * along with Resin Open Source; if not, write to the
022:         *   Free SoftwareFoundation, Inc.
023:         *   59 Temple Place, Suite 330
024:         *   Boston, MA 02111-1307  USA
025:         *
026:         * @author Scott Ferguson
027:         */
028:
029:        package javax.servlet.jsp.tagext;
030:
031:        /**
032:         * Represents the tag information from the tld.  TagExtraInfo classes
033:         * can use this to help in validation or in variable creation.
034:         *
035:         * <code><pre>
036:         * &lt;tag>
037:         *   &lt;name>foo&lt;/name>
038:         *   &lt;tagclass>com.caucho.tags.FooTag&lt;/tagclass>
039:         *   &lt;teiclass>com.caucho.tags.FooTagInfo&lt;/teiclass>
040:         *   &lt;bodycontent>jsp&lt;/bodycontent>
041:         *
042:         *   &lt;attribute>
043:         *     ...
044:         *   &lt;/attribute>
045:         * &lt;/tag>
046:         * </pre></code>
047:         */
048:        public class TagInfo {
049:            /**
050:             * Constant for the "empty" body content
051:             */
052:            public static final String BODY_CONTENT_EMPTY = "empty";
053:            /**
054:             * Constant for standard "jsp" processed body content
055:             */
056:            public static final String BODY_CONTENT_JSP = "JSP";
057:            /**
058:             * Constant for tags which forbid scripts
059:             */
060:            public static final String BODY_CONTENT_SCRIPTLESS = "scriptless";
061:            /**
062:             * Constant for "tag-dependent" unprocessed verbatim body content
063:             */
064:            public static final String BODY_CONTENT_TAG_DEPENDENT = "tagdependent";
065:
066:            private String bodyContent;
067:            private String infoString;
068:            private String tagClassName;
069:            private TagExtraInfo tagExtraInfo;
070:            private TagLibraryInfo tagLibrary;
071:            private String tagName;
072:            private TagAttributeInfo[] attributeInfo;
073:            private String displayName;
074:            private String smallIcon;
075:            private String largeIcon;
076:            private TagVariableInfo[] tvi;
077:            private boolean dynamicAttributes;
078:
079:            /**
080:             * Constructor for TagInfo.  Created by the JSP engine at compile time
081:             * for the benefit of TagExtraInfo classes.
082:             *
083:             * @param tagName tag name
084:             * @param tagClassName the tag's class name
085:             * @param bodyContent description of the expected body contents
086:             * @param infoString informatino string of the tag
087:             * @param taglib pointer to the TagLibraryInfo
088:             * @param tagExtraInfo the tag's custom TagExtraInfo.
089:             * @param tagAttributeInfo information about the tags attribute from the tld.
090:             */
091:            public TagInfo(String tagName, String tagClassName,
092:                    String bodyContent, String infoString,
093:                    TagLibraryInfo taglib, TagExtraInfo tagExtraInfo,
094:                    TagAttributeInfo[] attributeInfo) {
095:                this .tagName = tagName;
096:                this .tagClassName = tagClassName;
097:                this .bodyContent = bodyContent;
098:                this .infoString = infoString;
099:                this .tagLibrary = taglib;
100:                this .tagExtraInfo = tagExtraInfo;
101:                this .attributeInfo = attributeInfo;
102:
103:                if (tagExtraInfo != null)
104:                    tagExtraInfo.setTagInfo(this );
105:            }
106:
107:            /**
108:             * Constructor for TagInfo.  Created by the JSP engine at compile time
109:             * for the benefit of TagExtraInfo classes.
110:             *
111:             * @param tagName tag name
112:             * @param tagClassName the tag's class name
113:             * @param bodyContent description of the expected body contents
114:             * @param infoString informatino string of the tag
115:             * @param taglib pointer to the TagLibraryInfo
116:             * @param tagExtraInfo the tag's custom TagExtraInfo.
117:             * @param tagAttributeInfo information about the tags attribute from the tld.
118:             * @param displayName the GUI builder's display name
119:             * @param smallIcon small icon for a GUI builder
120:             * @param largeIcon large icon for a GUI builder
121:             * @param tvi variable info in the tld
122:             */
123:            public TagInfo(String tagName, String tagClassName,
124:                    String bodyContent, String infoString,
125:                    TagLibraryInfo taglib, TagExtraInfo tagExtraInfo,
126:                    TagAttributeInfo[] attributeInfo, String displayName,
127:                    String smallIcon, String largeIcon, TagVariableInfo[] tvi) {
128:                this (tagName, tagClassName, bodyContent, infoString, taglib,
129:                        tagExtraInfo, attributeInfo);
130:
131:                this .displayName = displayName;
132:                this .smallIcon = smallIcon;
133:                this .largeIcon = largeIcon;
134:                this .tvi = tvi;
135:            }
136:
137:            /**
138:             * Constructor for TagInfo.  Created by the JSP engine at compile time
139:             * for the benefit of TagExtraInfo classes.
140:             *
141:             * @param tagName tag name
142:             * @param tagClassName the tag's class name
143:             * @param bodyContent description of the expected body contents
144:             * @param infoString informatino string of the tag
145:             * @param taglib pointer to the TagLibraryInfo
146:             * @param tagExtraInfo the tag's custom TagExtraInfo.
147:             * @param tagAttributeInfo information about the tags attribute from the tld.
148:             * @param displayName the GUI builder's display name
149:             * @param smallIcon small icon for a GUI builder
150:             * @param largeIcon large icon for a GUI builder
151:             * @param tvi variable info in the tld
152:             */
153:            public TagInfo(String tagName, String tagClassName,
154:                    String bodyContent, String infoString,
155:                    TagLibraryInfo taglib, TagExtraInfo tagExtraInfo,
156:                    TagAttributeInfo[] attributeInfo, String displayName,
157:                    String smallIcon, String largeIcon, TagVariableInfo[] tvi,
158:                    boolean dynamicAttributes) {
159:                this (tagName, tagClassName, bodyContent, infoString, taglib,
160:                        tagExtraInfo, attributeInfo, displayName, smallIcon,
161:                        largeIcon, tvi);
162:
163:                this .dynamicAttributes = dynamicAttributes;
164:            }
165:
166:            /**
167:             * Returns the tag's name.
168:             */
169:            public String getTagName() {
170:                return this .tagName;
171:            }
172:
173:            /**
174:             * Returns the tag's infomation string.
175:             */
176:            public String getInfoString() {
177:                return this .infoString;
178:            }
179:
180:            /**
181:             * Returns the tag's class name.
182:             */
183:            public String getTagClassName() {
184:                return this .tagClassName;
185:            }
186:
187:            /**
188:             * Returns the body content type.
189:             *
190:             * <ul>
191:             * <li>empty - the tag must be empty
192:             * <li>jsp - the body is processed as normal jsp
193:             * <li>tag-dependent - the body copied as verbatim text.
194:             * </ul>
195:             */
196:            public String getBodyContent() {
197:                return this .bodyContent;
198:            }
199:
200:            /**
201:             * Returns the display name to be displayed by tools.
202:             */
203:            public String getDisplayName() {
204:                return this .displayName;
205:            }
206:
207:            /**
208:             * Returns the path to the large icon to be displayed by the tools.
209:             */
210:            public String getLargeIcon() {
211:                return this .largeIcon;
212:            }
213:
214:            /**
215:             * Returns the path to the small icon to be displayed by the tools.
216:             */
217:            public String getSmallIcon() {
218:                return this .smallIcon;
219:            }
220:
221:            /**
222:             * Returns information about the tags allowed attributes.
223:             */
224:            public TagAttributeInfo[] getAttributes() {
225:                return this .attributeInfo;
226:            }
227:
228:            /**
229:             * Returns the tag variable info in the tld
230:             */
231:            public TagVariableInfo[] getTagVariableInfos() {
232:                return this .tvi;
233:            }
234:
235:            /**
236:             * Information about the variables created by the tag at runtime.
237:             *
238:             * @param data information about the tag instance
239:             */
240:            public VariableInfo[] getVariableInfo(TagData data) {
241:                if (this .tagExtraInfo == null)
242:                    return null;
243:                else
244:                    return this .tagExtraInfo.getVariableInfo(data);
245:            }
246:
247:            /**
248:             * Retursn true if dynamic attributes are supported.
249:             */
250:            public boolean hasDynamicAttributes() {
251:                return this .dynamicAttributes;
252:            }
253:
254:            /**
255:             * Returns true if the tag instance is valid.
256:             *
257:             * @param data information about the tag instance
258:             */
259:            public boolean isValid(TagData data) {
260:                if (this .tagExtraInfo == null)
261:                    return true;
262:                else
263:                    return this .tagExtraInfo.isValid(data);
264:            }
265:
266:            /**
267:             * Returns the tag extra info for the tag.
268:             */
269:            public TagExtraInfo getTagExtraInfo() {
270:                return this .tagExtraInfo;
271:            }
272:
273:            /**
274:             * Sets the tag extra info for the tag.
275:             */
276:            public void setTagExtraInfo(TagExtraInfo tei) {
277:                this .tagExtraInfo = tei;
278:            }
279:
280:            /**
281:             * Returns the TagLibraryInfo for the tag.
282:             */
283:            public TagLibraryInfo getTagLibrary() {
284:                return this .tagLibrary;
285:            }
286:
287:            /**
288:             * Sets the TagLibraryInfo for the tag.
289:             */
290:            public void setTagLibrary(TagLibraryInfo info) {
291:                this .tagLibrary = info;
292:            }
293:
294:            /**
295:             * Validate attributes.
296:             */
297:            public ValidationMessage[] validate(TagData data) {
298:                if (this.tagExtraInfo == null)
299:                    return null;
300:                else
301:                    return this.tagExtraInfo.validate(data);
302:            }
303:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.