Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
AuthorizationResult |
|
| 1.0;1 |
1 | /* | |
2 | * Copyright 2007-2009 The Kuali Foundation | |
3 | * | |
4 | * Licensed under the Educational Community License, Version 2.0 (the "License"); | |
5 | * you may not use this file except in compliance with the License. | |
6 | * You may obtain a copy of the License at | |
7 | * | |
8 | * http://www.opensource.org/licenses/ecl2.php | |
9 | * | |
10 | * Unless required by applicable law or agreed to in writing, software | |
11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
13 | * See the License for the specific language governing permissions and | |
14 | * limitations under the License. | |
15 | */ | |
16 | package org.kuali.rice.kew.web; | |
17 | ||
18 | import java.util.ArrayList; | |
19 | import java.util.List; | |
20 | ||
21 | public class AuthorizationResult { | |
22 | ||
23 | private boolean authorized; | |
24 | private List<String> messages; | |
25 | ||
26 | 0 | public AuthorizationResult(boolean authorized, List<String> messages) { |
27 | 0 | this.authorized = authorized; |
28 | 0 | this.messages = messages; |
29 | 0 | } |
30 | ||
31 | public AuthorizationResult(boolean authorized) { | |
32 | 0 | this(authorized, new ArrayList<String>()); |
33 | 0 | } |
34 | ||
35 | public AuthorizationResult(boolean authorized, String message) { | |
36 | 0 | this(authorized); |
37 | 0 | getMessages().add(message); |
38 | 0 | } |
39 | ||
40 | public boolean isAuthorized() { | |
41 | 0 | return authorized; |
42 | } | |
43 | ||
44 | public List<String> getMessages() { | |
45 | 0 | return messages; |
46 | } | |
47 | ||
48 | } |