1 package org.codehaus.mojo.dashboard.report.plugin.configuration;
2
3 /*
4 * Copyright 2007 David Vicente
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 */
18
19 import java.util.ArrayList;
20 import java.util.Iterator;
21 import java.util.List;
22
23 /**
24 * @author <a href="dvicente72@gmail.com">David Vicente</a>
25 *
26 */
27 public class Section
28 {
29 private String id;
30
31 private String title;
32
33 private String groupId;
34
35 private String artifactId;
36
37 private List historicgraphs = new ArrayList();
38
39 private List warningsMsg = new ArrayList();
40
41 public String getArtifactId()
42 {
43 return artifactId;
44 }
45
46 public List getGraphs()
47 {
48 return historicgraphs;
49 }
50
51 public String getGroupId()
52 {
53 return groupId;
54 }
55
56 public String getId()
57 {
58 return id;
59 }
60
61 public String getTitle()
62 {
63 return title;
64 }
65
66 public boolean isValidGraphs()
67 {
68 boolean valid = true;
69 Iterator iter = historicgraphs.iterator();
70 while ( iter.hasNext() )
71 {
72 Graph graph = (Graph) iter.next();
73 if ( !graph.isPeriodsValid() )
74 {
75 valid = false;
76 if ( warningsMsg == null )
77 {
78 warningsMsg = new ArrayList();
79 }
80 warningsMsg.add( graph.getWarningMessage() );
81 break;
82 }
83 }
84 return valid;
85 }
86 /**
87 *
88 * @return
89 */
90 public List getWarningMessages()
91 {
92 return warningsMsg;
93 }
94
95 }