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 import java.util.ArrayList; 19 import java.util.List; 20 21 /** 22 * KRA Audit Cluster; container for related set of audit errors. 23 * 24 * @author Kuali Rice Team (rice.collab@kuali.org) 25 * 26 */ 27 public class AuditCluster { 28 29 private String label; 30 private List auditErrorList; 31 private String category; 32 33 public AuditCluster() { 34 this.auditErrorList = new ArrayList(); 35 } 36 37 public AuditCluster(String label, List auditErrorList, String category) { 38 this.label = label; 39 this.auditErrorList = auditErrorList; 40 this.category = category; 41 } 42 43 /** 44 * Gets the label attribute. 45 * 46 * @return Returns the label. 47 */ 48 public String getLabel() { 49 return label; 50 } 51 52 /** 53 * Sets the label attribute value. 54 * 55 * @param label The label to set. 56 */ 57 public void setLabel(String label) { 58 this.label = label; 59 } 60 61 /** 62 * Gets the auditErrorList attribute. 63 * 64 * @return Returns the auditErrorList. 65 */ 66 public List getAuditErrorList() { 67 return auditErrorList; 68 } 69 70 /** 71 * Sets the auditErrorList attribute value. 72 * 73 * @param auditErrorList The auditErrorList to set. 74 */ 75 public void setAuditErrorList(List auditErrorList) { 76 this.auditErrorList = auditErrorList; 77 } 78 79 /** 80 * Returns the number of audit errors in the cluster. 81 * 82 * @return int size 83 */ 84 public int getSize() { 85 return this.getAuditErrorList().size(); 86 } 87 88 public String getCategory() { 89 return this.category; 90 } 91 92 public void setCategory(String category) { 93 this.category = category; 94 } 95 } 96