Package com.eviware.soapui.model.security

Examples of com.eviware.soapui.model.security.SecurityScan


            String type = SoapUI.getSoapUICore().getSecurityScanRegistry().getSecurityScanTypeForName(name);
            if (type == null || type.trim().length() == 0) {
                return;
            }

            SecurityScan securityScan = securityTest.addNewSecurityScan(testStep, name);
            if (securityScan == null) {
                UISupport.showErrorMessage("Failed to add security scan");
                return;
            }

            securityScan.setRunOnlyOnce(true);

            securityTestTree.setSelectionPath(new TreePath(node.getPath()));

            SecurityConfigurationDialog dialog = SoapUI.getSoapUICore().getSecurityScanRegistry().getUIBuilder()
                    .buildSecurityScanConfigurationDialog((SecurityScan) securityScan);
View Full Code Here


        }

        @Override
        public void actionPerformed(ActionEvent arg0) {
            SecurityScanNode node = (SecurityScanNode) securityTestTree.getLastSelectedPathComponent();
            SecurityScan securityScan = node.getSecurityScan();
            securityScan.setDisabled(!securityScan.isDisabled());
        }
View Full Code Here

            setEnabled(false);
        }

        public void actionPerformed(ActionEvent e) {
            SecurityScanNode node = (SecurityScanNode) securityTestTree.getLastSelectedPathComponent();
            SecurityScan securityScan = node.getSecurityScan();

            if (securityScan.isConfigurable()) {
                SecurityScanConfig backupScanConfig = (SecurityScanConfig) securityScan.getConfig().copy();

                SecurityConfigurationDialog dialog = SoapUI.getSoapUICore().getSecurityScanRegistry().getUIBuilder()
                        .buildSecurityScanConfigurationDialog((SecurityScan) securityScan);

                if (!dialog.configure()) {
                    securityScan.copyConfig(backupScanConfig);
                }

                dialog.release();
            }
        }
View Full Code Here

                return;
            }

            if (securityTestTree.getSelectionCount() == 1) {
                SecurityScanNode node = (SecurityScanNode) securityTestTree.getLastSelectedPathComponent();
                SecurityScan securityScan = node.getSecurityScan();

                TestStep testStep = ((TestStepNode) node.getParent()).getTestStep();
                if (UISupport.confirm("Remove security scan [" + securityScan.getName() + "]", "Remove SecurityScan")) {
                    securityTest.removeSecurityScan(testStep, (SecurityScan) securityScan);
                }
            } else {
                SecurityScanNode node = (SecurityScanNode) securityTestTree.getLastSelectedPathComponent();

                TestStep testStep = ((TestStepNode) node.getParent()).getTestStep();
                if (UISupport.confirm("Remove all selected security scans", "Remove SecurityScan")) {
                    for (TreePath path : securityTestTree.getSelectionPaths()) {
                        if (path.getLastPathComponent() instanceof SecurityScanNode) {
                            SecurityScan securityScan = ((SecurityScanNode) path.getLastPathComponent()).getSecurityScan();
                            securityTest.removeSecurityScan(testStep, (SecurityScan) securityScan);
                        }
                    }
                }
            }
View Full Code Here

     * @param factory
     * @param newScanConfig
     * @return
     */
    public SecurityScan addSecurityScan(TestStep testStep, SecurityScanFactory factory, SecurityScanConfig newScanConfig) {
        SecurityScan newSecScan = null;

        boolean hasScans = false;
        List<TestStepSecurityTestConfig> testStepSecurityTestList = getConfig().getTestStepSecurityTestList();
        if (!testStepSecurityTestList.isEmpty()) {
            for (int i = 0; i < testStepSecurityTestList.size(); i++) {
View Full Code Here

                                    .getTestStepSecurityScanList()) {
                                TestStep testStep = null;
                                for (TestStep ts : testCase.getTestSteps().values()) {
                                    if (testStepSecurityTestListConfig.getTestStepId().equals(ts.getId())) {
                                        testStep = ts;
                                        SecurityScan securityScan = SoapUI.getSoapUICore().getSecurityScanRegistry()
                                                .getFactory(secScanConfig.getType())
                                                .buildSecurityScan(testStep, secScanConfig, this);
                                        scanList.add(securityScan);
                                    }
                                }
View Full Code Here

    }

    public SecurityScan getTestStepSecurityScanByName(String testStepId, String securityScanName) {
        List<SecurityScan> securityScansList = getTestStepSecurityScans(testStepId);
        for (int c = 0; c < securityScansList.size(); c++) {
            SecurityScan securityScan = getTestStepSecurityScanAt(testStepId, c);
            if (securityScanName.equals(securityScan.getName())) {
                return securityScan;
            }
        }

        return null;
View Full Code Here

                if (testStepSecurityTest.getTestStepId().equals(testStep.getId())) {
                    List<SecurityScanConfig> securityScanList = testStepSecurityTest.getTestStepSecurityScanList();
                    SecurityScanFactory factory = SoapUI.getSoapUICore().getSecurityScanRegistry()
                            .getFactory(securityScan.getType());
                    SecurityScanConfig newSecScanConfig = (SecurityScanConfig) securityScan.getConfig().copy();
                    SecurityScan newSecScan = factory.buildSecurityScan(testStep, newSecScanConfig, this);

                    securityScanList.remove(securityScan.getConfig());
                    securityScanList.add(index + offset, newSecScanConfig);
                    SecurityScanConfig[] cc = new SecurityScanConfig[securityScanList.size()];
                    for (int i = 0; i < securityScanList.size(); i++) {
View Full Code Here

        List<ModelItem> result = new ArrayList<ModelItem>();
        Set<String> testStepIds = getSecurityScansMap().keySet();
        for (String testStepId : testStepIds) {
            List<SecurityScan> t = getSecurityScansMap().get(testStepId);
            for (int i = 0; i < t.size(); i++) {
                SecurityScan scan = t.get(i);
                result.add((ModelItem) scan);
            }
        }
        return result;
    }
View Full Code Here

            } else {
                fireIntervalRemoved(this, startCheckIndex, size);
            }

        } else {
            SecurityScan securityCheck = securityCheckResult.getSecurityScan();
            securityCheckResult.detectMissingItems();
            StringBuilder outStr = new StringBuilder("SecurityScan ");
            String statusToDisplay = getStatusToDisplay(securityCheckResult.getExecutionProgressStatus());
            outStr.append(checkCount).append(" [").append(securityCheck.getName()).append("] ").append(
                    statusToDisplay).append(", took = ").append(securityCheckResult.getTimeTaken());
            try {
                if (startCheckIndex > 0 && startCheckIndex < maxSize) {
                    items.set(startCheckIndex, outStr.toString());
                    SoftReference<SecurityResult> checkResultRef = new SoftReference<SecurityResult>(securityCheckResult);
View Full Code Here

TOP

Related Classes of com.eviware.soapui.model.security.SecurityScan

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.