001    /*
002     * Copyright 2011 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.kfs.module.cg.document.validation.impl;
017    
018    /**
019     * KRA Audit Error class.
020     */
021    public class AuditError {
022    
023        private String errorKey;
024        private String messageKey;
025        private String link;
026        private String[] params;
027    
028        public AuditError(String errorKey, String messageKey, String link) {
029            this.setErrorKey(errorKey);
030            this.setMessageKey(messageKey);
031            this.setLink(link);
032            this.params = new String[5]; // bean:message takes up to 5 tokenized parameters
033        }
034    
035        public AuditError(String errorKey, String messageKey, String link, String[] params) {
036            this(errorKey, messageKey, link);
037            this.setParams(params);
038        }
039    
040        /**
041         * Gets the errorKey attribute.
042         * 
043         * @return Returns the errorKey.
044         */
045        public String getErrorKey() {
046            return errorKey;
047        }
048    
049        /**
050         * Sets the errorKey attribute value.
051         * 
052         * @param errorKey The errorKey to set.
053         */
054        public void setErrorKey(String errorKey) {
055            this.errorKey = errorKey;
056        }
057    
058        /**
059         * Gets the link attribute.
060         * 
061         * @return Returns the link.
062         */
063        public String getLink() {
064            return link;
065        }
066    
067        /**
068         * Sets the link attribute value.
069         * 
070         * @param link The link to set.
071         */
072        public void setLink(String link) {
073            this.link = link;
074        }
075    
076        /**
077         * Gets the key attribute.
078         * 
079         * @return Returns the key.
080         */
081        public String getMessageKey() {
082            return messageKey;
083        }
084    
085        /**
086         * Sets the key attribute value.
087         * 
088         * @param key The key to set.
089         */
090        public void setMessageKey(String messageKey) {
091            this.messageKey = messageKey;
092        }
093    
094        /**
095         * Gets the params attribute.
096         * 
097         * @return Returns the params.
098         */
099        public String[] getParams() {
100            return params;
101        }
102    
103        /**
104         * Sets the params attribute value.
105         * 
106         * @param params The params to set.
107         */
108        public void setParams(String[] params) {
109            this.params = params;
110        }
111    }