source: main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/UserQueryResult.java@ 25265

Last change on this file since 25265 was 25265, checked in by sjm84, 12 years ago

Added an email field

File size: 1.8 KB
Line 
1/*
2 * UserQueryResult.java
3 * Copyright (C) 2008 New Zealand Digital Library, http://www.nzdl.org
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 */
19package org.greenstone.gsdl3.util;
20
21import java.util.Vector;
22import org.greenstone.gsdl3.util.UserTermInfo;
23
24public class UserQueryResult
25{
26 /** the list of UserInfo */
27 public Vector<UserTermInfo> users = null;
28
29 UserQueryResult()
30 {
31 users = new Vector<UserTermInfo>();
32 }
33
34 public void clear()
35 {
36 users.clear();
37 }
38
39 public void addUserTerm(String username, String password, String groups, String accountstatus, String comment, String email)
40 {
41 UserTermInfo ui = new UserTermInfo();
42 ui.username = username;
43 ui.password = password;
44 ui.groups = groups;
45 ui.accountstatus = accountstatus;
46 ui.comment = comment;
47 ui.email = email;
48 users.add(ui);
49 }
50
51 public Vector<UserTermInfo> getUserTerms()
52 {
53 return users;
54 }
55
56 public String toString()
57 {
58 String result = "";
59 for (int i = 0; i < users.size(); i++)
60 {
61 result += ((UserTermInfo) users.elementAt(i)).toString() + ", ";
62 }
63
64 return result;
65 }
66
67 public int getSize()
68 {
69 return users.size();
70 }
71}
Note: See TracBrowser for help on using the repository browser.