Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
AuditError |
|
| 1.0;1 |
1 | /** | |
2 | * Copyright 2005-2011 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.kns.util; | |
17 | ||
18 | /** | |
19 | * KRA Audit Error class. | |
20 | * | |
21 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
22 | * | |
23 | */ | |
24 | public class AuditError { | |
25 | ||
26 | private String errorKey; | |
27 | private String messageKey; | |
28 | private String link; | |
29 | private String[] params; | |
30 | ||
31 | 0 | public AuditError(String errorKey, String messageKey, String link) { |
32 | 0 | this.setErrorKey(errorKey); |
33 | 0 | this.setMessageKey(messageKey); |
34 | 0 | this.setLink(link); |
35 | 0 | this.params = new String[5]; // bean:message takes up to 5 tokenized parameters |
36 | 0 | } |
37 | ||
38 | public AuditError(String errorKey, String messageKey, String link, String[] params) { | |
39 | 0 | this(errorKey, messageKey, link); |
40 | 0 | this.setParams(params); |
41 | 0 | } |
42 | ||
43 | /** | |
44 | * Gets the errorKey attribute. | |
45 | * | |
46 | * @return Returns the errorKey. | |
47 | */ | |
48 | public String getErrorKey() { | |
49 | 0 | return errorKey; |
50 | } | |
51 | ||
52 | /** | |
53 | * Sets the errorKey attribute value. | |
54 | * | |
55 | * @param errorKey The errorKey to set. | |
56 | */ | |
57 | public void setErrorKey(String errorKey) { | |
58 | 0 | this.errorKey = errorKey; |
59 | 0 | } |
60 | ||
61 | /** | |
62 | * Gets the link attribute. | |
63 | * | |
64 | * @return Returns the link. | |
65 | */ | |
66 | public String getLink() { | |
67 | 0 | return link; |
68 | } | |
69 | ||
70 | /** | |
71 | * Sets the link attribute value. | |
72 | * | |
73 | * @param link The link to set. | |
74 | */ | |
75 | public void setLink(String link) { | |
76 | 0 | this.link = link; |
77 | 0 | } |
78 | ||
79 | /** | |
80 | * Gets the key attribute. | |
81 | * | |
82 | * @return Returns the key. | |
83 | */ | |
84 | public String getMessageKey() { | |
85 | 0 | return messageKey; |
86 | } | |
87 | ||
88 | /** | |
89 | * Sets the key attribute value. | |
90 | * | |
91 | * @param key The key to set. | |
92 | */ | |
93 | public void setMessageKey(String messageKey) { | |
94 | 0 | this.messageKey = messageKey; |
95 | 0 | } |
96 | ||
97 | /** | |
98 | * Gets the params attribute. | |
99 | * | |
100 | * @return Returns the params. | |
101 | */ | |
102 | public String[] getParams() { | |
103 | 0 | return params; |
104 | } | |
105 | ||
106 | /** | |
107 | * Sets the params attribute value. | |
108 | * | |
109 | * @param params The params to set. | |
110 | */ | |
111 | public void setParams(String[] params) { | |
112 | 0 | this.params = params; |
113 | 0 | } |
114 | } |