1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package tinlizard.web;
20
21 import tinlizard.model.Project;
22
23 import tinlizard.util.Messages;
24
25 import java.util.Collection;
26
27 import org.jvnet.localizer.Localizable;
28
29 import org.kohsuke.stapler.export.Exported;
30
31 /***
32 * Web Accessible Project Collection.
33 */
34 public final class ProjectCollectionWeb extends ObjectCollectionWeb {
35 public ProjectCollectionWeb(final Collection<Project> c, final Localizable name) {
36 super(name);
37
38 if (c == null) {
39 throw new IllegalStateException(Messages.error_1013());
40 }
41
42 if (name == null) {
43 throw new IllegalStateException(Messages.error_1014());
44 }
45
46 for (Project o : c) {
47 getSubject().add(o);
48 getDelegate().add(new ProjectWeb(o));
49 }
50 }
51
52 @Exported
53 public ProjectCollectionWeb getProjects() {
54 return this;
55 }
56 }