01: /*
02: * This program is free software; you can redistribute it and/or modify
03: * it under the terms of the GNU General Public License as published by
04: * the Free Software Foundation; either version 2 of the License, or
05: * (at your option) any later version.
06: *
07: * This program is distributed in the hope that it will be useful,
08: * but WITHOUT ANY WARRANTY; without even the implied warranty of
09: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10: * GNU Library General Public License for more details.
11: *
12: * You should have received a copy of the GNU General Public License
13: * along with this program; if not, write to the Free Software
14: * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
15: */
16: package web.layout;
17:
18: import dlog4j.util.StringUtils;
19:
20: /**
21: * 对应layout.xml中的一个page
22: * @author Winter Lau
23: */
24: public class Page {
25: String name;
26: String uri;
27: String param;
28:
29: public String getName() {
30: return name;
31: }
32:
33: public void setName(String name) {
34: this .name = name;
35: }
36:
37: public String getParam() {
38: return param;
39: }
40:
41: public void setParam(String param) {
42: this .param = param;
43: }
44:
45: public String getUri() {
46: return uri;
47: }
48:
49: public void setUri(String uri) {
50: this .uri = uri;
51: }
52:
53: public boolean equals(Object obj) {
54: if (this == obj)
55: return true;
56: if (obj instanceof Page) {
57: Page p = (Page) obj;
58: return StringUtils.equals(name, p.getName())
59: && StringUtils.equals(uri, p.getUri())
60: && StringUtils.equals(param, p.getParam());
61: }
62: return false;
63: }
64:
65: public String toString() {
66: StringBuffer sb = new StringBuffer();
67: sb.append("NAME:");
68: sb.append(name);
69: sb.append(",URI:");
70: sb.append(uri);
71: sb.append(",PARAM:");
72: sb.append(param);
73: return sb.toString();
74: }
75:
76: public Object clone() {
77: Page p = new Page();
78: p.setName(name);
79: p.setParam(param);
80: p.setUri(uri);
81: return p;
82: }
83: }
|