1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.seasar.tuigwaa.security.auth;
17
18 /***
19 * @author someda
20 */
21 public class TgwRole extends TgwPrincipal {
22
23 private String description;
24 private String dn;
25 private String[] users;
26 private boolean admin = false;
27
28 public TgwRole(String name){
29 super(name);
30 }
31
32 public TgwRole(){
33 super();
34 }
35
36 public void setName(String name){
37 this.name = name;
38 }
39
40 public String getDescription() {
41 return description;
42 }
43
44 public void setDescription(String description) {
45 this.description = description;
46 }
47
48 public String getDn() {
49 return dn;
50 }
51
52 public void setDn(String dn) {
53 this.dn = dn;
54 }
55
56 public boolean isAdmin() {
57 return admin;
58 }
59
60 public void setAdmin(boolean admin) {
61 this.admin = admin;
62 }
63
64 public String[] getUsers() {
65 return users;
66 }
67
68 public void setUsers(String[] users) {
69 this.users = users;
70 }
71
72 public int hashCode(){
73 return getName().hashCode();
74 }
75
76 public boolean equals(Object o){
77 if(!(o instanceof TgwRole)) return false;
78 TgwRole obj = (TgwRole) o;
79
80 return obj.getName().equals(this.getName());
81 }
82 }