Line | |
---|
1 | package org.greenstone.gsdl3.util;
|
---|
2 |
|
---|
3 | import java.util.Vector;
|
---|
4 | import org.greenstone.gsdl3.util.UserTermInfo;
|
---|
5 |
|
---|
6 | public class UserQueryResult{
|
---|
7 | /** the list of UserInfo */
|
---|
8 | public Vector users_=null;
|
---|
9 |
|
---|
10 | UserQueryResult(){
|
---|
11 | users_=new Vector();
|
---|
12 | }
|
---|
13 |
|
---|
14 | public void clear(){
|
---|
15 | users_.clear();
|
---|
16 | }
|
---|
17 |
|
---|
18 | public void addUserTerm(String username, String password, String groups, String accountstatus, String comment){
|
---|
19 | UserTermInfo ui=new UserTermInfo();
|
---|
20 | ui.username_=username;
|
---|
21 | ui.password_=password;
|
---|
22 | ui.groups_=groups;
|
---|
23 | ui.accountstatus_=accountstatus;
|
---|
24 | ui.comment_=comment;
|
---|
25 | users_.add(ui);
|
---|
26 | }
|
---|
27 |
|
---|
28 | public Vector getUserTerms(){
|
---|
29 | return users_;
|
---|
30 | }
|
---|
31 |
|
---|
32 | public String toString(){
|
---|
33 | String result="";
|
---|
34 | for (int i=0;i<users_.size();i++){
|
---|
35 | result +=((UserTermInfo)users_.elementAt(i)).toString()+", ";
|
---|
36 | }
|
---|
37 |
|
---|
38 | return result;
|
---|
39 | }
|
---|
40 |
|
---|
41 | public int getSize(){
|
---|
42 | return users_.size();
|
---|
43 | }
|
---|
44 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.