KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > tools > upgrade > common > UpgradeConstants


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23
24 /*
25  * UpgradeConstants.java
26  *
27  * Created on March 10, 2004, 3:24 PM
28  */

29
30 package com.sun.enterprise.tools.upgrade.common;
31
32 /**
33  *
34  * @author prakash
35  */

36 import java.util.HashMap JavaDoc;
37 import java.util.HashSet JavaDoc;
38 import com.sun.enterprise.util.i18n.StringManager;
39 public final class UpgradeConstants {
40     
41     private static StringManager stringManager = StringManager.getManager("com.sun.enterprise.tools.upgrade.common");
42     
43     /** Creates a new instance of UpgradeConstants */
44     public UpgradeConstants() {
45     }
46     public static final String JavaDoc VERSION_AS7X_PE = "as7xpe";
47     public static final String JavaDoc VERSION_AS7X_SE = "as7xse";
48     public static final String JavaDoc VERSION_AS7X_EE = "as7xee";
49     
50     public static final String JavaDoc VERSION_AS80_PE = "as80pe";
51     public static final String JavaDoc VERSION_AS81_PE = "as81pe";
52     public static final String JavaDoc VERSION_AS80_SE = "as81se";
53     public static final String JavaDoc VERSION_AS81_EE = "as81ee";
54     
55     public static final String JavaDoc VERSION_AS82_PE = "as82pe";
56     public static final String JavaDoc VERSION_AS82_SE = "as82se";
57     public static final String JavaDoc VERSION_AS82_EE = "as82ee";
58     
59     public static final String JavaDoc VERSION_AS90_PE = "as90pe";
60     public static final String JavaDoc VERSION_AS90_SE = "as90se";
61     public static final String JavaDoc VERSION_AS90_EE = "as90ee";
62     
63     public static final String JavaDoc EDITION_PE = "pe";
64     public static final String JavaDoc EDITION_SE = "se";
65     public static final String JavaDoc EDITION_EE = "ee";
66     
67     public static final String JavaDoc VERSION_7X = "7x";
68     public static final String JavaDoc VERSION_80 = "80";
69     public static final String JavaDoc VERSION_81 = "81";
70     public static final String JavaDoc VERSION_90 = "90";
71     
72     public static final HashMap JavaDoc supportMap = new HashMap JavaDoc();
73     static{
74         HashSet JavaDoc x7PESet = new HashSet JavaDoc();
75         x7PESet.add(VERSION_AS90_PE);
76         x7PESet.add(VERSION_AS90_SE);
77         x7PESet.add(VERSION_AS90_EE);
78         supportMap.put(VERSION_AS7X_PE,x7PESet);
79         
80         HashSet JavaDoc x7SESet = new HashSet JavaDoc();
81         x7SESet.add(VERSION_AS90_SE);
82         x7SESet.add(VERSION_AS90_EE);
83         supportMap.put(VERSION_AS7X_SE,x7SESet);
84         
85         HashSet JavaDoc x7EESet = new HashSet JavaDoc();
86         x7EESet.add(VERSION_AS90_EE);
87         supportMap.put(VERSION_AS7X_EE,x7EESet);
88         
89         HashSet JavaDoc pE80Set = new HashSet JavaDoc();
90         pE80Set.add(VERSION_AS90_PE);
91         pE80Set.add(VERSION_AS90_SE);
92         pE80Set.add(VERSION_AS90_EE);
93         supportMap.put(VERSION_AS80_PE,pE80Set);
94
95         HashSet JavaDoc eE80Set = new HashSet JavaDoc();
96         eE80Set.add(VERSION_AS90_EE);
97         supportMap.put(VERSION_AS80_SE,eE80Set);
98         
99         HashSet JavaDoc pE81Set = new HashSet JavaDoc();
100         pE81Set.add(VERSION_AS90_PE);
101         pE81Set.add(VERSION_AS90_SE);
102         pE81Set.add(VERSION_AS90_EE);
103         supportMap.put(VERSION_AS81_PE,pE81Set);
104         
105         HashSet JavaDoc eE81Set = new HashSet JavaDoc();
106         eE81Set.add(VERSION_AS90_EE);
107         supportMap.put(VERSION_AS81_EE,eE81Set);
108         
109         HashSet JavaDoc pE90Set = new HashSet JavaDoc();
110         pE90Set.add(VERSION_AS90_SE);
111         pE90Set.add(VERSION_AS90_EE);
112         supportMap.put(VERSION_AS90_PE,pE90Set);
113         
114         HashSet JavaDoc sE90Set = new HashSet JavaDoc();
115         sE90Set.add(VERSION_AS90_EE);
116         supportMap.put(VERSION_AS90_SE,sE90Set);
117         
118         HashSet JavaDoc eE90Set = new HashSet JavaDoc();
119         supportMap.put(VERSION_AS90_EE,eE90Set);
120     };
121     
122     /*
123      * Returns readable strings for user output that maps to version and edition strings.
124      */

125     public static String JavaDoc readableString(String JavaDoc ve){
126         return stringManager.getString("upgradeConstants."+ve);
127     }
128 }
129
Popular Tags