org.ow2.jonas.autostart.guifullstarter.GuiFullStarter Maven / Gradle / Ivy
/**
* JOnAS: Java(TM) Open Application Server
* Copyright (C) 2010 Bull S.A.S.
* Contact: [email protected]
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* --------------------------------------------------------------------------
* $Id: GuiFullStarter.java 20819 2011-02-02 16:00:53Z benoitf $
* --------------------------------------------------------------------------
*/
package org.ow2.jonas.autostart.guifullstarter;
import java.security.ProtectionDomain;
import org.ow2.jonas.autostart.builder.Builder;
import org.ow2.jonas.autostart.configuration.Configuration;
import org.ow2.jonas.autostart.configurationframe.ConfiguratorFrameDescriptor;
import org.ow2.jonas.autostart.fullwizard.FullWizard;
import org.ow2.jonas.autostart.fullwizard.FullWizardPanelDescriptor;
import org.ow2.jonas.autostart.starterfull.FullStarter;
/**
* This class lauches the JOnAS AutoStart Starter program.
* @author skabore
*/
public final class GuiFullStarter {
/**
* The reconfiguration option.
*/
private boolean reconf = false;
/**
* Setps to create a starter jar file.
*/
private final static int steps = 7;
/**
* Setp identifier.
*/
private final static int stepId = 3;
/**
* The constructor.
* @param domaine the domaine name
* @param reconf the reconfiguration option
*/
public GuiFullStarter(final ProtectionDomain domaine, boolean reconf) {
this.reconf = reconf;
Configuration configuration = new Configuration();
configuration.initialize();
Builder builder = new Builder();
FullStarter starter = new FullStarter();
FullWizard wizard = new FullWizard();
wizard.getDialog().setTitle("JOnAS AutoStart :: Full-Starter");
wizard.setStarter(starter);
FullWizardPanelDescriptor descriptor1 = new GuiFullFirstFrameDescriptor(steps);
wizard.registerWizardPanel(GuiFullFirstFrameDescriptor.IDENTIFIER, descriptor1);
GuiFullLicenseFrameDescriptor licenseFrameDescriptor = new GuiFullLicenseFrameDescriptor(reconf, steps);
FullWizardPanelDescriptor descriptor2 = licenseFrameDescriptor;
wizard.registerWizardPanel(GuiFullLicenseFrameDescriptor.IDENTIFIER, descriptor2);
wizard.setBuilder(builder);
FullWizardPanelDescriptor descriptor3 = new GuiFullRunningJonasOptionFrameDescriptor(starter, reconf, steps, 4);
wizard.registerWizardPanel(GuiFullRunningJonasOptionFrameDescriptor.IDENTIFIER, descriptor3);
GuiFullStarterFrameDescriptor starterFrameDescriptor = new GuiFullStarterFrameDescriptor(GuiFullStarter.class
.getProtectionDomain(), starter, steps);
FullWizardPanelDescriptor descriptor4 = starterFrameDescriptor;
wizard.registerWizardPanel(GuiFullStarterFrameDescriptor.IDENTIFIER, descriptor4);
FullWizardPanelDescriptor descriptor5 = new GuiFullRunningJonasFieldFromDiskFrameDescriptor(starter, steps, 5);
wizard.registerWizardPanel(GuiFullRunningJonasFieldFromDiskFrameDescriptor.IDENTIFIER, descriptor5);
FullWizardPanelDescriptor descriptor6 = new GuiFullRunningJonasFieldFromEmbeddedFrameDescriptor(starter, builder,
steps, 5, reconf);
wizard.registerWizardPanel(GuiFullRunningJonasFieldFromEmbeddedFrameDescriptor.IDENTIFIER, descriptor6);
ConfiguratorFrameDescriptor configuratorFrameDescriptor = new ConfiguratorFrameDescriptor(configuration, stepId, steps);
configuratorFrameDescriptor.setCallFromStraterFrame(this.reconf);
configuratorFrameDescriptor.setLicenseFrameId(GuiFullLicenseFrameDescriptor.IDENTIFIER);
configuratorFrameDescriptor.setRunningJonasOptionFrameId(GuiFullRunningJonasOptionFrameDescriptor.IDENTIFIER);
FullWizardPanelDescriptor descriptor7 = configuratorFrameDescriptor;
wizard.registerWizardPanel(ConfiguratorFrameDescriptor.IDENTIFIER, descriptor7);
FullWizardPanelDescriptor descriptor8 = new GuiFullApplicationFrameDescriptor(starter, steps, 6);
wizard.registerWizardPanel(GuiFullApplicationFrameDescriptor.IDENTIFIER, descriptor8);
wizard.setCurrentPanel(GuiFullFirstFrameDescriptor.IDENTIFIER);
wizard.showModalDialog();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy