Package com.eviware.soapui.model.security

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


      if( node instanceof SecurityScanNode )
      {
        // one selected
        if( securityTestTree.getSelectionRows().length == 1 )
        {
          SecurityScan scan = ( ( SecurityScanNode )node ).getSecurityScan();
          enableDisableSecurityScan.setText( scan.isDisabled() );
          if( scan instanceof AbstractSecurityScanWithProperties )
            securityScanWithPropertiesPopUp.show( securityTestTree, e.getX(), e.getY() );
          else
            securityScanPopUp.show( securityTestTree, e.getX(), e.getY() );
        }
View Full Code Here


      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

    }

    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

      }

      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

    executionProgressStatus = status;
  }

  public void detectMissingItems()
  {
    SecurityScan securityCheck = getSecurityScan();
    if( getStatus().equals( ResultStatus.SKIPPED ) )
    {
      executionProgressStatus = ResultStatus.SKIPPED;
    }
    if( securityCheck instanceof AbstractSecurityScanWithProperties
        && ( ( AbstractSecurityScanWithProperties )securityCheck ).getParameterHolder().getParameterList().size() == 0 )
    {
      logIconStatus = ResultStatus.MISSING_PARAMETERS;
      executionProgressStatus = ResultStatus.MISSING_PARAMETERS;
    }
    if( securityCheck.getAssertionCount() == 0 )
    {
      logIconStatus = ResultStatus.MISSING_ASSERTIONS;
      executionProgressStatus = ResultStatus.MISSING_ASSERTIONS;
    }
    if( getStatus().equals( ResultStatus.CANCELED ) )
View Full Code Here

            }
            Map<String, List<SecurityScan>> secScanMap = securityTest.getSecurityScansMap();
            if (secScanMap.containsKey(currentStep.getId())) {
                List<SecurityScan> testStepScansList = secScanMap.get(currentStep.getId());
                for (int i = 0; i < testStepScansList.size(); i++) {
                    SecurityScan securityScan = testStepScansList.get(i);
                    // if security scan is disabled skip it.
                    if (securityScan.isDisabled() || securityScan.isSkipFurtherRunning()) {
                        continue;
                    }
                    //if step is failed and scan not applicable to failed steps just set it to skipped
                    //run scan otherwise
                    if (stepResult.getStatus() == TestStepStatus.FAILED && !securityScan.isApplyForFailedStep()) {
                        SecurityScanResult securityScanResult = new SecurityScanResult(securityScan);
                        if (securityScan.getAssertionCount() > 0) {
                            securityScanResult.setStatus(ResultStatus.OK);
                        } else if (securityScan instanceof AbstractSecurityScanWithProperties) {
                            if (((AbstractSecurityScanWithProperties) securityScan).getParameterHolder().getParameterList()
                                    .size() > 0) {
                                securityScanResult.setStatus(ResultStatus.OK);
View Full Code Here

        testSteps.remove(ix);
        for (SecurityTest securityTest : getSecurityTestList()) {
            List<SecurityScan> testStepChecks = securityTest.getTestStepSecurityScans(testStep.getId());
            for (Iterator<SecurityScan> iterator = testStepChecks.iterator(); iterator.hasNext(); ) {
                SecurityScan chk = iterator.next();
                securityTest.removeSecurityScanWhenRemoveTestStep(testStep, chk);
                iterator.remove();
            }

        }
View Full Code Here

        if (node instanceof SecurityScanNode) {
            if (securityTest.isRunning()) {
                return;
            }
            SecurityScan securityScan = ((SecurityScanNode) securityTestTree.getLastSelectedPathComponent())
                    .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();
            }
        } else {
View Full Code Here

        }
        if ((e.getModifiers() & InputEvent.BUTTON3_MASK) == InputEvent.BUTTON3_MASK) {
            if (node instanceof SecurityScanNode) {
                // one selected
                if (securityTestTree.getSelectionRows().length == 1) {
                    SecurityScan scan = ((SecurityScanNode) node).getSecurityScan();
                    enableDisableSecurityScan.setText(scan.isDisabled());
                    if (scan instanceof AbstractSecurityScanWithProperties) {
                        securityScanWithPropertiesPopUp.show(securityTestTree, e.getX(), e.getY());
                    } else {
                        securityScanPopUp.show(securityTestTree, e.getX(), e.getY());
                    }
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.