Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
BooleanMessageImpl |
|
| 1.0;1 |
1 | /** | |
2 | * Copyright 2010 The Kuali Foundation Licensed under the | |
3 | * Educational Community License, Version 2.0 (the "License"); you may | |
4 | * not use this file except in compliance with the License. You may | |
5 | * obtain a copy of the License at | |
6 | * | |
7 | * http://www.osedu.org/licenses/ECL-2.0 | |
8 | * | |
9 | * Unless required by applicable law or agreed to in writing, | |
10 | * software distributed under the License is distributed on an "AS IS" | |
11 | * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express | |
12 | * or implied. See the License for the specific language governing | |
13 | * permissions and limitations under the License. | |
14 | */ | |
15 | ||
16 | package org.kuali.student.common.messagebuilder.booleanmessage.ast; | |
17 | ||
18 | import org.kuali.student.common.messagebuilder.booleanmessage.BooleanMessage; | |
19 | ||
20 | public class BooleanMessageImpl implements BooleanMessage { | |
21 | private String messageId; | |
22 | private Boolean successful; | |
23 | private String message; | |
24 | ||
25 | /** | |
26 | * Constructs a new boolean message. | |
27 | * | |
28 | * @param messageId Message id | |
29 | * @param succesful Success or failure | |
30 | * @param message Success or failure message | |
31 | */ | |
32 | 136 | public BooleanMessageImpl(String messageId, Boolean successful, String message) { |
33 | 136 | this.messageId = messageId; |
34 | 136 | this.successful = successful; |
35 | 136 | this.message = message; |
36 | 136 | } |
37 | ||
38 | /** | |
39 | * Gets the message id. | |
40 | * | |
41 | * @return Message id | |
42 | */ | |
43 | public String getMessageId() { | |
44 | 128 | return this.messageId; |
45 | } | |
46 | ||
47 | /** | |
48 | * Returns whether the message is a success or failure. | |
49 | * | |
50 | * @return True if successful; otherwise false | |
51 | */ | |
52 | public Boolean isSuccesful() { | |
53 | 136 | return this.successful; |
54 | } | |
55 | ||
56 | /** | |
57 | * Returns either the success or failure message. | |
58 | * | |
59 | * @param Success or failure message | |
60 | */ | |
61 | public String getMessage() { | |
62 | 137 | return this.message; |
63 | } | |
64 | ||
65 | public String toString() { | |
66 | 0 | return "[messageId=" + this.messageId |
67 | + ", successful='" + this.successful | |
68 | + ", message='" + this.message | |
69 | + "']"; | |
70 | } | |
71 | } |