blob: 1fdff6e07d57e96968b12517dd459373cd0d9bf9 [file] [log] [blame]
/**
*
* Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation
*/
package org.eclipse.osbp.wizard.ui;
import org.eclipse.osbp.preferences.ProductConfigurationPrefs;
import org.eclipse.osbp.wizard.ui.allinonedsl.AllInOneDSLsNewProjectConfigurationPage;
import org.eclipse.osbp.wizard.ui.allinonedsl.AllInOneDSLsNewProjectDataSourcesPage;
import org.eclipse.osbp.wizard.ui.allinonedsl.AllInOneDSLsNewProjectEclipsePage;
import org.eclipse.osbp.wizard.ui.allinonedsl.AllInOneDSLsNewProjectMockDataPage;
import org.eclipse.osbp.wizard.ui.allinonedsl.AllInOneDSLsNewProjectRuntimePage;
import org.eclipse.osbp.wizard.ui.allinonedsl.AllInOneDSLsProjectMasterTemplate;
import org.eclipse.osbp.wizard.ui.basic.MockDataGenerateType;
import org.eclipse.osbp.wizard.ui.basic.TopLevelDomain;
import org.eclipse.swt.widgets.Composite;
import com.google.inject.Inject;
/**
* New OSBP My1stApp Wizard.
*/
public class QuickstartDemoNewProjectWizard extends AllInOneDSLsNewProjectWizard {
/**
* Instantiate all My1stApp specific attributes.
*/
@Inject
public QuickstartDemoNewProjectWizard() {
super();
projectInfo.setTopLevelDomain(TopLevelDomain.getDefault());
projectInfo.setCompanyDomain("eclipse.osbp");
projectInfo.setMasterTemplate(AllInOneDSLsProjectMasterTemplate.PIM);
projectInfo.setDataSourceForAuthentication(ProductConfigurationPrefs.DEFAULT_H2MEMORY_DATASOURCE);
projectInfo.setDataSourceForBLOB(ProductConfigurationPrefs.DEFAULT_H2MEMORY_DATASOURCE);
projectInfo.setDataSourceForBPM(ProductConfigurationPrefs.DEFAULT_H2MEMORY_DATASOURCE);
projectInfo.setDataSourceForBusinessData(ProductConfigurationPrefs.DEFAULT_H2MEMORY_DATASOURCE);
projectInfo.setMockAuthenticationDataGenerateType(MockDataGenerateType.EVERYTIME);
projectInfo.setMockBlobDataGenerateType(MockDataGenerateType.EVERYTIME);
projectInfo.setMockProductDataGenerateType(MockDataGenerateType.EVERYTIME);
getCreator().setProjectInfo(projectInfo);
setWindowTitle(translator.getDocumentation(this, "titleWindow"));
}
@Override
public void addPages() {
addPage(new AllInOneDSLsNewProjectConfigurationPage(this, "titleConfigurationPage"));
addPage(new AllInOneDSLsNewProjectDataSourcesPage(this, "titleDataSourcesPage", true));
addPage(new AllInOneDSLsNewProjectMockDataPage(this, "titleMockDataPage", true));
addPage(new AllInOneDSLsNewProjectEclipsePage(this, "titleEclipsePage"));
addPage(new AllInOneDSLsNewProjectRuntimePage(this, "titleRuntimePage"));
}
/**
* Disable all input elements, which should not be edited by the user, to create a My1stApp.
*/
@Override
public void createPageControls(Composite pageContainer) {
super.createPageControls(pageContainer);
topLevelDomain.setEnabled(false);
companyDomain.setEditable(false);
masterTemplate.setEnabled(false);
businessBundle.setEditable(false);
vaaclipseTheme.setEnabled(false);
dataSourceForGeneral.setEnabled(false);
dataSourceForAuthentication.setEnabled(false);
dataSourceForBLOB.setEnabled(false);
dataSourceForBPM.setEnabled(false);
dataSourceForBusinessData.setEnabled(false);
mockGeneralGenerateType.setEnabled(false);
mockAuthenticationDataGenerateType.setEnabled(false);
mockBlobDataGenerateType.setEnabled(false);
mockProductDataGenerateType.setEnabled(false);
productPortNo.setEditable(false);
productDesktopUrlPath.setEditable(false);
}
}