Search in sources :

Example 1 with ServerConfigurator

use of com.centurylink.mdw.plugin.server.ServerConfigurator in project mdw-designer by CenturyLinkCloud.

the class WorkflowElementActionHandler method deploy.

public void deploy(Object element) {
    if (element instanceof WorkflowProject || element instanceof ServerSettings) {
        ServerSettings serverSettings;
        if (element instanceof WorkflowProject) {
            WorkflowProject workflowProject = (WorkflowProject) element;
            serverSettings = workflowProject.getServerSettings();
            MdwPlugin.getDefault().getPreferenceStore().setValue(PreferenceConstants.PREFS_SERVER_WF_PROJECT, workflowProject.getName());
        } else {
            serverSettings = (ServerSettings) element;
            MdwPlugin.getDefault().getPreferenceStore().setValue(PreferenceConstants.PREFS_RUNNING_SERVER, serverSettings.getServerName());
        }
        ServerConfigurator configurator = ServerConfigurator.Factory.create(serverSettings);
        configurator.doDeploy(getShell());
    }
}
Also used : ServerSettings(com.centurylink.mdw.plugin.project.model.ServerSettings) WorkflowProject(com.centurylink.mdw.plugin.project.model.WorkflowProject) ServerConfigurator(com.centurylink.mdw.plugin.server.ServerConfigurator)

Example 2 with ServerConfigurator

use of com.centurylink.mdw.plugin.server.ServerConfigurator in project mdw-designer by CenturyLinkCloud.

the class WorkflowElementActionHandler method clientShell.

public void clientShell(Object element) {
    ServerSettings serverSettings;
    if (element instanceof WorkflowProject || element instanceof ServerSettings) {
        if (element instanceof WorkflowProject) {
            WorkflowProject workflowProject = (WorkflowProject) element;
            serverSettings = workflowProject.getServerSettings();
            MdwPlugin.getDefault().getPreferenceStore().setValue(PreferenceConstants.PREFS_SERVER_WF_PROJECT, workflowProject.getName());
        } else {
            serverSettings = (ServerSettings) element;
            MdwPlugin.getDefault().getPreferenceStore().setValue(PreferenceConstants.PREFS_RUNNING_SERVER, serverSettings.getServerName());
        }
        ServerConfigurator configurator = ServerConfigurator.Factory.create(serverSettings);
        configurator.doClientShell(getShell());
    }
}
Also used : ServerSettings(com.centurylink.mdw.plugin.project.model.ServerSettings) WorkflowProject(com.centurylink.mdw.plugin.project.model.WorkflowProject) ServerConfigurator(com.centurylink.mdw.plugin.server.ServerConfigurator)

Aggregations

ServerSettings (com.centurylink.mdw.plugin.project.model.ServerSettings)2 WorkflowProject (com.centurylink.mdw.plugin.project.model.WorkflowProject)2 ServerConfigurator (com.centurylink.mdw.plugin.server.ServerConfigurator)2