1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 package org.astrogrid.community.common.policy.data ;
26
27 public class PolicyCredentials
28 {
29 /***
30 * Status code for valid credentials.
31 *
32 */
33 public static final int STATUS_VALID = 0xFF ;
34
35 /***
36 * Status code for credentials unchecked.
37 *
38 */
39 public static final int STATUS_NOT_KNOWN = 0x00 ;
40
41 /***
42 * Status code for credentials invalid.
43 *
44 */
45 public static final int STATUS_NOT_VALID = 0x01 ;
46
47 /***
48 * Public constructor.
49 *
50 */
51 public PolicyCredentials()
52 {
53 this(null, null) ;
54 }
55
56 /***
57 * Public constructor.
58 *
59 */
60 public PolicyCredentials(String account, String group)
61 {
62 this.group = group ;
63 this.account = account ;
64 this.status = STATUS_NOT_KNOWN ;
65 }
66
67 /***
68 * Our Account ident.
69 *
70 */
71 private String account ;
72
73 /***
74 * Access to our Account ident.
75 *
76 */
77 public String getAccount()
78 {
79 return this.account ;
80 }
81
82 /***
83 * Access to our Account ident.
84 *
85 */
86 public void setAccount(String value)
87 {
88 this.account = value ;
89 }
90
91 /***
92 * Our Group ident.
93 *
94 */
95 private String group ;
96
97 /***
98 * Access to our Group ident.
99 *
100 */
101 public String getGroup()
102 {
103 return this.group ;
104 }
105
106 /***
107 * Access to our Group ident.
108 *
109 */
110 public void setGroup(String value)
111 {
112 this.group = value ;
113 }
114
115 /***
116 * The status value.
117 *
118 */
119 private int status ;
120
121 /***
122 * Access to the status.
123 *
124 */
125 public int getStatus()
126 {
127 return this.status ;
128 }
129
130 /***
131 * Access to the status.
132 *
133 */
134 public void setStatus(int value)
135 {
136 this.status = value ;
137 }
138
139 /***
140 * Access to the status.
141 *
142 */
143 public boolean isValid()
144 {
145 return (STATUS_VALID == this.status) ;
146 }
147
148 /***
149 * The status reason, explains why.
150 *
151 */
152 private String reason ;
153
154 /***
155 * Access to the reason.
156 *
157 */
158 public String getReason()
159 {
160 return this.reason ;
161 }
162
163 /***
164 * Access to the reason.
165 *
166 */
167 public void setReason(String value)
168 {
169 this.reason = value ;
170 }
171 }