1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements.  See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License.  You may obtain a copy of the License at
8  *
9  *      http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */

17 package org.apache.tomcat.util.descriptor.tld;
18
19 import java.util.ArrayList;
20 import java.util.List;
21
22 import javax.servlet.jsp.tagext.TagAttributeInfo;
23 import javax.servlet.jsp.tagext.TagInfo;
24 import javax.servlet.jsp.tagext.TagVariableInfo;
25
26 /**
27  * Model of a tag define in a tag library descriptor.
28  * This represents the information as parsed from the XML but differs from
29  * TagInfo in that is does not provide a link back to the tag library that
30  * defined it.
31  */

32 public class TagXml {
33     private String name;
34     private String tagClass;
35     private String teiClass;
36     private String bodyContent = TagInfo.BODY_CONTENT_JSP;
37     private String displayName;
38     private String smallIcon;
39     private String largeIcon;
40     private String info;
41     private boolean dynamicAttributes;
42     private final List<TagAttributeInfo> attributes = new ArrayList<>();
43     private final List<TagVariableInfo> variables = new ArrayList<>();
44
45     public String getName() {
46         return name;
47     }
48
49     public void setName(String name) {
50         this.name = name;
51     }
52
53     public String getTagClass() {
54         return tagClass;
55     }
56
57     public void setTagClass(String tagClass) {
58         this.tagClass = tagClass;
59     }
60
61     public String getTeiClass() {
62         return teiClass;
63     }
64
65     public void setTeiClass(String teiClass) {
66         this.teiClass = teiClass;
67     }
68
69     public String getBodyContent() {
70         return bodyContent;
71     }
72
73     public void setBodyContent(String bodyContent) {
74         this.bodyContent = bodyContent;
75     }
76
77     public String getDisplayName() {
78         return displayName;
79     }
80
81     public void setDisplayName(String displayName) {
82         this.displayName = displayName;
83     }
84
85     public String getSmallIcon() {
86         return smallIcon;
87     }
88
89     public void setSmallIcon(String smallIcon) {
90         this.smallIcon = smallIcon;
91     }
92
93     public String getLargeIcon() {
94         return largeIcon;
95     }
96
97     public void setLargeIcon(String largeIcon) {
98         this.largeIcon = largeIcon;
99     }
100
101     public String getInfo() {
102         return info;
103     }
104
105     public void setInfo(String info) {
106         this.info = info;
107     }
108
109     public boolean hasDynamicAttributes() {
110         return dynamicAttributes;
111     }
112
113     public void setDynamicAttributes(boolean dynamicAttributes) {
114         this.dynamicAttributes = dynamicAttributes;
115     }
116
117     public List<TagAttributeInfo> getAttributes() {
118         return attributes;
119     }
120
121     public List<TagVariableInfo> getVariables() {
122         return variables;
123     }
124 }
125