summaryrefslogtreecommitdiffstats
path: root/pki/base/console/src/com/netscape/admin/certsrv/config/install/InstallWizard.java
blob: 557dc2739f18f6b2964ee8106a00f89d916ac1d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
// --- BEGIN COPYRIGHT BLOCK ---
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; version 2 of the License.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this program; if not, write to the Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
// (C) 2007 Red Hat, Inc.
// All rights reserved.
// --- END COPYRIGHT BLOCK ---
package com.netscape.admin.certsrv.config.install;

import java.util.*;
import java.awt.*;
import javax.swing.*;
import com.netscape.admin.certsrv.*;
import com.netscape.admin.certsrv.wizard.*;

/**
 * Wizard for Installation wizard
 *
 * @author Christine Ho
 * @version $Revision$, $Date$
 * @see com.netscape.admin.certsrv.config.install
 */

public class InstallWizard extends WizardWidget implements Runnable {

    public InstallWizard(JFrame parent, InstallWizardInfo info, 
      IWizardDone wizDone) {
        super(parent, wizDone);
        setWizardInfo(info);
        //addPage(new WIInstallCACertStatusPage());
        addPage(new WIIntroPage(this, parent));
        addPage(new WIMasterOrClone(this, parent));
        addPage(new WIClonePage(this, parent));
        addPage(new WILogonAllTokensPage(this, parent));
        addPage(new WIInternalTokenLogonPage(this, parent));
        addPage(new WIRecreateDBPage(this, parent));
        addPage(new WIInternalDBPage(this, parent));
        addPage(new WIExistingDBPage(this, parent));
        addPage(new WICreateInternalDBPage(this, parent));
        addPage(new WIInternalDBInfoPage(this, parent));
	addPage(new WIReplAgreementPage(this, parent));
        addPage(new WIAdminPage(this, parent));
        addPage(new WIServicesPage(this, parent));
        addPage(new WIInternalDBInfoPage(this, parent));
/*
	addPage(new WIRemoteCASubsystem(this, parent));
	addPage(new WIRemoteKRASubsystem(this, parent));
*/

		// CA starting serial number
		addPage(new WICASerialNumberPage(this,parent));
		addPage(new WICAOCSPServicePage(this,parent));
/*
        addPage(new WINetworkPage(this, parent));
*/

        // CA signing certificate
        addPage(new WIInternalDBInfoPage(this, parent));
        addPage(new WICloneCAKeyCertPage(this, parent));

        addPage(new WICACertSubmitPage(this, parent));
        addPage(new WICAKeyPage(this, parent));
        addPage(new WICAMessageDigestPage(this, parent));
        addPage(new WICACertDNPage(this, parent));
	addPage(new WICACertValidityPage(this, parent));
        addPage(new WICACertExtensionPage(this, parent));
        addPage(new WIGenCAKeyCertPage(this, parent));
	addPage(new WIGenCAKeyCertReqPage(this, parent));
        addPage(new WIManualCACertRequestPage(this, parent));
        addPage(new WICARequestResultPage(this,parent));
        addPage(new WIInstallCAIntroPage(this, parent));
        addPage(new WICATokenLogonPage(this, parent));
        addPage(new WIPasteCACertPage(this, parent));
        addPage(new WIDisplayCACertPage(this, parent));
        addPage(new WIInstallCACertStatusPage(this, parent));

        // OCSP signing certificate
        addPage(new WIInternalDBInfoPage(this, parent));
        addPage(new WICloneOCSPKeyCertPage(this, parent));
        addPage(new WIOCSPCertSubmitPage(this, parent));
        addPage(new WIOCSPKeyPage(this, parent));
        addPage(new WIOCSPMessageDigestPage(this, parent));
        addPage(new WIOCSPCertDNPage(this, parent));
	addPage(new WIGenOCSPKeyCertReqPage(this, parent));
        addPage(new WIManualOCSPCertRequestPage(this, parent));
	addPage(new WIOCSPRequestResultPage(this,parent));
        addPage(new WIInstallOCSPIntroPage(this, parent));
        addPage(new WIOCSPTokenLogonPage(this, parent));
        addPage(new WIPasteOCSPCertPage(this, parent));
        addPage(new WIDisplayOCSPCertPage(this, parent));
        addPage(new WIInstallOCSPCertStatusPage(this, parent));

        // RA signing certificate
        addPage(new WIInternalDBInfoPage(this, parent));
        addPage(new WICloneRAKeyCertPage(this, parent));
        addPage(new WIRACertSubmitPage(this, parent));
        addPage(new WIRAKeyPage(this, parent));
        addPage(new WIRAMessageDigestPage(this, parent));
        addPage(new WIRACertDNPage(this, parent));
        addPage(new WIRACertValidityPage(this, parent));
        addPage(new WIRACertExtensionPage(this, parent));
        addPage(new WIGenRAKeyCertPage(this, parent));
	addPage(new WIGenRAKeyCertReqPage(this, parent));
        addPage(new WIManualRACertRequestPage(this, parent));
		addPage(new WIRARequestResultPage(this,parent));
        addPage(new WIInstallRAIntroPage(this, parent));
        addPage(new WIRATokenLogonPage(this, parent));
        addPage(new WIPasteRACertPage(this, parent));
        addPage(new WIDisplayRACertPage(this, parent));
        addPage(new WIInstallRACertStatusPage(this, parent));

        // KRA transport certificate
        addPage(new WIInternalDBInfoPage(this, parent));
        addPage(new WIKRANumberPage(this, parent));
        addPage(new WICloneKRAKeyCertPage(this, parent));
        addPage(new WIKRACertSubmitPage(this, parent));
        addPage(new WIKRAKeyPage(this, parent));
        addPage(new WIKRAMessageDigestPage(this, parent));
        addPage(new WIKRACertDNPage(this, parent));
        addPage(new WIKRACertValidityPage(this, parent));
        addPage(new WIKRACertExtensionPage(this, parent));
        addPage(new WIGenKRAKeyCertPage(this, parent));
	addPage(new WIGenKRAKeyCertReqPage(this, parent));
        addPage(new WIManualKRACertRequestPage(this, parent));
		addPage(new WIKRARequestResultPage(this,parent));
        addPage(new WIInstallKRAIntroPage(this, parent));
        addPage(new WIKRATokenLogonPage(this, parent));
        addPage(new WIInternalTokenLogonPage(this, parent));
        addPage(new WIPasteKRACertPage(this, parent));
        addPage(new WIDisplayKRACertPage(this, parent));
        addPage(new WIInstallKRACertStatusPage(this, parent));
        addPage(new WIKRAStorageKeyPage(this, parent));

       	addPage(new WIKRAScheme1Page(this, parent));
      	addPage(new WIKRAScheme2Page(this, parent));

        // SSL server certificate
        addPage(new WIInternalDBInfoPage(this, parent));
        addPage(new WICloneTKSKeyCertPage(this, parent));
        addPage(new WIKRACertSubmitPage(this, parent));
        addPage(new WIServerCertSubmitPage(this, parent));
        addPage(new WIServerKeyPage(this, parent));
        addPage(new WISSLMessageDigestPage(this, parent));
        addPage(new WIServerCertDNPage(this, parent));
        addPage(new WIServerCertValidityPage(this, parent));
        addPage(new WIServerCertExtensionPage(this, parent));
        addPage(new WIGenServerKeyCertPage(this, parent));
	addPage(new WIGenSSLKeyCertReqPage(this, parent));
        addPage(new WIManualSSLCertRequestPage(this, parent));
		addPage(new WISSLRequestResultPage(this,parent));
        addPage(new WIInstallSSLIntroPage(this, parent));
        addPage(new WISSLTokenLogonPage(this, parent));
        addPage(new WIPasteSSLCertPage(this, parent));
        addPage(new WIDisplaySSLCertPage(this, parent));
        addPage(new WIInstallSSLCertStatusPage(this, parent));

        addPage(new WIAllCertsInstalledPage(this, parent));
        addPage(new WISingleSignonPage(this, parent));
        addPage(new WICertSetupStatusPage(this, parent));

        show();
    }

    protected void callHelp() {
        if (mCurrent instanceof IWizardPanel) {
            ((IWizardPanel)mCurrent).callHelp();
        }
    }

    protected void back_cb(WizardInfo info) {
        if (mCurrent instanceof WIManualCertRequestPage) {
            ((WIManualCertRequestPage)mCurrent).back_cb(info);
        }
    }

    public void run() {
        show();
    }

    public static void main(String[] args) {
        JFrame.setDefaultLookAndFeelDecorated(true);
        JFrame frame = new JFrame();
        Cursor cursor = new Cursor(Cursor.HAND_CURSOR);
        frame.setCursor(cursor);
        frame.invalidate();
        frame.validate();
        frame.repaint(1);
        InstallWizardInfo wizardInfo = new InstallWizardInfo();
        InstallWizard wizard = new InstallWizard(frame, wizardInfo, null);
    }
}