1 /*
2 * Copyright 2006-2007 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.ole.module.cg.document.validation.impl;
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 public class AuditCluster {
25
26 private String label;
27 private List auditErrorList;
28 private boolean softAudits;
29
30 public AuditCluster() {
31 this.auditErrorList = new ArrayList();
32 }
33
34 public AuditCluster(String label, List auditErrorList) {
35 this.label = label;
36 this.auditErrorList = auditErrorList;
37 }
38
39 public AuditCluster(String label, List auditErrorList, boolean softAudits) {
40 this(label, auditErrorList);
41 this.softAudits = softAudits;
42 }
43
44 /**
45 * Gets the label attribute.
46 *
47 * @return Returns the label.
48 */
49 public String getLabel() {
50 return label;
51 }
52
53 /**
54 * Sets the label attribute value.
55 *
56 * @param label The label to set.
57 */
58 public void setLabel(String label) {
59 this.label = label;
60 }
61
62 /**
63 * Gets the auditErrorList attribute.
64 *
65 * @return Returns the auditErrorList.
66 */
67 public List getAuditErrorList() {
68 return auditErrorList;
69 }
70
71 /**
72 * Sets the auditErrorList attribute value.
73 *
74 * @param auditErrorList The auditErrorList to set.
75 */
76 public void setAuditErrorList(List auditErrorList) {
77 this.auditErrorList = auditErrorList;
78 }
79
80 /**
81 * Gets the softAudits attribute.
82 *
83 * @return Returns the softAudits.
84 */
85 public boolean isSoftAudits() {
86 return softAudits;
87 }
88
89 /**
90 * Sets the softAudits attribute value.
91 *
92 * @param softAudits The softAudits to set.
93 */
94 public void setSoftAudits(boolean softAudits) {
95 this.softAudits = softAudits;
96 }
97
98 /**
99 * 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 }