View Javadoc
1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  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,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  
20  package org.apache.myfaces.tobago.example.demo;
21  
22  import java.io.Serializable;
23  
24  public enum DockerServer implements Serializable {
25  
26    tomcat(
27        "Tomcat",
28        "/usr/local/tomcat/webapps/demo.war",
29        8080,
30        0,
31        "tomcat",
32        new String[]{
33            "7-jre8",
34            "8-jre8",
35            "8-jre11",
36            "9-jre8",
37            "9-jre11"},
38        false,
39  //    XXX JSTL is only needed, if jsf=mojarra... and Server = Tomcat
40        ""),
41    tomee(
42        "TomEE",
43        "/usr/local/tomee/webapps/demo.war",
44        8080,
45        0,
46        "tomee",
47        new String[]{
48            "8-jre-1.7.5-plus",
49            "8-jre-7.0.5-plus",
50            "8-jre-7.1.0-plus",
51            "11-jre-8.0.0-M3-plus"},
52        false,
53        " -Djsf=provided"),
54    liberty(
55        "Liberty",
56        "/config/dropins/demo.war",
57        9080,
58        9443,
59        "websphere-liberty",
60        new String[]{
61            "webProfile7",
62            "webProfile8"},
63        true,
64        " -Djsf=provided"),
65    wildfly(
66        "Wildfly",
67        "/opt/jboss/wildfly/standalone/deployments/demo.war",
68        8080,
69        8443,
70        "jboss/wildfly",
71        new String[]{
72            "8.2.1.Final",
73            "9.0.2.Final",
74            "10.1.0.Final",
75            "11.0.0.Final",
76            "12.0.0.Final",
77            "13.0.0.Final",
78            "14.0.1.Final"
79        },
80        true,
81        " -Djsf=provided");
82  
83    private String displayName;
84    private String volume;
85    private int port;
86    private int sslPort;
87    private String image;
88    private String[] tags;
89    private boolean ssl;
90    private String mavenOptions;
91  
92    DockerServer(
93        final String displayName, final String volume, final int port, final int sslPort,
94        final String image, final String[] tags, final boolean ssl, final String mavenOptions) {
95      this.displayName = displayName;
96      this.volume = volume;
97      this.port = port;
98      this.sslPort = sslPort;
99      this.image = image;
100     this.tags = tags;
101     this.ssl = ssl;
102     this.mavenOptions = mavenOptions;
103   }
104 
105   public String getDisplayName() {
106     return displayName;
107   }
108 
109   public String getVolume() {
110     return volume;
111   }
112 
113   public int getPort() {
114     return port;
115   }
116 
117   public int getSslPort() {
118     return sslPort;
119   }
120 
121   public String getImage() {
122     return image;
123   }
124 
125   public String[] getTags() {
126     return tags;
127   }
128 
129   public boolean isSsl() {
130     return ssl;
131   }
132 
133   public String getMavenOptions() {
134     return mavenOptions;
135   }
136 }