1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.astrogrid.community.common.policy.data ;
19
20 public class CommunityData
21 {
22 /***
23 * Public constructor.
24 *
25 */
26 public CommunityData()
27 {
28 this.ident = null ;
29 this.service = null ;
30 this.manager = null ;
31 this.description = null ;
32 }
33
34 /***
35 * Public constructor.
36 *
37 */
38 public CommunityData(String ident)
39 {
40 this(ident, null) ;
41 }
42
43 /***
44 * Public constructor.
45 *
46 */
47 public CommunityData(String ident, String description)
48 {
49 this.ident = ident ;
50 this.service = null ;
51 this.manager = null ;
52 this.description = description ;
53 }
54
55 /***
56 * Our Community ident.
57 *
58 */
59 private String ident ;
60
61 /***
62 * Access to our Community ident.
63 *
64 */
65 public String getIdent()
66 {
67 return this.ident ;
68 }
69
70 /***
71 * Access to our Community ident.
72 *
73 */
74 public void setIdent(String value)
75 {
76 this.ident = value ;
77 }
78
79 /***
80 * Our Community description.
81 *
82 */
83 private String description ;
84
85 /***
86 * Access to our Community description.
87 *
88 */
89 public String getDescription()
90 {
91 return this.description ;
92 }
93
94 /***
95 * Our service url.
96 *
97 */
98 private String service ;
99
100 /***
101 * Access to our service url.
102 *
103 */
104 public String getServiceUrl()
105 {
106 return this.service ;
107 }
108
109 /***
110 * Access to our Community url.
111 *
112 */
113 public void setServiceUrl(String value)
114 {
115 this.service = value ;
116 }
117
118 /***
119 * Our manager url.
120 *
121 */
122 private String manager ;
123
124 /***
125 * Access to our manager url.
126 *
127 */
128 public String getManagerUrl()
129 {
130 return this.manager ;
131 }
132
133 /***
134 * Access to our Community url.
135 *
136 */
137 public void setManagerUrl(String value)
138 {
139 this.manager = value ;
140 }
141
142 /***
143 * Our manager url.
144 *
145 */
146 private String authentication ;
147
148 /***
149 * Access to our manager url.
150 *
151 */
152 public String getAuthenticationUrl()
153 {
154 return this.authentication ;
155 }
156
157 /***
158 * Access to our Community url.
159 *
160 */
161 public void setAuthenticationUrl(String value)
162 {
163 this.authentication = value ;
164 }
165
166 /***
167 * Access to our Community description.
168 *
169 */
170 public void setDescription(String value)
171 {
172 this.description = value ;
173 }
174
175
176
177
178
179
180 public synchronized boolean equals(Object object)
181 {
182
183
184 if (null == object)
185 {
186 return false ;
187 }
188
189
190 else {
191
192
193 if (object instanceof CommunityData)
194 {
195 CommunityData that = (CommunityData) object ;
196
197
198 if (null == this.ident)
199 {
200
201
202 return (null == that.getIdent()) ;
203 }
204
205
206 else {
207
208
209 return (this.ident.equals(that.getIdent())) ;
210 }
211 }
212
213
214 else {
215 return false ;
216 }
217 }
218 }
219
220 /***
221 * Generate a hash code for comparison tests.
222 * Just uses the ident.hashCode().
223 *
224 */
225 public synchronized int hashCode()
226 {
227 return (null != this.ident) ? this.ident.hashCode() : 0 ;
228 }
229
230 }