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 import java.util.ArrayList; 019 import java.util.List; 020 021 /** 022 * KRA Audit Cluster; container for related set of audit errors. 023 */ 024 public class AuditCluster { 025 026 private String label; 027 private List auditErrorList; 028 private boolean softAudits; 029 030 public AuditCluster() { 031 this.auditErrorList = new ArrayList(); 032 } 033 034 public AuditCluster(String label, List auditErrorList) { 035 this.label = label; 036 this.auditErrorList = auditErrorList; 037 } 038 039 public AuditCluster(String label, List auditErrorList, boolean softAudits) { 040 this(label, auditErrorList); 041 this.softAudits = softAudits; 042 } 043 044 /** 045 * Gets the label attribute. 046 * 047 * @return Returns the label. 048 */ 049 public String getLabel() { 050 return label; 051 } 052 053 /** 054 * Sets the label attribute value. 055 * 056 * @param label The label to set. 057 */ 058 public void setLabel(String label) { 059 this.label = label; 060 } 061 062 /** 063 * Gets the auditErrorList attribute. 064 * 065 * @return Returns the auditErrorList. 066 */ 067 public List getAuditErrorList() { 068 return auditErrorList; 069 } 070 071 /** 072 * Sets the auditErrorList attribute value. 073 * 074 * @param auditErrorList The auditErrorList to set. 075 */ 076 public void setAuditErrorList(List auditErrorList) { 077 this.auditErrorList = auditErrorList; 078 } 079 080 /** 081 * Gets the softAudits attribute. 082 * 083 * @return Returns the softAudits. 084 */ 085 public boolean isSoftAudits() { 086 return softAudits; 087 } 088 089 /** 090 * Sets the softAudits attribute value. 091 * 092 * @param softAudits The softAudits to set. 093 */ 094 public void setSoftAudits(boolean softAudits) { 095 this.softAudits = softAudits; 096 } 097 098 /** 099 * Returns the number of audit errors in the cluster. 100 * 101 * @return int size 102 */ 103 public int getSize() { 104 return this.getAuditErrorList().size(); 105 } 106 }