Package com.eviware.soapui.support.types

Examples of com.eviware.soapui.support.types.StringToStringMap


  }

  public boolean show()
  {
    setReturnValue( XFormDialog.CANCEL_OPTION );
    show( new StringToStringMap() );
    return getReturnValue() == XFormDialog.OK_OPTION;
  }
View Full Code Here


      int ix = tabs.indexOfTab( initialTab );
      if( ix != -1 )
        tabs.setSelectedIndex( ix );
    }

    if( dialog.show( new StringToStringMap() ) )
    {
      for( Prefs pref : prefs )
        pref.getFormValues( settings );

      return true;
View Full Code Here

    return editorForm;
  }

  public void getFormValues( Settings settings )
  {
    StringToStringMap values = new StringToStringMap();
    editorForm.getValues( values );
    storeValues( values, settings );
  }
View Full Code Here

    backupFolder.setEnabled( settings.getBoolean( UISettings.CREATE_BACKUP ) );
  }

  public StringToStringMap getValues( Settings settings )
  {
    StringToStringMap values = new StringToStringMap();
    values.put( CLOSE_PROJECTS, settings.getBoolean( UISettings.CLOSE_PROJECTS ) );
    values.put( ORDER_PROJECTS, settings.getBoolean( UISettings.ORDER_PROJECTS ) );
    values.put( ORDER_SERVICES, settings.getBoolean( UISettings.ORDER_SERVICES ) );
    values.put( ORDER_REQUESTS, settings.getBoolean( UISettings.ORDER_REQUESTS ) );
    values.put( SHOW_DESCRIPTIONS, settings.getBoolean( UISettings.SHOW_DESCRIPTIONS ) );
    values.put( CREATE_BACKUP, settings.getBoolean( UISettings.CREATE_BACKUP ) );
    values.put( BACKUP_FOLDER, settings.getString( UISettings.BACKUP_FOLDER, "" ) );
    values.put( AUTOSAVE_INTERVAL, settings.getString( UISettings.AUTO_SAVE_INTERVAL, "0" ) );
    values.put( AUTOSAVE_ONEXIT, settings.getBoolean( UISettings.AUTO_SAVE_PROJECTS_ON_EXIT ) );
    values.put( LINEBREAK, settings.getBoolean( UISettings.LINEBREAK ) );

    if( SoapUI.isStandalone() )
    {
      values.put( DESKTOP_TYPE, settings.getString( UISettings.DESKTOP_TYPE, SoapUI.DEFAULT_DESKTOP ) );
      values.put( NATIVE_LAF, settings.getBoolean( UISettings.NATIVE_LAF ) );
    }

    values.put( ENABLE_GROOVY_LOG, settings.getBoolean( UISettings.DONT_DISABLE_GROOVY_LOG ) );
    if( SoapUI.isStandalone() )
    {
      values.put( SHOW_LOGS_AT_STARTUP, settings.getBoolean( UISettings.SHOW_LOGS_AT_STARTUP ) );
      values.put( SHOW_STARTUP_PAGE, settings.getBoolean( UISettings.SHOW_STARTUP_PAGE ) );
      values.put( DISABLE_TOOLTIPS, settings.getBoolean( UISettings.DISABLE_TOOLTIPS ) );
    }

    values.put( GC_INTERVAL, settings.getString( UISettings.GC_INTERVAL, "0" ) );
    values.put( RAW_RESPONSE_MESSAGE_SIZE, settings.getString( UISettings.RAW_RESPONSE_MESSAGE_SIZE, "10000" ) );
    values.put( RAW_REQUEST_MESSAGE_SIZE, settings.getString( UISettings.RAW_REQUEST_MESSAGE_SIZE, "10000" ) );
    values.put( WRAP_RAW_MESSAGES, settings.getBoolean( UISettings.WRAP_RAW_MESSAGES ) );
    values.put( DISABLE_BROWSER, settings.getBoolean( UISettings.DISABLE_BROWSER ) );
    values.put( DISABLE_BROWSER_PLUGINS, settings.getBoolean( UISettings.DISABLE_BROWSER_PLUGINS ) );

    return values;
  }
View Full Code Here

    return httpForm;
  }

  public void getFormValues( Settings settings )
  {
    StringToStringMap httpValues = new StringToStringMap();
    httpForm.getValues( httpValues );
    storeValues( httpValues, settings );
  }
View Full Code Here

    getForm().setValues( getValues( settings ) );
  }

  public StringToStringMap getValues( Settings settings )
  {
    StringToStringMap httpValues = new StringToStringMap();
    httpValues.put( HTTP_VERSION, settings.getString( HttpSettings.HTTP_VERSION, HttpSettings.HTTP_VERSION_1_1 ) );
    // httpValues.put( DISABLE_CHUNKING, settings.getString(
    // HttpSettings.DISABLE_CHUNKING, null ) );
    httpValues.put( CHUNKING_THRESHOLD, settings.getString( HttpSettings.CHUNKING_THRESHOLD, null ) );
    httpValues.put( USER_AGENT_HEADER, settings.getString( HttpSettings.USER_AGENT, null ) );
    httpValues.put( REQUEST_COMPRESSION,
        compressionAlgs.get( settings.getString( HttpSettings.REQUEST_COMPRESSION, "None" ) ) );
    httpValues.put( RESPONSE_COMPRESSION, settings.getString( HttpSettings.RESPONSE_COMPRESSION, null ) );
    httpValues.put( DISABLE_RESPONSE_DECOMPRESSION,
        settings.getString( HttpSettings.DISABLE_RESPONSE_DECOMPRESSION, null ) );
    httpValues.put( EXPECT_CONTINUE, settings.getString( HttpSettings.EXPECT_CONTINUE, null ) );
    httpValues.put( CLOSE_CONNECTIONS_AFTER_REQUEST, settings.getString( HttpSettings.CLOSE_CONNECTIONS, null ) );
    httpValues.put( AUTHENTICATE_PREEMPTIVELY, settings.getString( HttpSettings.AUTHENTICATE_PREEMPTIVELY, null ) );
    httpValues.put( INCLUDE_REQUEST_IN_TIME_TAKEN,
        settings.getString( HttpSettings.INCLUDE_REQUEST_IN_TIME_TAKEN, null ) );
    httpValues.put( INCLUDE_RESPONSE_IN_TIME_TAKEN,
        settings.getString( HttpSettings.INCLUDE_RESPONSE_IN_TIME_TAKEN, null ) );
    httpValues.put( SOCKET_TIMEOUT, settings.getString( HttpSettings.SOCKET_TIMEOUT, null ) );
    httpValues.put( ENCODED_URLS, settings.getString( HttpSettings.ENCODED_URLS, null ) );
    httpValues.put( MAX_RESPONSE_SIZE, settings.getString( HttpSettings.MAX_RESPONSE_SIZE, "0" ) );
    httpValues.put( MAX_CONNECTIONS_PER_HOST, settings.getString( HttpSettings.MAX_CONNECTIONS_PER_HOST, "500" ) );
    httpValues.put( MAX_TOTAL_CONNECTIONS, settings.getString( HttpSettings.MAX_TOTAL_CONNECTIONS, "2000" ) );
    httpValues.put( BIND_ADDRESS, settings.getString( HttpSettings.BIND_ADDRESS, "" ) );
    httpValues.put( FORWARD_SLASHES, settings.getString( HttpSettings.FORWARD_SLASHES, "" ) );
    httpValues.put( LEAVE_MOCKENGINE, settings.getString( HttpSettings.LEAVE_MOCKENGINE, null ) );
    httpValues.put( ENABLE_MOCK_WIRE_LOG, settings.getString( HttpSettings.ENABLE_MOCK_WIRE_LOG, null ) );
    return httpValues;
  }
View Full Code Here

  public static Map<String, String> globalEntriesList()
  {
    Map<String, TestProperty> map = getGlobalSensitiveInformationExposureTokens().getProperties();

    StringToStringMap result = new StringToStringMap();

    for( String key : map.keySet() )
      result.put( key, map.get( key ).getValue() );

    return result;
  }
View Full Code Here

  @SuppressWarnings( "unchecked" )
  private void updateRecentWorkspacesMenu()
  {
    String recent = SoapUI.getSettings().getString( RECENT_WORKSPACES_SETTING, null );
    StringToStringMap history = recent == null ? new StringToStringMap() : StringToStringMap.fromXml( recent );

    recentWorkspacesMenu.removeAll();

    if( history.size() > 0 )
    {
      for( Iterator<String> i = history.keySet().iterator(); i.hasNext(); )
      {
        String filePath = i.next();
        DefaultActionMapping<WorkspaceImpl> mapping = new DefaultActionMapping<WorkspaceImpl>(
            SwitchWorkspaceAction.SOAPUI_ACTION_ID, null, null, false, filePath );
        String wsName = history.get( filePath );

        if( SoapUI.getWorkspace().getPath().equals( filePath ) )
          continue;

        mapping.setName( wsName );
        mapping.setDescription( "Switches to the [" + wsName + "] workspace" );

        AbstractAction delegate = new SwingActionDelegate( mapping, SoapUI.getWorkspace() );
        recentWorkspacesMenu.add( new JMenuItem( delegate ) );
      }
    }
    else
    {
      recentWorkspacesMenu.add( EMPTYMARKER ).setEnabled( false );
    }

    recentWorkspacesMenu.addSeparator();
    recentWorkspacesMenu.add( new ClearWorkspacesAction() ).setEnabled( history.size() > 0 );
  }
View Full Code Here

  private void updateRecentProjectsMenu()
  {
    recentProjectsMenu.removeAll();

    String recent = SoapUI.getSettings().getString( RECENT_PROJECTS_SETTING, null );
    StringToStringMap history = recent == null ? new StringToStringMap() : StringToStringMap.fromXml( recent );

    if( history.size() > 0 )
    {
      for( Iterator<String> i = history.keySet().iterator(); i.hasNext(); )
      {
        String filePath = i.next();
        DefaultActionMapping<WorkspaceImpl> mapping = new DefaultActionMapping<WorkspaceImpl>(
            ImportWsdlProjectAction.SOAPUI_ACTION_ID, null, null, false, filePath );
        String wsName = history.get( filePath );
        mapping.setName( wsName );
        mapping.setDescription( "Switches to the [" + wsName + "] project" );

        AbstractAction delegate = new SwingActionDelegate( mapping, SoapUI.getWorkspace() );
        recentProjectsMenu.add( new JMenuItem( delegate ) );
      }
    }
    else
    {
      recentProjectsMenu.add( EMPTYMARKER ).setEnabled( false );
    }

    recentProjectsMenu.addSeparator();
    recentProjectsMenu.add( new ClearProjectsAction() ).setEnabled( history.size() > 0 );
  }
View Full Code Here

      return;

    String recent = SoapUI.getSettings().getString( RECENT_PROJECTS_SETTING, null );
    if( recent != null )
    {
      StringToStringMap history = StringToStringMap.fromXml( recent );
      history.remove( filePath );
      SoapUI.getSettings().setString( RECENT_PROJECTS_SETTING, history.toXml() );
    }

    for( int c = 0; c < recentProjectsMenu.getItemCount() - 2; c++ )
    {
      JMenuItem item = recentProjectsMenu.getItem( c );
View Full Code Here

TOP

Related Classes of com.eviware.soapui.support.types.StringToStringMap

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.