1 package org.kuali.common.devops.model;
2
3 import java.util.ArrayList;
4 import java.util.Collection;
5 import java.util.Collections;
6 import java.util.EnumSet;
7 import java.util.List;
8 import java.util.Set;
9
10 import com.google.common.collect.ImmutableList;
11
12 public enum Packages {
13
14 MAN("man"),
15 ZIP("zip"),
16 UNZIP("unzip"),
17 WGET("wget"),
18 RSYNC("rsync"),
19 OPENSSH_CLIENTS("openssh-clients"),
20 SVN("subversion"),
21 GIT("git"),
22 GRAPHVIZ("graphviz"),
23 MYSQL_SERVER("mysql-server"),
24 ANT("ant"),
25 TOMCAT6("tomcat6"),
26 TOMCAT7("tomcat7");
27
28 private final Package pkg;
29
30 private Packages(String name) {
31 this.pkg = new Package.Builder(name).build();
32 }
33
34 public Package getPackage() {
35 return pkg;
36 }
37
38
39 public static final Set<Packages> BASIC = Collections.unmodifiableSet(EnumSet.of(MAN, ZIP, UNZIP, WGET, RSYNC, OPENSSH_CLIENTS));
40
41
42 public static final Set<Packages> SCM = Collections.unmodifiableSet(EnumSet.of(SVN, GIT));
43
44 public static final List<Package> of(Collection<Packages> packages) {
45 List<Package> list = new ArrayList<Package>();
46 for (Packages pkgs : packages) {
47 list.add(pkgs.getPackage());
48 }
49 return ImmutableList.copyOf(list);
50 }
51
52 }