001: /*
002: * Copyright 2006-2007 The Kuali Foundation.
003: *
004: * Licensed under the Educational Community License, Version 1.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/ecl1.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.module.kra.util;
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,
040: boolean softAudits) {
041: this (label, auditErrorList);
042: this .softAudits = softAudits;
043: }
044:
045: /**
046: * Gets the label attribute.
047: *
048: * @return Returns the label.
049: */
050: public String getLabel() {
051: return label;
052: }
053:
054: /**
055: * Sets the label attribute value.
056: *
057: * @param label The label to set.
058: */
059: public void setLabel(String label) {
060: this .label = label;
061: }
062:
063: /**
064: * Gets the auditErrorList attribute.
065: *
066: * @return Returns the auditErrorList.
067: */
068: public List getAuditErrorList() {
069: return auditErrorList;
070: }
071:
072: /**
073: * Sets the auditErrorList attribute value.
074: *
075: * @param auditErrorList The auditErrorList to set.
076: */
077: public void setAuditErrorList(List auditErrorList) {
078: this .auditErrorList = auditErrorList;
079: }
080:
081: /**
082: * Gets the softAudits attribute.
083: *
084: * @return Returns the softAudits.
085: */
086: public boolean isSoftAudits() {
087: return softAudits;
088: }
089:
090: /**
091: * Sets the softAudits attribute value.
092: *
093: * @param softAudits The softAudits to set.
094: */
095: public void setSoftAudits(boolean softAudits) {
096: this .softAudits = softAudits;
097: }
098:
099: /**
100: * Returns the number of audit errors in the cluster.
101: *
102: * @return int size
103: */
104: public int getSize() {
105: return this.getAuditErrorList().size();
106: }
107: }
|