Search in sources :

Example 1 with ProxyManager

use of com.twinsoft.convertigo.engine.ProxyManager in project convertigo by convertigo.

the class SetupWizard method addPages.

@Override
public void addPages() {
    Engine.CONFIGURATION_PATH = Engine.USER_WORKSPACE_PATH;
    // empty workspace folder
    if (new File(Engine.USER_WORKSPACE_PATH).list().length == 0) {
        // installer
        if (!System.getProperties().containsKey("convertigo.license.accepted")) {
            licensePage = new LicensePage();
            addPage(licensePage);
        } else {
            System.getProperties().remove("convertigo.license.accepted");
        }
        boolean pre6_2 = false;
        for (String pathToCheck : Arrays.asList("configuration/engine.properties", "minime/Java/login.txt", "cache", "projects", "logs")) {
            pre6_2 = new File(Engine.PROJECTS_PATH, pathToCheck).exists();
            if (!pre6_2) {
                break;
            }
        }
        if (pre6_2) {
            Engine.CONFIGURATION_PATH = Engine.PROJECTS_PATH;
            workspaceMigrationPage = new WorkspaceMigrationPage();
            addPage(workspaceMigrationPage);
        } else {
            workspaceCreationPage = new WorkspaceCreationPage();
            addPage(workspaceCreationPage);
        }
    }
    Engine.CONFIGURATION_PATH += "/configuration";
    try {
        EnginePropertiesManager.loadProperties(false);
        proxyManager = new ProxyManager();
        proxyManager.init();
    } catch (EngineException e) {
        ConvertigoPlugin.logInfo("Unexpected EngineException: " + e.getMessage());
    }
    configureProxyPage = new ConfigureProxyPage(proxyManager);
    addPage(configureProxyPage);
    // alreadyPscKeyPage = new AlreadyPscKeyPage();
    // addPage(alreadyPscKeyPage);
    pscKeyValidationPage = new PscKeyValidationPage();
    addPage(pscKeyValidationPage);
    // registrationPage = new RegistrationPage();
    // addPage(registrationPage);
    // pscKeyPage = new PscKeyPage();
    // addPage(pscKeyPage);
    summaryPage = new SummaryPage();
    addPage(summaryPage);
}
Also used : ProxyManager(com.twinsoft.convertigo.engine.ProxyManager) EngineException(com.twinsoft.convertigo.engine.EngineException) File(java.io.File)

Aggregations

EngineException (com.twinsoft.convertigo.engine.EngineException)1 ProxyManager (com.twinsoft.convertigo.engine.ProxyManager)1 File (java.io.File)1