01: /**
02: * Copyright 2006 Webmedia Group Ltd.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: **/package org.araneaframework.jsp.tag.fileimport;
16:
17: import java.io.Writer;
18: import javax.servlet.jsp.JspException;
19: import org.araneaframework.jsp.tag.BaseTag;
20:
21: /**
22: *
23: * @author "Toomas Römer" <toomas@webmedia.ee>
24: */
25: public abstract class BaseFileImportTag extends BaseTag {
26: protected String includeGroupName;
27: protected String includeFileName;
28:
29: /**
30: * @jsp.attribute
31: * type = "java.lang.String"
32: * required = "false"
33: * description = "The name of the group of files that should get included."
34: */
35: public void setGroup(String includeTemplate) throws JspException {
36: this .includeGroupName = (String) evaluate("includeTemplate",
37: includeTemplate, String.class);
38: }
39:
40: /**
41: * @jsp.attribute
42: * type = "java.lang.String"
43: * required = "false"
44: * description = "The name of the file that should get included."
45: */
46: public void setFile(String file) throws JspException {
47: this .includeFileName = (String) evaluate("file", file,
48: String.class);
49: }
50:
51: public int doEndTag(Writer out) throws Exception {
52: return EVAL_PAGE;
53: }
54:
55: protected abstract void writeContent(Writer out, String key)
56: throws Exception;
57: }
|