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  public enum Release {
23  
24    v1_0_7("12310824"),
25    v1_0_8("12310900"),
26    v1_0_9("12312042"),
27    v1_0_10("12312204"),
28    v1_0_11("12312376"),
29    v1_0_12("12312498"),
30    v1_0_13("12312766"),
31    v1_0_14("12312878"),
32    v1_0_15("12312929"),
33    v1_0_16("12312966"),
34    v1_0_17("12313084"),
35    v1_0_18("12313150"),
36    v1_0_19("12313372"),
37    v1_0_20("12313447"),
38    v1_0_21("12313470"),
39    v1_0_22("12314027"),
40    v1_0_23("12314159"),
41    v1_0_24("12314193"),
42    v1_0_25("12314527"),
43    v1_0_26("12314961"),
44    v1_0_27("12315099"),
45    v1_0_28("12315109"),
46    v1_0_29("12315262"),
47    v1_0_30("12315336"),
48    v1_0_31("12315383"),
49    v1_0_32("12315489"),
50    v1_0_33("12315586"),
51    v1_0_34("12316162"),
52    v1_0_35("12316183"),
53    v1_0_36("12316297"),
54    v1_0_37("12316458"),
55    v1_0_38("12317350"),
56    v1_0_39("12319455"),
57    v1_0_40("12319866"),
58    v1_0_41("12324116"),
59    v1_0_42("12326705"),
60    v1_0_43("12333048", false, true),
61  
62    v1_5_0_alpha_2("12314340"),
63    v1_5_0_beta_1("12316222"),
64    v1_5_0_beta_2("12317052"),
65    v1_5_0("12312205"),
66    v1_5_1("12319154"),
67    v1_5_2("12319248"),
68    v1_5_3("12319499"),
69    v1_5_4("12319864"),
70    v1_5_5("12319865"),
71    v1_5_6("12321251"),
72    v1_5_7("12321444"),
73    v1_5_8("12322450"),
74    v1_5_9("12323506"),
75    v1_5_10("12324008"),
76    v1_5_11("12324453"),
77    v1_5_12("12325597"),
78    v1_5_13("12325858"),
79    v1_5_14("12326706", false, true),
80  
81    v1_6_0_beta_1("12321691"),
82    v1_6_0_beta_2("12321701"),
83  
84    v2_0_0_alpha_1("12321874"),
85    v2_0_0_alpha_2("12324818"),
86    v2_0_0_alpha_3("12325247"),
87    v2_0_0_beta_1("12325856"),
88    v2_0_0_beta_2("12326662"),
89    v2_0_0_beta_3("12326693"),
90    v2_0_0_beta_4("12326809"),
91    v2_0_0("12321253"),
92    v2_0_1("12327455"),
93    v2_0_2("12327500"),
94    v2_0_3("12328040"),
95    v2_0_4("12328041"),
96    v2_0_5("12329025"),
97    v2_0_6("12329161"),
98    v2_0_7("12329376"),
99    v2_0_8("12329723"),
100   v2_0_9("12332146"),
101   v2_0_10("12334742"),
102   v2_1_0("12338208"),
103   v2_1_1("12341246"),
104   v2_2_0("12342740"),
105   v2_3_0("12343979"),
106   v2_4_0("12344409"),
107   v2_4_1("12344899"),
108   v2_4_2("12345177", true),
109   v2_4_3("12345177", false, true),
110 
111   v3_0_0_alpha_1("12325880"),
112   v3_0_0_alpha_2("12333887"),
113   v3_0_0_alpha_3("12334363"),
114   v3_0_0_alpha_4("12337842"),
115   v3_0_0_alpha_5("12338164"),
116   v3_0_0_alpha_6("12338231"),
117   v3_0_0_alpha_7("12338278"),
118   v3_0_0_beta_1("12333888"),
119   v3_0_0("12325880"),
120   v3_0_1("12338730"),
121   v3_0_2("12339171"),
122   v3_0_3("12339442"),
123   v3_0_4("12340258"),
124   v3_0_5("12340325"),
125   v3_0_6("12341574"),
126   v3_1_0("12342388"),
127   v3_1_1("12343478", true),
128 
129   v4_0_0("12338728"),
130   v4_1_0("12339443"),
131   v4_2_0("12342739"),
132   v4_2_1("12342849"),
133   v4_3_0("12342850"),
134   v4_3_1("12343951"),
135   v4_3_2("12344394"),
136   v4_4_0("12344541"),
137   v4_4_1("12345061"),
138   v4_5_0("12345562"),
139   v4_5_1("12348200", true),
140   v4_5_2("12349344", false, true),
141 
142   v5_0_0("12338729", false, true),
143   v5_0_1("12344151", false, true),
144   v5_1_0("12344152", false, true);
145 
146   private String jira;
147   private String version;
148   private boolean tx;
149   private boolean current;
150   private boolean unreleased;
151 
152   Release(final String jira) {
153     this(jira, false, false);
154   }
155 
156   Release(final String jira, final boolean current) {
157     this(jira, current, false);
158   }
159 
160   Release(final String jira, final boolean current, final boolean unreleased) {
161     this.current = current;
162     this.jira = jira;
163     this.unreleased = unreleased;
164     version = name()
165         .substring(1)
166         .replaceAll("_alpha_", "-alpha-")
167         .replaceAll("_beta_", "-beta-")
168         .replace('_', '.');
169     tx = version.startsWith("1.5") || version.startsWith("1.6");
170   }
171 
172   public String getVersion() {
173     return version;
174   }
175 
176   public boolean isTx() {
177     return tx;
178   }
179 
180   public boolean isCurrent() {
181     return current;
182   }
183 
184   public boolean isUnreleased() {
185     return unreleased;
186   }
187 
188   public String getJira() {
189     return jira;
190   }
191 }