001/** 002 * Copyright 2005-2014 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 */ 016package org.kuali.rice.krad.util; 017 018import java.util.ArrayList; 019import java.util.List; 020 021/** 022 * KRA Audit Cluster; container for related set of audit errors. 023 * 024 * @author Kuali Rice Team (rice.collab@kuali.org) 025 */ 026public class AuditCluster { 027 028 private String label; 029 private List auditErrorList; 030 private String category; 031 032 public AuditCluster() { 033 this.auditErrorList = new ArrayList(); 034 } 035 036 public AuditCluster(String label, List auditErrorList, String category) { 037 this.label = label; 038 this.auditErrorList = auditErrorList; 039 this.category = category; 040 } 041 042 /** 043 * Gets the label attribute. 044 * 045 * @return Returns the label. 046 */ 047 public String getLabel() { 048 return label; 049 } 050 051 /** 052 * Sets the label attribute value. 053 * 054 * @param label The label to set. 055 */ 056 public void setLabel(String label) { 057 this.label = label; 058 } 059 060 /** 061 * Gets the auditErrorList attribute. 062 * 063 * @return Returns the auditErrorList. 064 */ 065 public List getAuditErrorList() { 066 return auditErrorList; 067 } 068 069 /** 070 * Sets the auditErrorList attribute value. 071 * 072 * @param auditErrorList The auditErrorList to set. 073 */ 074 public void setAuditErrorList(List auditErrorList) { 075 this.auditErrorList = auditErrorList; 076 } 077 078 /** 079 * Returns the number of audit errors in the cluster. 080 * 081 * @return int size 082 */ 083 public int getSize() { 084 return this.getAuditErrorList().size(); 085 } 086 087 public String getCategory() { 088 return this.category; 089 } 090 091 public void setCategory(String category) { 092 this.category = category; 093 } 094} 095