1
2
3
4
5
6
7
8 package org.apache.maven.continuum.xmlrpc.project;
9
10
11
12
13
14 import org.apache.continuum.xmlrpc.release.ContinuumReleaseResult;
15 import org.apache.continuum.xmlrpc.repository.AbstractPurgeConfiguration;
16 import org.apache.continuum.xmlrpc.repository.DirectoryPurgeConfiguration;
17 import org.apache.continuum.xmlrpc.repository.LocalRepository;
18 import org.apache.continuum.xmlrpc.repository.RepositoryPurgeConfiguration;
19 import org.apache.maven.continuum.xmlrpc.scm.ChangeFile;
20 import org.apache.maven.continuum.xmlrpc.scm.ChangeSet;
21 import org.apache.maven.continuum.xmlrpc.scm.ScmResult;
22 import org.apache.maven.continuum.xmlrpc.system.Installation;
23 import org.apache.maven.continuum.xmlrpc.system.Profile;
24 import org.apache.maven.continuum.xmlrpc.system.SystemConfiguration;
25
26
27
28
29
30
31
32
33 @SuppressWarnings( "all" )
34 public class AddingResult
35 implements java.io.Serializable
36 {
37
38
39
40
41
42
43
44
45 private java.util.List<ProjectSummary> projects;
46
47
48
49
50 private java.util.List<ProjectGroupSummary> projectGroups;
51
52
53
54
55
56
57
58
59
60
61
62 public void addProject( ProjectSummary projectSummary )
63 {
64 getProjects().add( projectSummary );
65 }
66
67
68
69
70
71
72 public void addProjectGroup( ProjectGroupSummary projectGroupSummary )
73 {
74 getProjectGroups().add( projectGroupSummary );
75 }
76
77
78
79
80
81
82 public java.util.List<ProjectGroupSummary> getProjectGroups()
83 {
84 if ( this.projectGroups == null )
85 {
86 this.projectGroups = new java.util.ArrayList<ProjectGroupSummary>();
87 }
88
89 return this.projectGroups;
90 }
91
92
93
94
95
96
97 public java.util.List<ProjectSummary> getProjects()
98 {
99 if ( this.projects == null )
100 {
101 this.projects = new java.util.ArrayList<ProjectSummary>();
102 }
103
104 return this.projects;
105 }
106
107
108
109
110
111
112 public void removeProject( ProjectSummary projectSummary )
113 {
114 getProjects().remove( projectSummary );
115 }
116
117
118
119
120
121
122 public void removeProjectGroup( ProjectGroupSummary projectGroupSummary )
123 {
124 getProjectGroups().remove( projectGroupSummary );
125 }
126
127
128
129
130
131
132 public void setProjectGroups( java.util.List<ProjectGroupSummary> projectGroups )
133 {
134 this.projectGroups = projectGroups;
135 }
136
137
138
139
140
141
142 public void setProjects( java.util.List<ProjectSummary> projects )
143 {
144 this.projects = projects;
145 }
146
147
148 private java.util.List errors = new java.util.ArrayList();
149
150
151
152
153
154
155 public void addError( String errorKey )
156 {
157 errors.add( errorKey );
158 }
159
160
161
162
163
164
165
166 public java.util.List getErrors()
167 {
168 return errors;
169 }
170
171
172
173
174
175
176 public boolean hasErrors()
177 {
178 return ( errors != null ) && ( !errors.isEmpty() );
179 }
180
181
182
183
184
185
186 public String getErrorsAsString()
187 {
188 if ( !hasErrors() )
189 {
190 return null;
191 }
192
193 StringBuffer message = new StringBuffer();
194 for ( java.util.Iterator i = errors.iterator(); i.hasNext(); )
195 {
196 String error = (String) i.next();
197 message.append( error );
198 message.append( "\n" );
199 }
200 return message.toString();
201 }
202
203 }