1 /** 2 * Copyright 2005-2016 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.krad.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 public class AuditCluster { 27 28 private String label; 29 private List auditErrorList; 30 private String category; 31 32 public AuditCluster() { 33 this.auditErrorList = new ArrayList(); 34 } 35 36 public AuditCluster(String label, List auditErrorList, String category) { 37 this.label = label; 38 this.auditErrorList = auditErrorList; 39 this.category = category; 40 } 41 42 /** 43 * Gets the label attribute. 44 * 45 * @return Returns the label. 46 */ 47 public String getLabel() { 48 return label; 49 } 50 51 /** 52 * Sets the label attribute value. 53 * 54 * @param label The label to set. 55 */ 56 public void setLabel(String label) { 57 this.label = label; 58 } 59 60 /** 61 * Gets the auditErrorList attribute. 62 * 63 * @return Returns the auditErrorList. 64 */ 65 public List getAuditErrorList() { 66 return auditErrorList; 67 } 68 69 /** 70 * Sets the auditErrorList attribute value. 71 * 72 * @param auditErrorList The auditErrorList to set. 73 */ 74 public void setAuditErrorList(List auditErrorList) { 75 this.auditErrorList = auditErrorList; 76 } 77 78 /** 79 * Returns the number of audit errors in the cluster. 80 * 81 * @return int size 82 */ 83 public int getSize() { 84 return this.getAuditErrorList().size(); 85 } 86 87 public String getCategory() { 88 return this.category; 89 } 90 91 public void setCategory(String category) { 92 this.category = category; 93 } 94 } 95