2
* $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/tiles/DefinitionTagSupport.java,v 1.6 2004/04/24 06:37:00 rleland Exp $
4
* $Date: 2004/04/24 06:37:00 $
6
* Copyright 1999-2004 The Apache Software Foundation.
8
* Licensed under the Apache License, Version 2.0 (the "License");
9
* you may not use this file except in compliance with the License.
10
* You may obtain a copy of the License at
12
* http://www.apache.org/licenses/LICENSE-2.0
14
* Unless required by applicable law or agreed to in writing, software
15
* distributed under the License is distributed on an "AS IS" BASIS,
16
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
* See the License for the specific language governing permissions and
18
* limitations under the License.
20
package org.apache.struts.taglib.tiles;
22
import java.io.Serializable;
23
import javax.servlet.jsp.tagext.TagSupport;
26
* Common base class for tags dealing with Tiles definitions.
27
* This class defines properties used in Definition Tags.
28
* It also extends TagSupport.
30
public class DefinitionTagSupport extends TagSupport implements Serializable {
32
* Associated Controller type
34
protected String controllerType;
36
* Associated Controller name (classname or url)
38
protected String controllerName;
40
* Role associated to definition.
42
protected String role;
44
* Uri of page assoicated to this definition.
46
protected String page;
49
* Release class properties.
51
public void release() {
53
controllerType = null;
54
controllerName = null;
60
* Get controller type.
61
* Type can be 'classname', 'url'.
63
* @return Controller type.
65
public String getControllerType() {
66
return controllerType;
70
* Get controller name.
71
* Name denotes a fully qualified classname, or an url.
72
* Exact type can be specified with {@link #setControllerType}.
74
* @return Controller name.
76
public String getControllerName() {
77
return controllerName;
81
* Set associated controller type.
82
* Type denotes a fully qualified classname.
84
* @param controllerType Type of associated controller.
86
public void setControllerType(String controllerType) {
87
this.controllerType = controllerType;
91
* Set associated controller name.
92
* Name denotes a fully qualified classname, or an url.
93
* Exact type can be specified with {@link #setControllerType}.
95
* @param controller Controller classname or url.
97
public void setController(String controller) {
98
setControllerName(controller);
102
* Set associated controller name.
103
* Name denote a fully qualified classname, or an url.
104
* Exact type can be specified with setControllerType.
106
* @param controller Controller classname or url
108
public void setControllerName(String controller) {
109
this.controllerName = controller;
113
* Set associated controller name as an url, and controller
115
* Name must be an url (not checked).
116
* Convenience method.
118
* @param controller Controller url
120
public void setControllerUrl(String controller) {
121
setControllerName(controller);
122
setControllerType("url");
126
* Set associated controller name as a classtype and controller
127
* type as "classname".
128
* Name denotes a fully qualified classname.
129
* Convenience method.
131
* @param controller Controller classname.
133
public void setControllerClass(String controller) {
134
setControllerName(controller);
135
setControllerType("classname");
139
* Get associated role.
141
* @return Associated role.
143
public String getRole() {
148
* Set associated role.
150
* @param role Associated role.
152
public void setRole(String role) {
161
public void setPage(String page) {
170
public String getPage() {
180
public String getTemplate() {
188
* @param template Template.
190
public void setTemplate(String template) {
191
this.page = template;