001 /**
002 * Copyright 2005-2013 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016 package org.kuali.rice.kns.util;
017
018 /**
019 * KRA Audit Error class.
020 *
021 * @author Kuali Rice Team (rice.collab@kuali.org)
022 *
023 */
024 public class AuditError {
025
026 private String errorKey;
027 private String messageKey;
028 private String link;
029 private String[] params;
030
031 public AuditError(String errorKey, String messageKey, String link) {
032 this.setErrorKey(errorKey);
033 this.setMessageKey(messageKey);
034 this.setLink(link);
035 this.params = new String[5]; // bean:message takes up to 5 tokenized parameters
036 }
037
038 public AuditError(String errorKey, String messageKey, String link, String[] params) {
039 this(errorKey, messageKey, link);
040 this.setParams(params);
041 }
042
043 /**
044 * Gets the errorKey attribute.
045 *
046 * @return Returns the errorKey.
047 */
048 public String getErrorKey() {
049 return errorKey;
050 }
051
052 /**
053 * Sets the errorKey attribute value.
054 *
055 * @param errorKey The errorKey to set.
056 */
057 public void setErrorKey(String errorKey) {
058 this.errorKey = errorKey;
059 }
060
061 /**
062 * Gets the link attribute.
063 *
064 * @return Returns the link.
065 */
066 public String getLink() {
067 return link;
068 }
069
070 /**
071 * Sets the link attribute value.
072 *
073 * @param link The link to set.
074 */
075 public void setLink(String link) {
076 this.link = link;
077 }
078
079 /**
080 * Gets the key attribute.
081 *
082 * @return Returns the key.
083 */
084 public String getMessageKey() {
085 return messageKey;
086 }
087
088 /**
089 * Sets the key attribute value.
090 *
091 * @param key The key to set.
092 */
093 public void setMessageKey(String messageKey) {
094 this.messageKey = messageKey;
095 }
096
097 /**
098 * Gets the params attribute.
099 *
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 }