Package com.eviware.x.form

Examples of com.eviware.x.form.XFormDialogBuilder


    public WSCompileAction() {
        super("JAX-RPC Artifacts", "Generates JAX-RPC artifacts using wscompile");
    }

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

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

        mainForm
                .addTextField(PACKAGE, "the package of the classes generated by wscompile", XForm.FieldType.JAVA_PACKAGE);
        mainForm.addTextField(OUTPUT, "where to place generated output files", XForm.FieldType.PROJECT_FOLDER);
        mainForm.addCheckBox(KEEP, "(Keep generated files)");
        mainForm.addTextField(MAPPING, "Generate a J2EE mapping.xml file", XForm.FieldType.PROJECT_FILE);
        mainForm.addTextField(MODEL, "Write the internal model to the given file", XForm.FieldType.PROJECT_FILE);
        mainForm.addTextField(SOURCE, "Where to place generated source files", XForm.FieldType.PROJECT_FOLDER);
        mainForm.addTextField(NONCLASS, "Where to place non-class generated files", XForm.FieldType.PROJECT_FOLDER);
        mainForm.addCheckBox(OPTIMIZE, "(Optimize generated code)");
        mainForm.addCheckBox(DEBUG, "(Generate debugging info)");
        mainForm.addComboBox(SOURCE_VERSION, new String[]{"1.0.1", "1.0.3", "1.1", "1.1.1", "1.1.2"},
                "Generate code for the specified JAX-RPC SI version");
        mainForm.addTextField(SECURITY, "Security configuration file to generate security code",
                XForm.FieldType.PROJECT_FILE);
        mainForm.addTextField(PROXY, "Specify a HTTP proxy server", XForm.FieldType.URL);

        XForm featuresForm = builder.createForm("Features");

        featuresForm.addCheckBox(DATAHANDLERONLY, "(Always map attachments to the DataHandler type)");
        featuresForm.addCheckBox(DONOTUNWRAP, "(Disable unwrapping of document/literal wrapper elements in WSI mode)");
        featuresForm.addCheckBox(EXPLICITCONTEXT, "(Turn on explicit service context mapping)");
        featuresForm.addCheckBox(JAXBENUMTYPE, "(Map anonymous enumeration to its base type)");
        featuresForm.addCheckBox(NODATABINDING, "(Turn off data binding for literal encoding)");
        featuresForm.addCheckBox(NOENCODEDTYPES, "(Turn off encoding type information)");
        featuresForm.addCheckBox(NOMULTIREFS, "(Turn off support for multiple references)");
        featuresForm.addCheckBox(NORPCSTRUCTURES, "(Do not generate RPC structures)");
        featuresForm.addCheckBox(NOVALIDATION, "(Turn off full validation of imported WSDL documents)");
        featuresForm.addCheckBox(RESOLVEIDREF, "(Resolve xsd:IDREF)");
        featuresForm.addCheckBox(SEARCHSCHEMA, "(Search schema aggressively for types)");
        featuresForm.addCheckBox(SERIALIZEINTERFACES, "(Turn on direct serialization of interface types)");
        featuresForm.addCheckBox(STRICT, "(Generate code strictly compliant with JAXRPC spec)");
        featuresForm.addCheckBox(UNWRAP, "(Enable unwrapping of document/literal wrapper elements in WSI mode)");
        featuresForm.addCheckBox(WSI,
                "(Enable WSI-Basic Profile features, to be used for document/literal and rpc/literal)");

        XForm advForm = builder.createForm("Advanced");
        advForm.addNameSpaceTable(NAMESPACE_MAPPING, modelItem);

        buildArgsForm(builder, false, "wscompile");

        ActionList actions = buildDefaultActions(HelpUrls.WSCOMPILE_HELP_URL, modelItem);
        actions.addAction(new WSCompileShowConfigFileAction("JAX-RPC wscompile",
                "Contents of generated config.xml file", modelItem));

        return builder.buildDialog(actions, "Specify arguments for JAX-RPC wscompile", UISupport.TOOL_ICON);
    }
View Full Code Here


        values.putIfMissing(SOAPCPP2, Boolean.toString(true));
        return values;
    }

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

        XForm wsdl2hAdvForm = builder.createForm("wsdl2h");

        wsdl2hAdvForm.addCheckBox(WSDL2H, null);
        addWSDLFields(wsdl2hAdvForm, modelItem);

        wsdl2hAdvForm.addTextField(WSDL2H_OUTPUT, "name of output file", XForm.FieldType.PROJECT_FILE);

        XForm soapcpp2AdvForm = builder.createForm("soapcpp2");

        soapcpp2AdvForm.addCheckBox(SOAPCPP2, null);

        wsdl2hAdvForm.addCheckBox(GENERATE_INDEXED_STRUCT, null);
        wsdl2hAdvForm.addCheckBox(GENERATE_C_SOURCE, null);
        wsdl2hAdvForm.addCheckBox(DOM, null);
        wsdl2hAdvForm.addCheckBox(DONT_QUALIFY_ENUM_NAMES, null);
        wsdl2hAdvForm.addCheckBox(FLAT_CPP_CLASS_HIERARCHY, null);
        wsdl2hAdvForm.addCheckBox(GLOBAL_TOP_LEVEL_DECLARATIONS, null);
        wsdl2hAdvForm.addTextField(PATH, "use path to find files", XForm.FieldType.PROJECT_FOLDER);
        wsdl2hAdvForm.addCheckBox(INCLUDE_LICENSE_INFORMATION, null);
        wsdl2hAdvForm.addCheckBox(USE_XSD_H, null);
        wsdl2hAdvForm.addTextField(BASE_NAMESPACE_PREFIX_INSTEAD_OF_NS,
                "use name as the base namespace prefix name instead of ns", XForm.FieldType.TEXT);
        wsdl2hAdvForm.addTextField(BASE_NAMESPACE_PREFIX_FOR_SERVICE_NS,
                "use name as the base namespace prefix name for service namespaces", XForm.FieldType.TEXT);

        wsdl2hAdvForm.addCheckBox(POLYMORPHIC_TYPES, null);
        wsdl2hAdvForm.addTextField(PROXY_HOST_PORT, "connect via proxy host and port (host:port)", XForm.FieldType.TEXT);
        wsdl2hAdvForm.addCheckBox(NO_STL, null);
        wsdl2hAdvForm.addTextField(TYPE_MAP_FILE, "use type map file instead of the default file typemap.dat",
                XForm.FieldType.PROJECT_FILE);
        wsdl2hAdvForm.addCheckBox(NO_UNIONS, null);
        wsdl2hAdvForm.addCheckBox(VERBOSE, null);
        wsdl2hAdvForm.addCheckBox(WRAP_RESPONSE_STRUCT, null);
        wsdl2hAdvForm.addCheckBox(NO_ANY, null);
        wsdl2hAdvForm.addCheckBox(TYPEDEF_SYNONYMS, null);

        soapcpp2AdvForm.addCheckBox(SOAP_11, null);
        soapcpp2AdvForm.addCheckBox(SOAP_12, null);
        soapcpp2AdvForm.addCheckBox(CLIENT_SIDE, null);
        soapcpp2AdvForm.addCheckBox(SERVER_SIDE, null);
        soapcpp2AdvForm.addCheckBox(NO_LIB, null);
        soapcpp2AdvForm.addCheckBox(SOAP_ACTION, null);
        soapcpp2AdvForm.addCheckBox(GENERATE_C_SOURCE_CPP, null);
        // soapcpp2AdvForm.addTextField(SAVE_PATH, "", XForm.FieldType.DIRECTORY);
        soapcpp2AdvForm.addCheckBox(SOAP_RPC, null);
        soapcpp2AdvForm.addCheckBox(SERVICE_PROXIES, null);
        soapcpp2AdvForm.addTextField(IMPORT_PATH, "use path(s) for #import", XForm.FieldType.PROJECT_FOLDER);
        soapcpp2AdvForm.addCheckBox(GENERATE_LINKABLE_MODULES, null);
        soapcpp2AdvForm.addCheckBox(GENERATE_MATLAB_CODE, null);
        soapcpp2AdvForm.addCheckBox(SERVICE_NAME, null);
        soapcpp2AdvForm.addTextField(NAME_PREFIX, "save files with new prefix name instead of 'soap'",
                XForm.FieldType.TEXT);
        soapcpp2AdvForm.addCheckBox(XSI_TYPED, null);
        soapcpp2AdvForm.addCheckBox(NO_GEN_WSDL_SCHEMA, null);
        soapcpp2AdvForm.addCheckBox(NO_GEN_SAMPLE_XML, null);

        return builder.buildDialog(buildDefaultActions(HelpUrls.GSOAP_HELP_URL, modelItem),
                "Specify arguments for GSoap wsdl2h and soap2cpp", UISupport.TOOL_ICON);
    }
View Full Code Here

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

        XFormDialogBuilder builder = XFormFactory.createDialogBuilder("Launch Security 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[]{}, "TestCase").addFormFieldListener(new XFormFieldListener() {

            public void valueChanged(XFormField sourceField, String newValue, String oldValue) {
                List<String> securityTests = new ArrayList<String>();
                String st = mainForm.getComponentValue(SECURITY_TEST_NAME);

                if (newValue.equals(ALL_VALUE)) {
                    for (TestSuite testSuite : testSuites) {
                        for (TestCase testCase : testSuite.getTestCaseList()) {
                            for (SecurityTest securityTest : testCase.getSecurityTestList()) {
                                if (!securityTests.contains(securityTest.getName())) {
                                    securityTests.add(securityTest.getName());
                                }
                            }
                        }
                    }
                } else {
                    TestCase testCase = null;
                    try {
                        testCase = getModelItem().getTestSuiteByName(mainForm.getComponentValue(TESTSUITE))
                                .getTestCaseByName(mainForm.getComponentValue(TESTCASE));
                    } catch (NullPointerException npe) {
                    }
                    if (testCase != null) {
                        securityTests.addAll(Arrays.asList(ModelSupport.getNames(testCase.getSecurityTestList())));
                    }
                }

                securityTests.add(0, ALL_VALUE);
                mainForm.setOptions(SECURITY_TEST_NAME, securityTests.toArray());

                if (securityTests.contains(st)) {
                    mainForm.getFormField(SECURITY_TEST_NAME).setValue(st);
                }
            }
        });

        mainForm.addComboBox(SECURITY_TEST_NAME, new String[]{}, "The Security Test to run");
        mainForm.addCheckBox(SAVEPROJECT, "Saves project before running").setEnabled(!modelItem.isRemote());
        mainForm.addSeparator();
        mainForm.addTextField(TESTRUNNERPATH, "Folder containing SecurityTestRunner.bat to use", XForm.FieldType.FOLDER);

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

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

    public boolean canCreate() {
        return true;
    }

    private void buildDialog() {
        XFormDialogBuilder builder = XFormFactory.createDialogBuilder("Add Request to TestCase");
        XForm mainForm = builder.createForm("Basic");

        mainForm.addTextField(STEP_NAME, "Name of TestStep", XForm.FieldType.URL).setWidth(30);

        mainForm.addCheckBox(ADD_SOAP_RESPONSE_ASSERTION, "(adds validation that response is a SOAP message)");
        mainForm.addCheckBox(ADD_SCHEMA_ASSERTION, "(adds validation that response complies with its schema)");
        mainForm.addCheckBox(ADD_SOAP_FAULT_ASSERTION, "(adds validation that response is not a SOAP Fault)");
        mainForm.addCheckBox(CREATE_OPTIONAL_ELEMENTS_IN_REQUEST, "(creates optional content in sample request)");

        dialog = builder.buildDialog(builder.buildOkCancelActions(),
                "Specify options for adding a new request to a TestCase", UISupport.OPTIONS_ICON);

        dialogValues.put(ADD_SOAP_RESPONSE_ASSERTION, Boolean.TRUE.toString());
    }
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.