1 /*
2 * The MIT License
3 * Copyright © 2004-2014 Fabrizio Giustina
4 * Copyright © 2022-2022 Web-Legacy
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights
9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 * copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 * THE SOFTWARE.
23 */
24 package net.sf.maventaglib;
25
26 import java.io.File;
27 import java.io.Serializable;
28
29 import org.apache.commons.lang3.builder.ToStringBuilder;
30 import org.apache.commons.lang3.builder.ToStringStyle;
31 import org.apache.maven.plugins.annotations.Parameter;
32
33
34 /**
35 * @author fgiust
36 * @version $Id: Taglib.java 217 2014-08-15 20:50:32Z fgiust $
37 */
38 public class Taglib implements Serializable
39 {
40 private static final long serialVersionUID = -1130286008090091787L;
41
42 /**
43 * Function classes for generating EL functions
44 */
45 @Parameter
46 private String[] functionClasses;
47
48 /**
49 * Directories containing tag files
50 */
51 @Parameter
52 private File tagdir;
53
54 /**
55 * Taglib description
56 */
57 @Parameter
58 private String description;
59
60 /**
61 * Taglib shortName
62 */
63 @Parameter
64 private String shortName;
65
66 /**
67 * Taglib uri
68 */
69 @Parameter
70 private String uri;
71
72 /**
73 * File name
74 */
75 @Parameter
76 private String outputname;
77
78 /**
79 * Returns the functionClasses.
80 * @return the functionClasses
81 */
82 public String[] getFunctionClasses()
83 {
84 return functionClasses;
85 }
86
87 /**
88 * Sets the functionClasses.
89 * @param functionClasses the functionClasses to set
90 */
91 public void setFunctionClasses(String[] functionClasses)
92 {
93 this.functionClasses = functionClasses;
94 }
95
96 /**
97 * Returns the description.
98 * @return the description
99 */
100 public String getDescription()
101 {
102 return description;
103 }
104
105 /**
106 * Sets the description.
107 * @param description the description to set
108 */
109 public void setDescription(String description)
110 {
111 this.description = description;
112 }
113
114 /**
115 * Returns the shortName.
116 * @return the shortName
117 */
118 public String getShortName()
119 {
120 return shortName;
121 }
122
123 /**
124 * Sets the shortName.
125 * @param shortName the shortName to set
126 */
127 public void setShortName(String shortName)
128 {
129 this.shortName = shortName;
130 }
131
132 /**
133 * Returns the uri.
134 * @return the uri
135 */
136 public String getUri()
137 {
138 return uri;
139 }
140
141 /**
142 * Sets the uri.
143 * @param uri the uri to set
144 */
145 public void setUri(String uri)
146 {
147 this.uri = uri;
148 }
149
150 /**
151 * Returns the outputname.
152 * @return the outputname
153 */
154 public String getOutputname()
155 {
156 return outputname;
157 }
158
159 /**
160 * Sets the outputname.
161 * @param outputname the outputname to set
162 */
163 public void setOutputname(String outputname)
164 {
165 this.outputname = outputname;
166 }
167
168 /**
169 * Returns the tagdir.
170 * @return the tagdir
171 */
172 public File getTagdir()
173 {
174 return tagdir;
175 }
176
177 /**
178 * Sets the tagdir.
179 * @param tagdir the tagdir to set
180 */
181 public void setTagdir(File tagdir)
182 {
183 this.tagdir = tagdir;
184 }
185
186 /**
187 * {@inheritDoc}
188 */
189 @Override
190 public String toString()
191 {
192 return new ToStringBuilder(this, ToStringStyle.SIMPLE_STYLE).append("description", this.description).append(
193 "tagdir",
194 this.tagdir).append("shortName", this.shortName).append("outputname", this.outputname).append(
195 "uri",
196 this.uri).append("functionClasses", this.functionClasses).toString();
197 }
198
199 }