Search in sources :

Example 1 with ObjectExplorerWizardPage

use of com.twinsoft.convertigo.eclipse.wizards.new_object.ObjectExplorerWizardPage in project convertigo by convertigo.

the class EmulatorTechnologyWizardPage method dialogChanged.

private void dialogChanged() {
    String emTech = getEmulatorTechnology();
    if (emTech.length() == 0) {
        updateStatus("Emulator technology must be specified");
        return;
    }
    try {
        DatabaseObject dbo = ((ObjectExplorerWizardPage) getWizard().getPage("ObjectExplorerWizardPage")).getCreatedBean();
        if (dbo != null) {
            if (dbo instanceof JavelinConnector) {
                ((JavelinConnector) dbo).setEmulatorTechnology(emTech);
                ((JavelinConnector) dbo).emulatorID = ((JavelinConnector) dbo).findEmulatorId();
            }
        }
        ServiceCodeWizardPage servCodeWP = (ServiceCodeWizardPage) getWizard().getPage("ServiceCodeWizardPage");
        servCodeWP.update();
    } catch (NullPointerException e) {
        updateStatus("New Bean has not been instantiated");
        return;
    } catch (EngineException e) {
        updateStatus("Emulmator id couldn't be found from emulator technology.");
        return;
    }
    updateStatus(null);
}
Also used : JavelinConnector(com.twinsoft.convertigo.beans.connectors.JavelinConnector) EngineException(com.twinsoft.convertigo.engine.EngineException) DatabaseObject(com.twinsoft.convertigo.beans.core.DatabaseObject) ObjectExplorerWizardPage(com.twinsoft.convertigo.eclipse.wizards.new_object.ObjectExplorerWizardPage)

Example 2 with ObjectExplorerWizardPage

use of com.twinsoft.convertigo.eclipse.wizards.new_object.ObjectExplorerWizardPage in project convertigo by convertigo.

the class ProjectSchemaWizardPage method dialogChanged.

private void dialogChanged() {
    if (projectName == null) {
        updateStatus("Please select a project");
        return;
    }
    try {
        DatabaseObject dbo = ((ObjectExplorerWizardPage) getWizard().getPage("ObjectExplorerWizardPage")).getCreatedBean();
        if (dbo != null) {
            if (dbo instanceof ProjectSchemaReference) {
                projectName = ProjectUrlParser.getUrl(projectName);
                ((ProjectSchemaReference) dbo).setProjectName(projectName);
            }
        }
    } catch (NullPointerException e) {
        updateStatus("New Bean has not been instantiated");
        return;
    }
    updateStatus(null);
}
Also used : ProjectSchemaReference(com.twinsoft.convertigo.beans.references.ProjectSchemaReference) DatabaseObject(com.twinsoft.convertigo.beans.core.DatabaseObject) ObjectExplorerWizardPage(com.twinsoft.convertigo.eclipse.wizards.new_object.ObjectExplorerWizardPage)

Example 3 with ObjectExplorerWizardPage

use of com.twinsoft.convertigo.eclipse.wizards.new_object.ObjectExplorerWizardPage in project convertigo by convertigo.

the class ServiceCodeWizardPage method dialogChanged.

private void dialogChanged() {
    String servCode = buildServiceCode();
    if (servCode.length() == 0) {
        updateStatus("Connection address must be specified");
        return;
    }
    IWizardPage wp = getWizard().getPage("ObjectExplorerWizardPage");
    if (wp != null) {
        try {
            DatabaseObject dbo = ((ObjectExplorerWizardPage) wp).getCreatedBean();
            if (dbo != null) {
                if (dbo instanceof JavelinConnector)
                    ((JavelinConnector) dbo).setServiceCode(servCode);
            }
        } catch (NullPointerException e) {
            updateStatus("New bean has not been instantiated");
            return;
        }
    } else {
        setServiceCode(servCode);
    }
    updateStatus(null);
}
Also used : JavelinConnector(com.twinsoft.convertigo.beans.connectors.JavelinConnector) DatabaseObject(com.twinsoft.convertigo.beans.core.DatabaseObject) ObjectExplorerWizardPage(com.twinsoft.convertigo.eclipse.wizards.new_object.ObjectExplorerWizardPage) IWizardPage(org.eclipse.jface.wizard.IWizardPage)

Example 4 with ObjectExplorerWizardPage

use of com.twinsoft.convertigo.eclipse.wizards.new_object.ObjectExplorerWizardPage in project convertigo by convertigo.

the class UrlMappingWizardPage method dialogChanged.

private void dialogChanged() {
    DatabaseObject dbo = ((ObjectExplorerWizardPage) getWizard().getPage("ObjectExplorerWizardPage")).getCreatedBean();
    if (dbo != null && dbo instanceof UrlMapping) {
        String path = getPath();
        if (path.length() == 0) {
            updateStatus("Path must be specified");
            return;
        }
        if (!path.startsWith("/")) {
            updateStatus("Path must start with \"/\"");
            return;
        }
        if (parentObject != null && parentObject instanceof UrlMapper) {
            UrlMapper urlMapper = (UrlMapper) parentObject;
            if (urlMapper.getMappingByPath(path) != null) {
                updateStatus("This mapping path already exists");
                return;
            }
            UrlMapping urlMapping = (UrlMapping) dbo;
            urlMapping.setPath(path);
        }
    }
    updateStatus(null);
}
Also used : UrlMapping(com.twinsoft.convertigo.beans.core.UrlMapping) UrlMapper(com.twinsoft.convertigo.beans.core.UrlMapper) DatabaseObject(com.twinsoft.convertigo.beans.core.DatabaseObject) ObjectExplorerWizardPage(com.twinsoft.convertigo.eclipse.wizards.new_object.ObjectExplorerWizardPage)

Aggregations

DatabaseObject (com.twinsoft.convertigo.beans.core.DatabaseObject)4 ObjectExplorerWizardPage (com.twinsoft.convertigo.eclipse.wizards.new_object.ObjectExplorerWizardPage)4 JavelinConnector (com.twinsoft.convertigo.beans.connectors.JavelinConnector)2 UrlMapper (com.twinsoft.convertigo.beans.core.UrlMapper)1 UrlMapping (com.twinsoft.convertigo.beans.core.UrlMapping)1 ProjectSchemaReference (com.twinsoft.convertigo.beans.references.ProjectSchemaReference)1 EngineException (com.twinsoft.convertigo.engine.EngineException)1 IWizardPage (org.eclipse.jface.wizard.IWizardPage)1