01: /**
02: * Copyright (C) 2006, 2007 David Bulmore, Software Sensation Inc.
03: * All Rights Reserved.
04: *
05: * This file is part of jWebApp.
06: *
07: * jWebApp is free software; you can redistribute it and/or modify it under
08: * the terms of the GNU General Public License (Version 2) as published by
09: * the Free Software Foundation.
10: *
11: * jWebApp is distributed in the hope that it will be useful, but WITHOUT
12: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14: * for more details.
15: *
16: * You should have received a copy of the GNU General Public License
17: * along with jWebApp; if not, write to the Free Software Foundation,
18: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19: */package jwebapp.controller;
20:
21: class UrlData {
22: private String id, protocol, url;
23: private boolean isRedirect, isRewrite;
24:
25: UrlData(String id, String url) {
26: this .id = id;
27: this .url = url;
28: this .isRewrite = true;
29: }
30:
31: UrlData(String id, String protocol, String url) {
32: this .id = id;
33: this .protocol = protocol;
34: this .url = url;
35: this .isRewrite = true;
36: }
37:
38: UrlData(String id, String protocol, String url, boolean isRedirect,
39: boolean isRewrite) {
40: this .id = id;
41: this .protocol = protocol;
42: this .url = url;
43: this .isRedirect = isRedirect;
44: this .isRewrite = isRewrite;
45: }
46:
47: String getId() {
48: return id;
49: }
50:
51: String getProtocol() {
52: return protocol;
53: }
54:
55: String getUrl() {
56: return url;
57: }
58:
59: boolean isForward() {
60: return !isRedirect;
61: }
62:
63: boolean isRedirect() {
64: return isRedirect;
65: }
66:
67: boolean isRewrite() {
68: return isRewrite;
69: }
70: }
|