Package com.eviware.x.form

Examples of com.eviware.x.form.XFormDialogBuilder


    protected XFormDialog buildDialog(final AbstractInterface<?> iface) {
        if (iface == null) {
            return null;
        }

        XFormDialogBuilder builder = XFormFactory.createDialogBuilder("Add JMS endpoint");

        mainForm = builder.createForm("Basic");
        mainForm.addTextField(HERMES_CONFIG, "choose folder where hermes-config.xml is", XForm.FieldType.FOLDER)
                .addFormFieldListener(new XFormFieldListener() {
                    public void valueChanged(XFormField sourceField, String newValue, String oldValue) {
                        if (!"".equals(newValue)) {
                            Hermes hermes = null;
                            try {
                                Context ctx = getHermesContext(iface, newValue);
                                iface.getProject().setHermesConfig(newValue);
                                String[] sessions = getSessionOptions(iface, newValue);
                                mainForm.setOptions(SESSION, sessions);
                                if (sessions != null && sessions.length > 0) {
                                    hermes = (Hermes) ctx.lookup(sessions[0]);
                                }
                            } catch (Exception e) {
                                SoapUI.logError(e);
                            }
                            if (hermes != null) {
                                updateDestinations(hermes);
                            } else {
                                mainForm.setOptions(SESSION, new String[]{});
                                mainForm.setOptions(SEND, new String[]{});
                                mainForm.setOptions(RECEIVE, new String[]{});
                            }
                        }
                    }
                });
        mainForm.addComboBox(SESSION, new String[]{}, "Session name from HermesJMS").addFormFieldListener(
                new XFormFieldListener() {

                    public void valueChanged(XFormField sourceField, String newValue, String oldValue) {
                        String hermesConfigPath = mainForm.getComponent(HERMES_CONFIG).getValue();

                        Hermes hermes = null;
                        try {
                            Context ctx = getHermesContext(iface, hermesConfigPath);
                            hermes = (Hermes) ctx.lookup(newValue);
                        } catch (Exception e) {
                            SoapUI.logError(e);
                        }
                        if (hermes != null) {
                            updateDestinations(hermes);
                        } else {
                            mainForm.setOptions(SEND, new String[]{});
                            mainForm.setOptions(RECEIVE, new String[]{});
                        }
                    }

                });
        mainForm.addComboBox(SEND, new String[]{}, "Queue/Topic  sending/publishing");
        mainForm.addComboBox(RECEIVE, new String[]{}, "Queue/Topic  receive/subscribe");

        return builder.buildDialog(builder.buildOkCancelActions(), "create JMS endpoint by selecting proper values",
                null);
    }
View Full Code Here


    public XFireAction() {
        super("XFire 1.X Stubs", "Generates XFire 1.X stubs using the wsgen utility");
    }

    protected XFormDialog buildDialog(Interface modelItem) {
        XFormDialogBuilder builder = XFormFactory.createDialogBuilder("XFire 1.X Stubs");

        XForm mainForm = builder.createForm("Basic");
        addWSDLFields(mainForm, modelItem);

        mainForm.addTextField(OUTPUT, "Root directory for all emitted files.", XForm.FieldType.PROJECT_FOLDER);
        mainForm.addTextField(PACKAGE, "Package for generated classes", XForm.FieldType.JAVA_PACKAGE).setRequired(
                true, "Package is required");
        XFormField bindingCombo = mainForm.addComboBox(BINDING, new String[]{"jaxb", "xmlbeans"},
                "Binding framework to use");

        XFormTextField cpField = mainForm.addTextField(CLASSPATH, "Classpath to generated xmlbeans for binding",
                XForm.FieldType.PROJECT_FILE);
        XFormTextField extBindingsField = mainForm.addTextField(EXTERNAL_BINDINGS, "External jaxb binding file(s)",
                XForm.FieldType.PROJECT_FILE);
        bindingCombo.addComponentEnabler(cpField, "xmlbeans");
        bindingCombo.addComponentEnabler(extBindingsField, "jaxb");

        mainForm.addTextField(PROFILE, "Profile to use for generating artifacts", XForm.FieldType.TEXT);
        mainForm.addTextField(BASE_URI, "Base URI to use", XForm.FieldType.URL);
        mainForm.addCheckBox(OVERWRITE, null);
        mainForm.addCheckBox(EXPLICIT_ANNOTATION, null);
        mainForm.addCheckBox(SERVER_STUBS, null);

        buildArgsForm(builder, true, "WsGen");

        return builder.buildDialog(buildDefaultActions(HelpUrls.XFIRE_HELP_URL, modelItem),
                "Specify arguments for XFire 1.X WsGen", UISupport.TOOL_ICON);
    }
View Full Code Here

        values.putIfMissing(LANGUAGE, "CS");
        return values;
    }

    protected XFormDialog buildDialog(Interface modelItem) {
        XFormDialogBuilder builder = XFormFactory.createDialogBuilder(".NET 2.0 artifacts");

        XForm mainForm = builder.createForm("Basic");
        addWSDLFields(mainForm, modelItem);

        mainForm.addTextField(OUTPUT, "root directory for generated files.", XForm.FieldType.PROJECT_FOLDER);
        mainForm.addTextField(NAMESPACE, "The namespace for the generated proxy or template", XForm.FieldType.TEXT);

        mainForm.addCheckBox(SERVER, "(Generates interfaces for server-side implementation of an ASP.Net Web Service)");
        mainForm.addComboBox(LANGUAGE, new String[]{"CS", "VB", "JS", "VJS", "CPP"}, "add scope to deploy.wsdd");

        mainForm.addComboBox(PROTOCOL, new String[]{"SOAP", "SOAP12", "HttpGet", "HttpPost"},
                "override the default protocol to implement");

        XForm advForm = builder.createForm("Advanced");

        advForm.addCheckBox(SHARETYPES, "(turns on type sharing feature)");
        advForm.addCheckBox(FIELDS, "(generate fields instead of properties)");
        advForm.addCheckBox(ORDER, "(generate explicit order identifiers on particle members)");
        advForm.addCheckBox(ENABLEDATABINDING, "(implement INotifyPropertyChanged interface on all generated types)");
        advForm.addTextField(URLKEY, "configuration key to use in the code generation to read the default URL value",
                XForm.FieldType.URL);
        advForm.addTextField(BASEURL, "base url to use when calculating the url fragment", XForm.FieldType.URL);

        XForm httpForm = builder.createForm("HTTP settings");
        httpForm.addTextField(USERNAME, "username to access the WSDL-URI", XForm.FieldType.TEXT);
        httpForm.addTextField(PASSWORD, "password to access the WSDL-URI", XForm.FieldType.PASSWORD);
        httpForm.addTextField(DOMAIN, "domain to access the WSDL-URI", XForm.FieldType.TEXT);
        httpForm.addTextField(PROXY, "username to access the WSDL-URI", XForm.FieldType.TEXT);
        httpForm.addTextField(PROXYUSERNAME, "proxy username to access the WSDL-URI", XForm.FieldType.TEXT);
        httpForm.addTextField(PROXYPASSWORD, "proxy password to access the WSDL-URI", XForm.FieldType.PASSWORD);
        httpForm.addTextField(PROXYDOMAIN, "proxy domain to access the WSDL-URI", XForm.FieldType.TEXT);

        buildArgsForm(builder, false, "wsdl.exe");

        return builder.buildDialog(buildDefaultActions(HelpUrls.DOTNET_HELP_URL, modelItem),
                "Specify arguments for .NET 2 wsdl.exe", UISupport.TOOL_ICON);
    }
View Full Code Here

    public JBossWSConsumeAction() {
        super("JBossWS JAX-WS Artifacts", "Generates JAX-WS artifacts using JBossWS wsconsume");
    }

    protected XFormDialog buildDialog(Interface modelItem) {
        XFormDialogBuilder builder = XFormFactory.createDialogBuilder("JBossWS JAX-WS Artifacts");

        XForm mainForm = builder.createForm("Basic");
        addWSDLFields(mainForm, modelItem);

        mainForm.addTextField(OUTPUT, "target directory for generated files.", XForm.FieldType.PROJECT_FOLDER);
        mainForm.addTextField(PACKAGE, "target package nam", XForm.FieldType.JAVA_PACKAGE);
        mainForm.addTextField(SOURCE_OUTPUT, "target directory for generated source files",
                XForm.FieldType.PROJECT_FOLDER);
        mainForm.addTextField(CATALOG, "catalog file to resolve external entity references",
                XForm.FieldType.PROJECT_FILE);
        mainForm.addTextField(BINDING_FILES, "comma-separated list of external JAX-WS or JAXB binding files",
                XForm.FieldType.TEXT);
        mainForm.addTextField(WSDLLOCATION, "@WebService.wsdlLocation and @WebServiceClient.wsdlLocation value",
                XForm.FieldType.TEXT);

        mainForm.addCheckBox(KEEP, "(keep generated files)");
        mainForm.addCheckBox(STACKTRACE, "(show stacktrace for errors)");

        buildArgsForm(builder, false, "wsconsume");

        return builder.buildDialog(buildDefaultActions(HelpUrls.JBOSSWS_WSCONSUME_HELP_URL, modelItem),
                "Specify arguments for JBossWS wsconsume", UISupport.TOOL_ICON);
    }
View Full Code Here

    public OracleWsaGenProxyAction() {
        super("Oracle Proxy Artifacts", "Generates Oracle Proxy artifacts using the wsa.jar utility");
    }

    protected XFormDialog buildDialog(Interface modelItem) {
        XFormDialogBuilder builder = XFormFactory.createDialogBuilder("Oracle Artifacts");

        XForm mainForm = builder.createForm("Basic");
        addWSDLFields(mainForm, modelItem);

        mainForm.addTextField(OUTPUT, "The root directory for all emitted files.", XForm.FieldType.PROJECT_FOLDER);
        mainForm.addTextField(PACKAGE, "The target package for generated classes", XForm.FieldType.JAVA_PACKAGE);

        buildArgsForm(builder, true, "wsa");

        ActionList actions = buildDefaultActions(HelpUrls.ORACLEWSA_HELP_URL, modelItem);
        return builder.buildDialog(actions, "Specify arguments for Oracle wsa.jar genProxy functionality",
                UISupport.TOOL_ICON);
    }
View Full Code Here

    public WSToolsRegenerateJava2WsdlAction() {
        super("Regenerate with JBossWS", "Regenerates WSDL with the jbossws wstools utility");
    }

    protected XFormDialog buildDialog(WsdlInterface modelItem) {
        XFormDialogBuilder builder = XFormFactory.createDialogBuilder("Regenerate JBossWS WSDL Artifacts");

        XForm mainForm = builder.createForm("Basic");

        mainForm.addTextField(ENDPOINT, "Serice Endpoint Interface", XForm.FieldType.JAVA_CLASS);
        mainForm.addTextField(SERVICE_NAME, "The name of the generated Service", XForm.FieldType.TEXT);
        mainForm
                .addComboBox(STYLE, new String[]{Style.DOCUMENT.toString(), Style.RPC.toString()}, "The style to use");
        mainForm.addComboBox(PARAMETER_STYLE,
                new String[]{ParameterStyle.BARE.toString(), ParameterStyle.WRAPPED.toString()}, "The style to use");
        mainForm.addTextField(CLASSPATH, "Classpath to use", XForm.FieldType.PROJECT_FOLDER);
        mainForm.addTextField(OUTPUT, "The root directory for all emitted files.", XForm.FieldType.PROJECT_FOLDER);
        mainForm.addTextField(MAPPING, "mapping file to generate", XForm.FieldType.PROJECT_FILE);
        mainForm.addTextField(TARGET_NAMESPACE, "The target namespace for the generated WSDL", XForm.FieldType.TEXT);
        mainForm.addTextField(TYPES_NAMESPACE, "The namespace for the generated types", XForm.FieldType.TEXT);
        mainForm.addTextField(EJB_LINK, "The name of the source EJB to link to", XForm.FieldType.TEXT);
        mainForm.addTextField(SERVLET_LINK, "The name of the source Servlet to link to", XForm.FieldType.TEXT);

        buildArgsForm(builder, false, "wstools");

        ActionList actions = buildDefaultActions(HelpUrls.WSTOOLS_HELP_URL, modelItem);
        actions.addAction(new ShowConfigFileAction("JBossWS Wsdl2Java", "Contents of generated wsconfig.xml file") {
            protected String getConfigFile() {
                ConfigurationDocument configDocument = createConfigFile(getDialog().getValues());
                return configDocument.toString();
            }
        });

        return builder.buildDialog(actions, "Specify arguments for JBossWS wstools java2wsdl functionality",
                UISupport.TOOL_ICON);
    }
View Full Code Here

            return null;
        }

        proVersion = isProVersion(modelItem);

        XFormDialogBuilder builder = XFormFactory.createDialogBuilder("Launch TestRunner");

        mainForm = builder.createForm("Basic");
        mainForm.addComboBox(TESTSUITE, new String[]{}, "The TestSuite to run").addFormFieldListener(
                new XFormFieldListener() {

                    public void valueChanged(XFormField sourceField, String newValue, String oldValue) {
                        List<String> testCases = new ArrayList<String>();
                        String tc = mainForm.getComponentValue(TESTCASE);

                        if (newValue.equals(ALL_VALUE)) {
                            for (TestSuite testSuite : testSuites) {
                                for (TestCase testCase : testSuite.getTestCaseList()) {
                                    if (!testCases.contains(testCase.getName())) {
                                        testCases.add(testCase.getName());
                                    }
                                }
                            }
                        } else {
                            TestSuite testSuite = getModelItem().getTestSuiteByName(newValue);
                            if (testSuite != null) {
                                testCases.addAll(Arrays.asList(ModelSupport.getNames(testSuite.getTestCaseList())));
                            }
                        }

                        testCases.add(0, ALL_VALUE);
                        mainForm.setOptions(TESTCASE, testCases.toArray());

                        if (testCases.contains(tc)) {
                            mainForm.getFormField(TESTCASE).setValue(tc);
                        }
                    }
                });

        mainForm.addComboBox(TESTCASE, new String[]{}, "The TestCase to run");
        mainForm.addSeparator();

        mainForm.addCheckBox(ENABLEUI, "Enables UI components in scripts");
        mainForm.addTextField(TESTRUNNERPATH, "Folder containing TestRunner.bat to use", XForm.FieldType.FOLDER);
        mainForm.addCheckBox(SAVEPROJECT, "Saves project before running").setEnabled(!modelItem.isRemote());
        mainForm.addCheckBox(ADDSETTINGS, "Adds global settings to command-line");
        mainForm.addSeparator();
        mainForm.addTextField(PROJECTPASSWORD, "Set project password", XForm.FieldType.PASSWORD);
        mainForm.addTextField(SOAPUISETTINGSPASSWORD, "Set soapui-settings.xml password", XForm.FieldType.PASSWORD);
        mainForm.addCheckBox(IGNOREERRORS, "Do not stop if error occurs, ignore them");
        mainForm.addCheckBox(SAVEAFTER, "Sets to save the project file after tests have been run");

        advForm = builder.createForm("Overrides");
        advForm.addComboBox(ENVIRONMENT, new String[]{"Default"}, "The environment to set for all requests")
                .setEnabled(proVersion);
        advForm.addComboBox(ENDPOINT, new String[]{""}, "endpoint to forward to");
        advForm.addTextField(HOSTPORT, "Host:Port to use for requests", XForm.FieldType.TEXT);
        advForm.addSeparator();
        advForm.addTextField(USERNAME, "The username to set for all requests", XForm.FieldType.TEXT);
        advForm.addTextField(PASSWORD, "The password to set for all requests", XForm.FieldType.PASSWORD);
        advForm.addTextField(DOMAIN, "The domain to set for all requests", XForm.FieldType.TEXT);
        advForm.addComboBox(WSSTYPE, new String[]{"", "Text", "Digest"}, "The username to set for all requests");

        reportForm = builder.createForm("Reports");
        reportForm.addCheckBox(PRINTREPORT, "Prints a summary report to the console");
        reportForm.addCheckBox(EXPORTJUNITRESULTS, "Exports results to a JUnit-Style report");
        reportForm.addCheckBox(EXPORTALL, "Exports all results (not only errors)");
        reportForm.addTextField(ROOTFOLDER, "Folder to export to", XForm.FieldType.FOLDER);
        reportForm.addSeparator();
        reportForm.addCheckBox(COVERAGE, "Generate WSDL Coverage report (SoapUI Pro only)").setEnabled(proVersion);
        reportForm.addCheckBox(OPEN_REPORT, "Opens generated report(s) in browser (SoapUI Pro only)").setEnabled(
                proVersion);
        reportForm.addComboBox(GENERATEREPORTSEACHTESTCASE, new String[0],
                "Template used to generate report (SoapUI Pro only)").setEnabled(proVersion);
        reportForm.addTextField(REPORTFORMAT, "Choose report format(s), comma-separated (SoapUI Pro only)",
                XForm.FieldType.TEXT).setEnabled(proVersion);

        propertyForm = builder.createForm("Properties");
        propertyForm.addComponent(GLOBALPROPERTIES, createTextArea());
        propertyForm.addComponent(SYSTEMPROPERTIES, createTextArea());
        propertyForm.addComponent(PROJECTPROPERTIES, createTextArea());

        setToolsSettingsAction(null);
        buildArgsForm(builder, false, "TestRunner");

        return builder.buildDialog(buildDefaultActions(HelpUrls.TESTRUNNER_HELP_URL, modelItem),
                "Specify arguments for launching SoapUI TestRunner", UISupport.TOOL_ICON);
    }
View Full Code Here

        return values;
    }

    protected XFormDialog buildDialog(Interface modelItem) {
        XFormDialogBuilder builder = XFormFactory.createDialogBuilder("JAXB Artifacts");

        XForm mainForm = builder.createForm("Basic");
        addWSDLFields(mainForm, modelItem);

        mainForm.addTextField(OUTPUT, "generated files will go into this directory", XForm.FieldType.PROJECT_FOLDER);
        mainForm.addTextField(PACKAGE, "the target package", XForm.FieldType.JAVA_PACKAGE);

        mainForm.addTextField(BINDINGS, "external bindings file(s), comma-separated", XForm.FieldType.PROJECT_FILE);
        mainForm.addTextField(CATALOG, "catalog files to resolve external entity references",
                XForm.FieldType.PROJECT_FILE);
        mainForm.addTextField(CLASSPATH, "where to find user class files", XForm.FieldType.PROJECT_FOLDER);

        mainForm.addTextField(HTTPPROXY, "set HTTP/HTTPS proxy. Format is [user[:password]@]proxyHost[:proxyPort]",
                XForm.FieldType.TEXT);
        mainForm.addCheckBox(READONLY, "(generated files will be in read-only mode)");
        mainForm.addCheckBox(NOVALIDATION, "(do not resolve strict validation of the input schema(s))");
        mainForm.addCheckBox(NPA, "(suppress generation of package level annotations (**/package-info.java))");

        mainForm.addCheckBox(VERBOSE, "(be extra verbose)");

        buildArgsForm(builder, false, "xjc");

        return builder.buildDialog(buildDefaultActions(HelpUrls.JABXJC_HELP_URL, modelItem),
                "Specify arguments for the JAXB 2 xjc compiler", UISupport.TOOL_ICON);
    }
View Full Code Here

            SoapUI.logError(e);
        }
    }

    protected XFormDialog buildDialog(Interface modelItem) {
        XFormDialogBuilder builder = XFormFactory.createDialogBuilder("Axis2 artifacts");
        XForm mainForm = builder.createForm("Basic");

        addWSDLFields(mainForm, modelItem);

        mainForm.addTextField(OUTPUT, "root directory for generated files.", XForm.FieldType.PROJECT_FOLDER);
        mainForm.addTextField(PACKAGE, "target package nam", XForm.FieldType.JAVA_PACKAGE);

        XFormField dbComboBox = mainForm.addComboBox(DATABINDING, new String[]{"xmlbeans", "adb", "jibx", "jaxme"},
                "Specifies the Databinding framework.");

        mainForm.addCheckBox(ASYNC, "(generate code only for async style)");
        mainForm.addCheckBox(SYNC, "(generate code only for sync style)");
        mainForm.addCheckBox(TESTCASE, "(Generate a test case)");

        XFormField serverSideCB = mainForm.addCheckBox(SERVERSIDE, "(Generate server side code (i.e. skeletons))");

        XFormField ssiCB = mainForm.addCheckBox(SERVERSIDEINTERFACE, "(Generate interface for server side)");
        XFormField sdCB = mainForm.addCheckBox(SERICEDESCRIPTOR, "(Generate the service descriptor (i.e. server.xml).)");
        serverSideCB.addComponentEnabler(ssiCB, "true");
        serverSideCB.addComponentEnabler(sdCB, "true");

        XForm advForm = builder.createForm("Advanced");

        advForm.addCheckBox(GENERATEALL, "(Genrates all the classes)");
        advForm.addCheckBox(UNPACK, "(Unpacks the databinding classes)");

        advForm.addTextField(SERVICE_NAME, "the service name to be code generated", XForm.FieldType.TEXT);
        advForm.addTextField(PORT_NAME, "the port name to be code generated", XForm.FieldType.TEXT);

        advForm.addComponent(NAMESPACE_MAPPING, new NamespaceTable((WsdlInterface) modelItem));

        XFormField adbWrapCB = advForm.addCheckBox(ADB_WRAP,
                "(Sets the packing flag. if true the classes will be packed.)");
        XFormField adbWriteCB = advForm.addCheckBox(ADB_WRITE,
                "(Sets the write flag. If set to true the classes will be written by ADB)");
        XFormTextField jibxCB = advForm.addTextField(JIBX_BINDING_FILE, "The JIBX binding file to use",
                XForm.FieldType.PROJECT_FILE);
        dbComboBox.addComponentEnabler(adbWrapCB, "adb");
        dbComboBox.addComponentEnabler(adbWriteCB, "adb");
        dbComboBox.addComponentEnabler(jibxCB, "jibx");

        buildArgsForm(builder, false, "WSDL2Java");

        return builder.buildDialog(buildDefaultActions(HelpUrls.AXIS2X_HELP_URL, modelItem),
                "Specify arguments for Axis 2.X Wsdl2Java", UISupport.TOOL_ICON);
    }
View Full Code Here

    protected XFormDialog buildDialog(WsdlInterface modelItem) {
        if (modelItem == null) {
            return null;
        }

        XFormDialogBuilder builder = XFormFactory.createDialogBuilder("Launch TcpMon");

        mainForm = builder.createForm("Basic");
        mainForm.addComboBox(ENDPOINT, new String[]{""}, "endpoint to forward to");
        mainForm.addTextField(PORT, "Local port to listen on.", XForm.FieldType.TEXT);
        mainForm.addCheckBox(ADD_ENDPOINT, "adds an endpoint to the interface pointing to the started monitor");

        return builder.buildDialog(buildDefaultActions(HelpUrls.TCPMON_HELP_URL, modelItem),
                "Specify arguments for launching TcpMon", UISupport.TOOL_ICON);
    }
View Full Code Here

TOP

Related Classes of com.eviware.x.form.XFormDialogBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.