Author: remy.maucherat(a)jboss.com
Date: 2009-05-26 12:26:15 -0400 (Tue, 26 May 2009)
New Revision: 1065
Added:
trunk/java/org/apache/catalina/deploy/jsp/
trunk/java/org/apache/catalina/deploy/jsp/FunctionInfo.java
trunk/java/org/apache/catalina/deploy/jsp/TagAttributeInfo.java
trunk/java/org/apache/catalina/deploy/jsp/TagFileInfo.java
trunk/java/org/apache/catalina/deploy/jsp/TagInfo.java
trunk/java/org/apache/catalina/deploy/jsp/TagLibraryInfo.java
trunk/java/org/apache/catalina/deploy/jsp/TagVariableInfo.java
Log:
- Add the beans to handle parsing using the digester, derived from the ones in the spec.
Added: trunk/java/org/apache/catalina/deploy/jsp/FunctionInfo.java
===================================================================
--- trunk/java/org/apache/catalina/deploy/jsp/FunctionInfo.java
(rev 0)
+++ trunk/java/org/apache/catalina/deploy/jsp/FunctionInfo.java 2009-05-26 16:26:15 UTC
(rev 1065)
@@ -0,0 +1,45 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+*
http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package org.apache.catalina.deploy.jsp;
+
+public class FunctionInfo {
+
+ protected String name;
+ protected String functionClass;
+ protected String functionSignature;
+
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+ public String getFunctionClass() {
+ return functionClass;
+ }
+ public void setFunctionClass(String functionClass) {
+ this.functionClass = functionClass;
+ }
+ public String getFunctionSignature() {
+ return functionSignature;
+ }
+ public void setFunctionSignature(String functionSignature) {
+ this.functionSignature = functionSignature;
+ }
+
+}
Added: trunk/java/org/apache/catalina/deploy/jsp/TagAttributeInfo.java
===================================================================
--- trunk/java/org/apache/catalina/deploy/jsp/TagAttributeInfo.java
(rev 0)
+++ trunk/java/org/apache/catalina/deploy/jsp/TagAttributeInfo.java 2009-05-26 16:26:15
UTC (rev 1065)
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.catalina.deploy.jsp;
+
+public class TagAttributeInfo {
+ protected String name;
+ protected String type;
+ protected boolean reqTime;
+ protected boolean required;
+ /*
+ * private fields for JSP 2.0
+ */
+ protected boolean fragment;
+ /*
+ * private fields for JSP 2.1
+ */
+ protected String description;
+ protected boolean deferredValue;
+ protected boolean deferredMethod;
+ protected String expectedTypeName;
+ protected String methodSignature;
+
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+ public String getType() {
+ return type;
+ }
+ public void setType(String type) {
+ this.type = type;
+ }
+ public boolean isReqTime() {
+ return reqTime;
+ }
+ public void setReqTime(boolean reqTime) {
+ this.reqTime = reqTime;
+ }
+ public boolean isRequired() {
+ return required;
+ }
+ public void setRequired(boolean required) {
+ this.required = required;
+ }
+ public boolean isFragment() {
+ return fragment;
+ }
+ public void setFragment(boolean fragment) {
+ this.fragment = fragment;
+ }
+ public String getDescription() {
+ return description;
+ }
+ public void setDescription(String description) {
+ this.description = description;
+ }
+ public boolean isDeferredValue() {
+ return deferredValue;
+ }
+ public void setDeferredValue(boolean deferredValue) {
+ this.deferredValue = deferredValue;
+ }
+ public boolean isDeferredMethod() {
+ return deferredMethod;
+ }
+ public void setDeferredMethod(boolean deferredMethod) {
+ this.deferredMethod = deferredMethod;
+ }
+ public String getExpectedTypeName() {
+ return expectedTypeName;
+ }
+ public void setExpectedTypeName(String expectedTypeName) {
+ this.expectedTypeName = expectedTypeName;
+ }
+ public String getMethodSignature() {
+ return methodSignature;
+ }
+ public void setMethodSignature(String methodSignature) {
+ this.methodSignature = methodSignature;
+ }
+}
Added: trunk/java/org/apache/catalina/deploy/jsp/TagFileInfo.java
===================================================================
--- trunk/java/org/apache/catalina/deploy/jsp/TagFileInfo.java
(rev 0)
+++ trunk/java/org/apache/catalina/deploy/jsp/TagFileInfo.java 2009-05-26 16:26:15 UTC
(rev 1065)
@@ -0,0 +1,36 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+*
http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+
+package org.apache.catalina.deploy.jsp;
+
+public class TagFileInfo {
+ protected String name;
+ protected String path;
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+ public String getPath() {
+ return path;
+ }
+ public void setPath(String path) {
+ this.path = path;
+ }
+}
Added: trunk/java/org/apache/catalina/deploy/jsp/TagInfo.java
===================================================================
--- trunk/java/org/apache/catalina/deploy/jsp/TagInfo.java (rev
0)
+++ trunk/java/org/apache/catalina/deploy/jsp/TagInfo.java 2009-05-26 16:26:15 UTC (rev
1065)
@@ -0,0 +1,136 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+*
http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+
+package org.apache.catalina.deploy.jsp;
+
+import java.util.ArrayList;
+
+public class TagInfo {
+
+ /*
+ * private fields for 1.1 info
+ */
+ protected String tagName; // the name of the tag
+ protected String tagClassName;
+ protected String bodyContent;
+ protected String infoString;
+ protected String tagExtraInfo;
+ protected ArrayList<TagAttributeInfo> tagAttributeInfos = new
ArrayList<TagAttributeInfo>();
+
+ /*
+ * private fields for 1.2 info
+ */
+ protected String displayName;
+ protected String smallIcon;
+ protected String largeIcon;
+ protected ArrayList<TagVariableInfo> tagVariableInfos = new
ArrayList<TagVariableInfo>();
+
+ /*
+ * Additional private fields for 2.0 info
+ */
+ protected boolean dynamicAttributes;
+
+ public void addTagAttributeInfo(TagAttributeInfo tagAttributeInfo) {
+ tagAttributeInfos.add(tagAttributeInfo);
+ }
+
+ public TagAttributeInfo[] getTagAttributeInfos() {
+ return tagAttributeInfos.toArray(new TagAttributeInfo[0]);
+ }
+
+ public void addTagVariableInfo(TagVariableInfo tagVariableInfo) {
+ tagVariableInfos.add(tagVariableInfo);
+ }
+
+ public TagVariableInfo[] getTagVariableInfos() {
+ return tagVariableInfos.toArray(new TagVariableInfo[0]);
+ }
+
+ public String getTagName() {
+ return tagName;
+ }
+
+ public void setTagName(String tagName) {
+ this.tagName = tagName;
+ }
+
+ public String getTagClassName() {
+ return tagClassName;
+ }
+
+ public void setTagClassName(String tagClassName) {
+ this.tagClassName = tagClassName;
+ }
+
+ public String getBodyContent() {
+ return bodyContent;
+ }
+
+ public void setBodyContent(String bodyContent) {
+ this.bodyContent = bodyContent;
+ }
+
+ public String getInfoString() {
+ return infoString;
+ }
+
+ public void setInfoString(String infoString) {
+ this.infoString = infoString;
+ }
+
+ public String getTagExtraInfo() {
+ return tagExtraInfo;
+ }
+
+ public void setTagExtraInfo(String tagExtraInfo) {
+ this.tagExtraInfo = tagExtraInfo;
+ }
+
+ public String getDisplayName() {
+ return displayName;
+ }
+
+ public void setDisplayName(String displayName) {
+ this.displayName = displayName;
+ }
+
+ public String getSmallIcon() {
+ return smallIcon;
+ }
+
+ public void setSmallIcon(String smallIcon) {
+ this.smallIcon = smallIcon;
+ }
+
+ public String getLargeIcon() {
+ return largeIcon;
+ }
+
+ public void setLargeIcon(String largeIcon) {
+ this.largeIcon = largeIcon;
+ }
+
+ public boolean isDynamicAttributes() {
+ return dynamicAttributes;
+ }
+
+ public void setDynamicAttributes(boolean dynamicAttributes) {
+ this.dynamicAttributes = dynamicAttributes;
+ }
+
+}
Added: trunk/java/org/apache/catalina/deploy/jsp/TagLibraryInfo.java
===================================================================
--- trunk/java/org/apache/catalina/deploy/jsp/TagLibraryInfo.java
(rev 0)
+++ trunk/java/org/apache/catalina/deploy/jsp/TagLibraryInfo.java 2009-05-26 16:26:15 UTC
(rev 1065)
@@ -0,0 +1,167 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+*
http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package org.apache.catalina.deploy.jsp;
+
+import java.util.ArrayList;
+
+import javax.servlet.jsp.tagext.TagFileInfo;
+import javax.servlet.jsp.tagext.TagInfo;
+
+public class TagLibraryInfo {
+
+ // Protected fields
+
+ /**
+ * The prefix assigned to this taglib from the taglib directive.
+ */
+ protected String prefix;
+
+ /**
+ * The value of the uri attribute from the taglib directive for
+ * this library.
+ */
+ protected String uri;
+
+ /**
+ * An array describing the tags that are defined in this tag library.
+ */
+ protected ArrayList<TagInfo> tags = new ArrayList<TagInfo>();
+
+ /**
+ * An array describing the tag files that are defined in this tag library.
+ *
+ * @since 2.0
+ */
+ protected ArrayList<TagFileInfo> tagFiles = new
ArrayList<TagFileInfo>();
+
+ /**
+ * An array describing the functions that are defined in this tag library.
+ *
+ * @since 2.0
+ */
+ protected ArrayList<FunctionInfo> functionsTag = new
ArrayList<FunctionInfo>();
+
+ // Tag Library Data
+
+ /**
+ * The version of the tag library.
+ */
+ protected String tlibversion; // required
+
+ /**
+ * The version of the JSP specification this tag library is written to.
+ */
+ protected String jspversion; // required
+
+ /**
+ * The preferred short name (prefix) as indicated in the TLD.
+ */
+ protected String shortname; // required
+
+ /**
+ * The "reliable" URN indicated in the TLD.
+ */
+ protected String urn; // required
+
+ /**
+ * Information (documentation) for this TLD.
+ */
+ protected String info; // optional
+
+ public String getPrefix() {
+ return prefix;
+ }
+
+ public void setPrefix(String prefix) {
+ this.prefix = prefix;
+ }
+
+ public String getUri() {
+ return uri;
+ }
+
+ public void setUri(String uri) {
+ this.uri = uri;
+ }
+
+ public String getTlibversion() {
+ return tlibversion;
+ }
+
+ public void setTlibversion(String tlibversion) {
+ this.tlibversion = tlibversion;
+ }
+
+ public String getJspversion() {
+ return jspversion;
+ }
+
+ public void setJspversion(String jspversion) {
+ this.jspversion = jspversion;
+ }
+
+ public String getShortname() {
+ return shortname;
+ }
+
+ public void setShortname(String shortname) {
+ this.shortname = shortname;
+ }
+
+ public String getUrn() {
+ return urn;
+ }
+
+ public void setUrn(String urn) {
+ this.urn = urn;
+ }
+
+ public String getInfo() {
+ return info;
+ }
+
+ public void setInfo(String info) {
+ this.info = info;
+ }
+
+ public void addFunctionInfo(FunctionInfo functionInfo) {
+ functionsTag.add(functionInfo);
+ }
+
+ public FunctionInfo[] getFunctionInfos() {
+ return functionsTag.toArray(new FunctionInfo[0]);
+ }
+
+ public void addTagFileInfo(TagFileInfo tagFileInfo) {
+ tagFiles.add(tagFileInfo);
+ }
+
+ public TagFileInfo[] getTagFileInfos() {
+ return tagFiles.toArray(new TagFileInfo[0]);
+ }
+
+ public void addTagInfo(TagInfo tagInfo) {
+ tags.add(tagInfo);
+ }
+
+ public TagInfo[] getTags() {
+ return tags.toArray(new TagInfo[0]);
+ }
+
+
+}
Added: trunk/java/org/apache/catalina/deploy/jsp/TagVariableInfo.java
===================================================================
--- trunk/java/org/apache/catalina/deploy/jsp/TagVariableInfo.java
(rev 0)
+++ trunk/java/org/apache/catalina/deploy/jsp/TagVariableInfo.java 2009-05-26 16:26:15 UTC
(rev 1065)
@@ -0,0 +1,62 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+*
http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+
+package org.apache.catalina.deploy.jsp;
+
+public class TagVariableInfo {
+ /*
+ * private fields
+ */
+ protected String nameGiven; // <name-given>
+ protected String nameFromAttribute; // <name-from-attribute>
+ protected String className; // <class>
+ protected boolean declare; // <declare>
+ protected int scope; // <scope>
+
+ public String getNameGiven() {
+ return nameGiven;
+ }
+ public void setNameGiven(String nameGiven) {
+ this.nameGiven = nameGiven;
+ }
+ public String getNameFromAttribute() {
+ return nameFromAttribute;
+ }
+ public void setNameFromAttribute(String nameFromAttribute) {
+ this.nameFromAttribute = nameFromAttribute;
+ }
+ public String getClassName() {
+ return className;
+ }
+ public void setClassName(String className) {
+ this.className = className;
+ }
+ public boolean isDeclare() {
+ return declare;
+ }
+ public void setDeclare(boolean declare) {
+ this.declare = declare;
+ }
+ public int getScope() {
+ return scope;
+ }
+ public void setScope(int scope) {
+ this.scope = scope;
+ }
+
+}