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