1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.jetspeed.services.webpage;
18
19 /***
20 * Holds the relevant state about a secured site.
21 *
22 * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
23 * @version $Id: SecuredSite.java,v 1.2 2004/02/23 03:46:26 jford Exp $
24 */
25 public class SecuredSite implements Site
26 {
27
28
29
30 private long id;
31 private String url;
32 private String name;
33 private int status;
34 private String username;
35 private String password;
36
37 /***
38 * Construct site object given a url
39 *
40 * @param name the name of the site.
41 * @param url the url address of the site.
42 *
43 */
44 public SecuredSite(String name, String url)
45 {
46 this.id = WebPageHelper.generateId();
47 this.name = name;
48 this.url = url;
49 }
50
51 /***
52 * get the URL for this site
53 *
54 * return the string value of the URL
55 */
56 public String getURL()
57 {
58 return this.url;
59 }
60
61 /***
62 * get the Site ID for this site
63 *
64 * return the string value of the Site ID
65 */
66 public long getID()
67 {
68 return this.id;
69 }
70
71 /***
72 * sets the URL address for this site.
73 *
74 * @param the URL address of the site.
75 */
76 public void setURL(String url)
77 {
78 this.url = url;
79 }
80
81 /***
82 * get the common name for this site.
83 *
84 * return the string value of the site name.
85 */
86 public String getName()
87 {
88 return name;
89 }
90
91 /***
92 * sets the common name for this site.
93 *
94 * @param the name of the site.
95 */
96 public void setName(String name)
97 {
98 this.name = name;
99 }
100
101 /***
102 * get the user name used to logon to this site.
103 *
104 * return the string value of the site user name.
105 */
106 public String getUserName()
107 {
108 return username;
109 }
110
111 /***
112 * sets the user name used to logon to this site.
113 *
114 * @param the string value of the site user name.
115 */
116 public void setUserName(String username)
117 {
118 this.username = username;
119 }
120
121 /***
122 * get the password used to logon to this site.
123 *
124 * return the string value of the site password.
125 */
126 public String getPassword()
127 {
128 return password;
129 }
130
131 /***
132 * sets the password used to logon to this site.
133 *
134 * @param the string value of the site password.
135 */
136 public void setPassword(String password)
137 {
138 this.password = password;
139 }
140
141 /***
142 * get the availability status of this site.
143 *
144 * return the int value of the site availability status.
145 */
146 public int getStatus()
147 {
148 return status;
149 }
150
151 /***
152 * sets the availability status of this site.
153 *
154 * @param the int value of the site availability status.
155 */
156 public void setStatus(int status)
157 {
158 this.status = status;
159 }
160
161
162
163
164
165
166 public boolean isSecured()
167 {
168 return true;
169 }
170
171 }