Changeset 8888 for trunk/gsdl3/packages/gsdl-as/src/org/greenstone/gsdlas/profiles/Subscription.java
- Timestamp:
- 2005-01-12T11:39:22+13:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/packages/gsdl-as/src/org/greenstone/gsdlas/profiles/Subscription.java
r8875 r8888 188 188 189 189 public String toString() { 190 return "Subscription id " + id + ": " + map; 190 StringBuffer result = new StringBuffer("Subscription "); 191 result.append(name != null ? name : "(no name) "); 192 result.append(" (id "); 193 result.append(id); 194 result.append("):\n"); 195 for (Iterator iter = map.keySet().iterator(); iter.hasNext();) { 196 String key = (String) iter.next(); 197 Object value = map.get(key); 198 if (value instanceof Predicate) { 199 Predicate pred = (Predicate) value; 200 result.append(pred); 201 } 202 if (value instanceof List) { 203 List list = (List) value; 204 for (Iterator iterator = list.iterator(); iterator.hasNext();) { 205 Predicate pred = (Predicate) iterator.next(); 206 result.append(pred); 207 if (iterator.hasNext()) { 208 result.append(" or "); 209 } 210 } 211 } 212 result.append("\n"); 213 } 214 return result.toString(); 191 215 } 192 216 … … 255 279 return id; 256 280 } 281 282 /** 283 * @return 284 */ 285 public boolean wantsEMailNotification() { 286 return email != null && email.length() > 1; 287 } 288 289 /** 290 * @return 291 */ 292 public String getMailAddress() { 293 return email; 294 } 295 296 public String getName() { 297 return name; 298 } 257 299 258 300 }
Note:
See TracChangeset
for help on using the changeset viewer.