001: /*
002: * Copyright (c) 1998-2008 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 com.caucho.jsp.cfg;
030:
031: import com.caucho.config.Config;
032: import com.caucho.jsp.JspParseException;
033: import com.caucho.vfs.PersistentDependency;
034:
035: import javax.servlet.jsp.tagext.TagAttributeInfo;
036: import javax.servlet.jsp.tagext.TagExtraInfo;
037: import javax.servlet.jsp.tagext.TagVariableInfo;
038: import javax.faces.component.UIComponent;
039: import java.util.ArrayList;
040:
041: /**
042: * Configuration for the taglib tag in the .tld
043: */
044: public class JsfTag extends TldTag {
045: private Class _componentClass;
046:
047: public void setComponentClass(Class cl) {
048: Config.validate(cl, UIComponent.class);
049:
050: _componentClass = cl;
051: }
052:
053: public Class getComponentClass() {
054: return _componentClass;
055: }
056:
057: /**
058: * Returns the dependency.
059: */
060: public ArrayList<PersistentDependency> getDependencyList() {
061: return getBaseTag().getDependencyList();
062: }
063:
064: /**
065: * Gets the tag class
066: */
067: @Override
068: public Class getTagClass() {
069: return getBaseTag().getTagClass();
070: }
071:
072: /**
073: * Gets the tag class
074: */
075: @Override
076: public String getTagClassName() {
077: return getBaseTag().getTagClassName();
078: }
079:
080: /**
081: * Gets the tei class
082: */
083: @Override
084: public String getTeiClassName() {
085: return getBaseTag().getTeiClassName();
086: }
087:
088: /**
089: * Gets the tei object
090: */
091: @Override
092: public TagExtraInfo getTagExtraInfo() {
093: return getBaseTag().getTagExtraInfo();
094: }
095:
096: /**
097: * Gets the body-content
098: */
099: @Override
100: public String getBodyContent() {
101: return getBaseTag().getBodyContent();
102: }
103:
104: /**
105: * Gets the display-name
106: */
107: @Override
108: public String getDisplayName() {
109: return getBaseTag().getDisplayName();
110: }
111:
112: /**
113: * Gets the info
114: */
115: @Override
116: public String getInfo() {
117: return getBaseTag().getInfo();
118: }
119:
120: /**
121: * Gets the description
122: */
123: @Override
124: public String getDescription() {
125: return getBaseTag().getDescription();
126: }
127:
128: /**
129: * Gets the variables
130: */
131: public ArrayList<TagVariableInfo> getVariableList() {
132: return getBaseTag().getVariableList();
133: }
134:
135: /**
136: * Returns the variables.
137: */
138: public TagVariableInfo[] getVariables() {
139: return getBaseTag().getVariables();
140: }
141:
142: /**
143: * Gets the attributes
144: */
145: public ArrayList getAttributeList() {
146: return getBaseTag().getAttributeList();
147: }
148:
149: /**
150: * Returns the attributes.
151: */
152: public TagAttributeInfo[] getAttributes() {
153: return getBaseTag().getAttributes();
154: }
155:
156: /**
157: * Returns the attributes.
158: */
159: public ArrayList getFragmentAttributes() {
160: return getBaseTag().getFragmentAttributes();
161: }
162:
163: /**
164: * Gets the dynamic-attributes
165: */
166: @Override
167: public boolean getDynamicAttributes() {
168: return getBaseTag().getDynamicAttributes();
169: }
170:
171: /**
172: * Gets the dynamic-attrisavesavebutes
173: */
174: @Override
175: public String getDynamicAttributeName() {
176: return getBaseTag().getDynamicAttributeName();
177: }
178:
179: /**
180: * validates.
181: */
182: public void validate() throws JspParseException {
183: getBaseTag().validate();
184: }
185:
186: public String toString() {
187: return "JsfTag[" + getName() + "]";
188: }
189: }
|