]> andersk Git - moira.git/blob - webmoira/mit/moira/ListInfo.java
Added WebMoira sources
[moira.git] / webmoira / mit / moira / ListInfo.java
1 package mit.moira;
2
3 import java.util.Date;
4 import java.text.SimpleDateFormat;
5
6 public class ListInfo {
7     String name;
8     boolean active;
9     boolean bpublic;
10     boolean hidden;
11     boolean maillist;
12     boolean grouplist;
13     String gid_original;
14     int gid;
15     String ace_type;
16     String ace_name;
17     String description;
18     Date modtime;
19     String moduser;
20     String modwith;
21     static final SimpleDateFormat df = new SimpleDateFormat("dd-MMM-yyyy HH:mm:ss");
22
23     public ListInfo(String name, String active, String spublic, String hidden, String maillist, String grouplist, String gid, String ace_type, String ace_name, String description, String modtime, String moduser, String modwith) throws MoiraException {
24         this.name = name;
25         this.active = (active.equals("1")) ? true : false;
26         this.bpublic = (spublic.equals("1")) ? true : false;
27         this.hidden = (hidden.equals("1")) ? true : false;
28         this.maillist = (maillist.equals("1")) ? true : false;
29         this.grouplist = (grouplist.equals("1")) ? true : false;
30         this.gid_original = gid;
31         try {
32             this.gid = Integer.parseInt(gid);
33         } catch (NumberFormatException e) {
34             this.gid = 0;
35         }
36         this.ace_type = ace_type;
37         this.ace_name = ace_name;
38         this.description = description;
39         try {
40             this.modtime = df.parse(modtime);
41         } catch (java.text.ParseException p) {
42             throw new MoiraException(p.getMessage());
43         }
44         this.moduser = moduser;
45         this.modwith = modwith;
46     }
47 }
48
This page took 0.043825 seconds and 5 git commands to generate.