Examples of XFormFieldListener


Examples of com.eviware.x.form.XFormFieldListener

  public void perform( WsdlProject project, Object param )
  {
    if( dialog == null )
    {
      dialog = ADialogBuilder.buildDialog( Form.class );
      dialog.getFormField( Form.INITIALWSDL ).addFormFieldListener( new XFormFieldListener()
      {
        public void valueChanged( XFormField sourceField, String newValue, String oldValue )
        {
          String value = newValue.toLowerCase().trim();
View Full Code Here

Examples of com.eviware.x.form.XFormFieldListener

  public void perform( WsdlMockService mockService, Object param )
  {
    if( dialog == null )
      dialog = ADialogBuilder.buildDialog( Form.class );

    dialog.getFormField( Form.CLONE_DESCRIPTION ).addFormFieldListener( new XFormFieldListener()
    {

      public void valueChanged( XFormField sourceField, String newValue, String oldValue )
      {
        if( dialog.getBooleanValue( Form.CLONE_DESCRIPTION ) )
View Full Code Here

Examples of com.eviware.x.form.XFormFieldListener

    this.testStep = target;

    if( dialog == null )
    {
      dialog = ADialogBuilder.buildDialog( Form.class );
      dialog.getFormField( Form.INTERFACE ).addFormFieldListener( new XFormFieldListener()
      {

        public void valueChanged( XFormField sourceField, String newValue, String oldValue )
        {
          WsdlProject project = testStep.getMockService().getProject();
          dialog.setOptions( Form.OPERATION,
              ModelSupport.getNames( project.getInterfaceByName( newValue ).getOperationList() ) );
          WsdlOperation operation = testStep.getOperation();
          dialog.setValue( Form.OPERATION, operation == null ? "" : operation.getName() );
        }
      } );

      dialog.getFormField( Form.RECREATE_REQUEST ).addFormFieldListener( new XFormFieldListener()
      {

        public void valueChanged( XFormField sourceField, String newValue, String oldValue )
        {
          boolean enabled = Boolean.parseBoolean( newValue );
View Full Code Here

Examples of com.eviware.x.form.XFormFieldListener

      // final String soapUITestSuite = mockService.getTestSuite().getName();
      final String soapUIProjectPath = mockService.getProject().getPath();
      if( dialog == null )
        dialog = ADialogBuilder.buildDialog( Form.class );

      dialog.getFormField( Form.PROJECT ).addFormFieldListener( new XFormFieldListener()
      {

        public void valueChanged( XFormField sourceField, String newValue, String oldValue )
        {
          dialog.setOptions( Form.TESTCASE, IntegrationUtils.getAvailableTestCases( newValue ) );
          if( dialog.getValue( Form.TESTCASE ).equals( IntegrationUtils.CREATE_ON_PROJECT_LEVEL ) )
          {
            dialog.setOptions( Form.MOCKSERVICERUNNER,
                IntegrationUtils.getAvailableRunners( newValue, IntegrationUtils.CREATE_ON_PROJECT_LEVEL ) );
          }
        }
      } );
      dialog.getFormField( Form.TESTCASE ).addFormFieldListener( new XFormFieldListener()
      {

        public void valueChanged( XFormField sourceField, String newValue, String oldValue )
        {
          if( newValue.equals( IntegrationUtils.CREATE_NEW_OPTION ) )
View Full Code Here

Examples of com.eviware.x.form.XFormFieldListener

  private static void ensureDialog()
  {
    if( dialog == null )
    {
      dialog = ADialogBuilder.buildDialog( CreateForm.class );
      dialog.getFormField( CreateForm.INTERFACE ).addFormFieldListener( new XFormFieldListener()
      {

        public void valueChanged( XFormField sourceField, String newValue, String oldValue )
        {
          WsdlInterface iface = ( WsdlInterface )project.getInterfaceByName( newValue );
View Full Code Here

Examples of com.eviware.x.form.XFormFieldListener

  {
    if( dialog == null )
    {
      XFormDialogBuilder builder = XFormFactory.createDialogBuilder( "SecurityTest Options" );
      form = builder.createForm( "Basic" );
      form.addCheckBox( FAIL_ON_ERROR, "Fail on error" ).addFormFieldListener( new XFormFieldListener()
      {

        public void valueChanged( XFormField sourceField, String newValue, String oldValue )
        {
          form.getFormField( FAIL_SECURITYTEST_ON_ERROR ).setEnabled( !Boolean.parseBoolean( newValue ) );
View Full Code Here

Examples of com.eviware.x.form.XFormFieldListener

          return null;
        }
      } );

      dialog.getFormField( Form.SERVICEENDPOINT ).addFormFieldListener( new XFormFieldListener()
      {
        public void valueChanged( XFormField sourceField, String newValue, String oldValue )
        {
          boolean enable = false;

          try
          {
            URL url = new URL( newValue );
            enable = url.getPath().length() > 0
                && !( url.getPath().length() == 1 && url.getPath().charAt( 0 ) == '/' );
          }
          catch( MalformedURLException e )
          {
          }

          dialog.getFormField( Form.EXTRACTPARAMS ).setEnabled( enable );
        }
      } );

      dialog.getFormField( Form.EXTRACTPARAMS ).setEnabled( false );
      dialog.getFormField( Form.EXTRACTPARAMS ).addFormFieldListener( new XFormFieldListener()
      {
        public void valueChanged( XFormField sourceField, String newValue, String oldValue )
        {
          dialog.getFormField( Form.CREATERESOURCE ).setEnabled( !dialog.getBooleanValue( Form.EXTRACTPARAMS ) );
        }
View Full Code Here

Examples of com.eviware.x.form.XFormFieldListener

    applyAction.setDialog( dialog );

    final TestCase testCase = securityScan.getTestStep().getTestCase();
    final Project project = testCase.getTestSuite().getProject();

    dialog.getFormField( CloneParameterDialog.TARGET_TESTSUITE ).addFormFieldListener( new XFormFieldListener()
    {
      public void valueChanged( XFormField sourceField, String newValue, String oldValue )
      {
        TestSuite testSuite = project.getTestSuiteByName( newValue );
        String[] testCaseNames = ModelSupport.getNames( testSuite.getTestCaseList() );
        dialog.setOptions( CloneParameterDialog.TARGET_TESTCASE, testCaseNames );

        if( testCaseNames.length > 0 )
        {
          dialog.setValue( CloneParameterDialog.TARGET_TESTCASE, testCaseNames[0] );
          TestCase testCase = testSuite.getTestCaseByName( testCaseNames[0] );

          String[] testStepNames = new String[0];
          String[] securityTestNames = ModelSupport.getNames( testCase.getSecurityTestList() );
          dialog.setOptions( CloneParameterDialog.TARGET_SECURITYTEST, securityTestNames );
          if( securityTestNames.length > 0 )
          {
            testStepNames = getSecurableTestStepsNames( testCase );
          }
          dialog.setOptions( CloneParameterDialog.TARGET_TESTSTEP, testStepNames );

          if( securityTestNames.length > 0 )
          {
            dialog.setValue( CloneParameterDialog.TARGET_SECURITYTEST, securityTestNames[0] );
            if( testStepNames.length > 0 )
            {
              dialog.setValue( CloneParameterDialog.TARGET_TESTSTEP, testStepNames[0] );
            }
            else
            {
              dialog.setOptions( CloneParameterDialog.TARGET_TESTSTEP, new String[0] );
            }

            String securityTestName = dialog.getValue( CloneParameterDialog.TARGET_SECURITYTEST );
            SecurityTest securityTest = testCase.getSecurityTestByName( securityTestName );
            String testStepName = dialog.getValue( CloneParameterDialog.TARGET_TESTSTEP );
            TestStep testStep = testCase.getTestStepByName( testStepName );
            String[] securityScanNames = ModelSupport.getNames( securityTest.getTestStepSecurityScanByType(
                testStep.getId(), AbstractSecurityScanWithProperties.class ) );
            dialog.setOptions( CloneParameterDialog.TARGET_SECURITYSCAN, securityScanNames );
          }
          else
          {
            dialog.setOptions( CloneParameterDialog.TARGET_SECURITYTEST, new String[0] );
            dialog.setOptions( CloneParameterDialog.TARGET_TESTSTEP, new String[0] );
            dialog.setOptions( CloneParameterDialog.TARGET_SECURITYSCAN, new String[0] );
          }
        }
        else
        {
          dialog.setOptions( CloneParameterDialog.TARGET_SECURITYTEST, new String[0] );
          dialog.setOptions( CloneParameterDialog.TARGET_TESTSTEP, new String[0] );
        }
      }
    } );
    dialog.getFormField( CloneParameterDialog.TARGET_TESTCASE ).addFormFieldListener( new XFormFieldListener()
    {
      public void valueChanged( XFormField sourceField, String newValue, String oldValue )
      {
        String testSuiteName = dialog.getValue( CloneParameterDialog.TARGET_TESTSUITE );
        TestSuite testSuite = project.getTestSuiteByName( testSuiteName );
        TestCase testCase = testSuite.getTestCaseByName( newValue );

        String[] testStepNames = new String[0];
        String[] securityTestNames = ModelSupport.getNames( testCase.getSecurityTestList() );
        dialog.setOptions( CloneParameterDialog.TARGET_SECURITYTEST, securityTestNames );
        if( securityTestNames.length > 0 )
        {
          testStepNames = getSecurableTestStepsNames( testCase );
        }
        dialog.setOptions( CloneParameterDialog.TARGET_TESTSTEP, testStepNames );

        if( securityTestNames.length > 0 )
        {
          dialog.setValue( CloneParameterDialog.TARGET_SECURITYTEST, securityTestNames[0] );
          if( testStepNames.length > 0 )
          {
            dialog.setValue( CloneParameterDialog.TARGET_TESTSTEP, testStepNames[0] );
          }
          else
          {
            dialog.setOptions( CloneParameterDialog.TARGET_TESTSTEP, new String[0] );
          }

          String securityTestName = dialog.getValue( CloneParameterDialog.TARGET_SECURITYTEST );
          SecurityTest securityTest = testCase.getSecurityTestByName( securityTestName );
          String testStepName = dialog.getValue( CloneParameterDialog.TARGET_TESTSTEP );
          TestStep testStep = testCase.getTestStepByName( testStepName );
          String[] securityScanNames = ModelSupport.getNames( securityTest.getTestStepSecurityScanByType(
              testStep.getId(), AbstractSecurityScanWithProperties.class ) );
          dialog.setOptions( CloneParameterDialog.TARGET_SECURITYSCAN, securityScanNames );
        }
        else
        {
          dialog.setOptions( CloneParameterDialog.TARGET_SECURITYTEST, new String[0] );
          dialog.setOptions( CloneParameterDialog.TARGET_TESTSTEP, new String[0] );
          dialog.setOptions( CloneParameterDialog.TARGET_SECURITYSCAN, new String[0] );
        }
      }
    } );
    dialog.getFormField( CloneParameterDialog.TARGET_TESTSTEP ).addFormFieldListener( new XFormFieldListener()
    {
      public void valueChanged( XFormField sourceField, String newValue, String oldValue )
      {
        String testSuiteName = dialog.getValue( CloneParameterDialog.TARGET_TESTSUITE );
        TestSuite testSuite = project.getTestSuiteByName( testSuiteName );
        String testCaseName = dialog.getValue( CloneParameterDialog.TARGET_TESTCASE );
        TestCase testCase = testSuite.getTestCaseByName( testCaseName );
        String securityTestName = dialog.getValue( CloneParameterDialog.TARGET_SECURITYTEST );
        SecurityTest securityTest = testCase.getSecurityTestByName( securityTestName );
        TestStep testStep = testCase.getTestStepByName( newValue );

        String[] securityScanNames = ModelSupport.getNames( securityTest.getTestStepSecurityScanByType(
            testStep.getId(), AbstractSecurityScanWithProperties.class ) );
        dialog.setOptions( CloneParameterDialog.TARGET_SECURITYSCAN, securityScanNames );
      }
    } );
    dialog.getFormField( CloneParameterDialog.TARGET_SECURITYTEST ).addFormFieldListener( new XFormFieldListener()
    {
      public void valueChanged( XFormField sourceField, String newValue, String oldValue )
      {
        String testSuiteName = dialog.getValue( CloneParameterDialog.TARGET_TESTSUITE );
        TestSuite testSuite = project.getTestSuiteByName( testSuiteName );
View Full Code Here

Examples of com.eviware.x.form.XFormFieldListener

    this.testStep = target;

    if( dialog == null )
    {
      dialog = ADialogBuilder.buildDialog( Form.class );
      dialog.getFormField( Form.INTERFACE ).addFormFieldListener( new XFormFieldListener()
      {

        public void valueChanged( XFormField sourceField, String newValue, String oldValue )
        {
          WsdlProject project = testStep.getTestCase().getTestSuite().getProject();
          dialog.setOptions( Form.OPERATION,
              ModelSupport.getNames( project.getInterfaceByName( newValue ).getOperationList() ) );
          dialog.setValue( Form.OPERATION, testStep.getOperationName() );
        }
      } );

      dialog.getFormField( Form.RECREATE_REQUEST ).addFormFieldListener( new XFormFieldListener()
      {

        public void valueChanged( XFormField sourceField, String newValue, String oldValue )
        {
          boolean enabled = Boolean.parseBoolean( newValue );
View Full Code Here

Examples of com.eviware.x.form.XFormFieldListener

  public void perform( WsdlMockResponseTestStep mockResponseTestStep, Object param )
  {
    if( dialog == null )
    {
      dialog = ADialogBuilder.buildDialog( CreateForm.class );
      dialog.getFormField( CreateForm.INTERFACE ).addFormFieldListener( new XFormFieldListener()
      {

        public void valueChanged( XFormField sourceField, String newValue, String oldValue )
        {
          updateOperations( newValue );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.