1 /** 2 * Copyright 2005-2013 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 public AuditError(String errorKey, String messageKey, String link) { 32 this.setErrorKey(errorKey); 33 this.setMessageKey(messageKey); 34 this.setLink(link); 35 this.params = new String[5]; // bean:message takes up to 5 tokenized parameters 36 } 37 38 public AuditError(String errorKey, String messageKey, String link, String[] params) { 39 this(errorKey, messageKey, link); 40 this.setParams(params); 41 } 42 43 /** 44 * Gets the errorKey attribute. 45 * 46 * @return Returns the errorKey. 47 */ 48 public String getErrorKey() { 49 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 this.errorKey = errorKey; 59 } 60 61 /** 62 * Gets the link attribute. 63 * 64 * @return Returns the link. 65 */ 66 public String getLink() { 67 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 this.link = link; 77 } 78 79 /** 80 * Gets the key attribute. 81 * 82 * @return Returns the key. 83 */ 84 public String getMessageKey() { 85 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 this.messageKey = messageKey; 95 } 96 97 /** 98 * Gets the params attribute. 99 * 100 * @return Returns the params. 101 */ 102 public String[] getParams() { 103 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 this.params = params; 113 } 114 }