Package com.eviware.soapui.model.settings

Examples of com.eviware.soapui.model.settings.Settings


      {
        e.printStackTrace();
      }
    }

    Settings result = super.initSettings( fileName );

    if( !fileName.equals( fn ) )
      setSettingsFile( fn );

    return result;
View Full Code Here


    }
  }

  public static void initAutoSaveTimer()
  {
    Settings settings = SoapUI.getSettings();
    long interval = settings.getLong( UISettings.AUTO_SAVE_INTERVAL, 0 );

    if( autoSaveTimerTask != null )
    {
      if( interval == 0 )
        SoapUI.log( "Cancelling AutoSave Timer" );
View Full Code Here

    }
  }

  public static void initGCTimer()
  {
    Settings settings = SoapUI.getSettings();
    long interval = settings.getLong( UISettings.GC_INTERVAL, 60 );

    if( gcTimerTask != null )
    {
      if( interval == 0 )
        SoapUI.log( "Cancelling GC Timer" );
View Full Code Here

  public void filterAbstractHttpRequest( SubmitContext context, AbstractHttpRequest<?> httpRequest )
  {
    ExtendedHttpMethod httpMethod = ( ExtendedHttpMethod )context.getProperty( BaseHttpRequestTransport.HTTP_METHOD );

    // set maxsize
    Settings settings = httpRequest.getSettings();

    // close connections?
    if( settings.getBoolean( HttpSettings.CLOSE_CONNECTIONS ) )
    {
      httpMethod.setRequestHeader( "Connection", "close" );
    }

    // close connections?
    if( settings.getBoolean( HttpSettings.EXPECT_CONTINUE ) && httpMethod instanceof EntityEnclosingMethod )
    {
      httpMethod.getParams().setParameter( HttpMethodParams.USE_EXPECT_CONTINUE, Boolean.TRUE );
    }

    // compress request?
    String compressionAlg = settings.getString( HttpSettings.REQUEST_COMPRESSION, "None" );
    if( !"None".equals( compressionAlg ) )
      httpMethod.setRequestHeader( "Content-Encoding", compressionAlg );

    // accept compressed responses?
    if( settings.getBoolean( HttpSettings.RESPONSE_COMPRESSION ) )
    {
      httpMethod.setRequestHeader( "Accept-Encoding", CompressionSupport.getAvailableAlgorithms( "," ) );
    }

    String httpVersion = settings.getString( HttpSettings.HTTP_VERSION, "1.1" );
    if( httpVersion.equals( HttpSettings.HTTP_VERSION_1_1 ) )
    {
      httpMethod.getParams().setVersion( HttpVersion.HTTP_1_1 );
    }
    else if( httpVersion.equals( HttpSettings.HTTP_VERSION_1_0 ) )
    {
      httpMethod.getParams().setVersion( HttpVersion.HTTP_1_0 );
    }
    else if( httpVersion.equals( HttpSettings.HTTP_VERSION_0_9 ) )
    {
      httpMethod.getParams().setVersion( HttpVersion.HTTP_1_1 );
    }

    // max size..
    long maxSize = httpRequest.getMaxSize();
    if( maxSize == 0 )
      maxSize = settings.getLong( HttpSettings.MAX_RESPONSE_SIZE, 0 );
    if( maxSize > 0 )
      httpMethod.setMaxSize( maxSize );

    // follow redirects is false; handled in transport
    httpMethod.setFollowRedirects( false );
View Full Code Here

public class HttpProxyRequestFilter extends AbstractRequestFilter
{
  public void filterAbstractHttpRequest( SubmitContext context, AbstractHttpRequest<?> wsdlRequest )
  {
    // init proxy settings
    Settings settings = wsdlRequest.getSettings();
    HostConfiguration hostConfiguration = ( HostConfiguration )context
        .getProperty( BaseHttpRequestTransport.HOST_CONFIGURATION );
    HttpState httpState = ( HttpState )context.getProperty( SubmitContext.HTTP_STATE_PROPERTY );

    String endpoint = PropertyExpander.expandProperties( context, wsdlRequest.getEndpoint() );
View Full Code Here

    getWorkspace().reloadProject( this );
  }

  public boolean hasNature( String natureId )
  {
    Settings projectSettings = getSettings();
    String projectNature = projectSettings.getString( ProjectSettings.PROJECT_NATURE, null );
    return natureId.equals( projectNature );
  }
View Full Code Here

  @Override
  public void filterAbstractHttpRequest( SubmitContext context, AbstractHttpRequest<?> request )
  {
    ExtendedHttpMethod httpMethod = ( ExtendedHttpMethod )context.getProperty( BaseHttpRequestTransport.HTTP_METHOD );
    Settings settings = request.getSettings();

    // chunking?
    if( httpMethod.getParams().getVersion().equals( HttpVersion.HTTP_1_1 )
        && httpMethod instanceof EntityEnclosingMethod )
    {
      EntityEnclosingMethod entityEnclosingMethod = ( ( EntityEnclosingMethod )httpMethod );
      long limit = settings.getLong( HttpSettings.CHUNKING_THRESHOLD, -1 );
      RequestEntity requestEntity = entityEnclosingMethod.getRequestEntity();
      entityEnclosingMethod.setContentChunked( limit >= 0 && requestEntity != null ? requestEntity
          .getContentLength() > limit : false );
    }
  }
View Full Code Here

  private final static Logger log = Logger.getLogger( HttpCompressionRequestFilter.class );

  @Override
  public void filterAbstractHttpRequest( SubmitContext context, AbstractHttpRequest<?> httpRequest )
  {
    Settings settings = httpRequest.getSettings();
    String compressionAlg = settings.getString( HttpSettings.REQUEST_COMPRESSION, "None" );
    if( !"None".equals( compressionAlg ) )
    {
      try
      {
        ExtendedHttpMethod method = ( ExtendedHttpMethod )context
View Full Code Here

    super( new BorderLayout() );
    this.model = model;

    model.addPropertyChangeListener( this );

    Settings settings = model.getSettings();
    Font editorFont = UISupport.getEditorFont( settings );

    editArea = new RSyntaxTextArea();
    editArea.restoreDefaultSyntaxScheme();

    String defaultScriptLanguage = ( ( WsdlProject )ModelSupport.getModelItemProject( model.getModelItem() ) )
        .getDefaultScriptLanguage();
    if( defaultScriptLanguage.equals( GroovyScriptEngineFactory.ID ) )
      editArea.setSyntaxEditingStyle( SyntaxConstants.SYNTAX_STYLE_GROOVY );
    else if( defaultScriptLanguage.equals( JsScriptEngineFactory.ID ) )
      editArea.setSyntaxEditingStyle( SyntaxConstants.SYNTAX_STYLE_JAVASCRIPT );

    editArea.setBorder( BorderFactory.createMatteBorder( 0, 2, 0, 0, Color.WHITE ) );

    editArea.setText( model.getScript() );
    editArea.setCaretPosition( 0 );
    editArea.setHighlightCurrentLine( false );
    Action runAction = model.getRunAction();
    if( runAction != null )
    {
      editArea.getInputMap().put( KeyStroke.getKeyStroke( "alt ENTER" ), "run-action" );
      editArea.getActionMap().put( "run-action", runAction );
    }

    editArea.getInputMap().put( KeyStroke.getKeyStroke( "F3" ), "find-action" );
    editArea.getInputMap().put( KeyStroke.getKeyStroke( "ctrl F" ), "find-action" );
    RSyntaxTextAreaFindAndReplaceable findAndReplaceable = new RSyntaxTextAreaFindAndReplaceable();
    editArea.getActionMap().put( "find-action", new FindAndReplaceDialog( findAndReplaceable ) );

    groovyDocumentListener = new GroovyDocumentListener();
    editArea.getDocument().addDocumentListener( groovyDocumentListener );

    settingsListener = new InternalSettingsListener();
    settings.addSettingsListener( settingsListener );

    // scrollPane = new RTextScrollPane( 500, 300, editArea, true );
    scrollPane = new RTextScrollPane( editArea, true );
    scrollPane.setPreferredSize( new Dimension( 500, 300 ) );
    add( scrollPane );

    UISupport.addPreviewCorner( scrollPane, true );

    addFocusListener( new FocusAdapter()
    {
      public void focusGained( FocusEvent e )
      {
        editArea.requestFocusInWindow();
      }
    } );

    RSyntaxAreaPopupMenu popup = RSyntaxAreaPopupMenu.add( editArea );
    popup.add( new FindAndReplaceDialog( findAndReplaceable ) );
    popup.addSeparator();
    popup.add( new GoToLineAction() );

    toggleLineNumbersMenuItem = new JCheckBoxMenuItem( "Show Line Numbers", scrollPane.getLineNumbersEnabled() );
    toggleLineNumbersMenuItem.setAccelerator( UISupport.getKeyStroke( "alt L" ) );
    toggleLineNumbersMenuItem.addActionListener( new ActionListener()
    {
      public void actionPerformed( ActionEvent e )
      {
        enableLineNumbers( toggleLineNumbersMenuItem.isSelected() );
      }
    } );

    editArea.getInputMap().put( KeyStroke.getKeyStroke( "alt L" ), new AbstractAction()
    {
      public void actionPerformed( ActionEvent e )
      {
        enableLineNumbers( !scrollPane.getLineNumbersEnabled() );
      }
    } );

    popup.add( toggleLineNumbersMenuItem );
    editArea.setPopupMenu( popup );

    enableLineNumbers( settings.getBoolean( UISettings.SHOW_GROOVY_LINE_NUMBERS ) );
  }
View Full Code Here

              project.getSettings().getString( LaunchForm.SET_CONTENT_TYPES,
                  SoapMonitorAction.defaultContentTypes() ) );

      if( optionsDialog.show() )
      {
        Settings settings = getProject().getSettings();

        settings.setLong( OptionsForm.PORT, listenPort = optionsDialog.getIntValue( OptionsForm.PORT, listenPort ) );
        settings.setLong( OptionsForm.MAXROWS, maxRows = optionsDialog.getIntValue( OptionsForm.MAXROWS, maxRows ) );
        settings.setString( LaunchForm.SET_CONTENT_TYPES, optionsDialog.getValue( LaunchForm.SET_CONTENT_TYPES ) );

        incomingRequestWss = optionsDialog.getValue( OptionsForm.REQUEST_WSS );
        incomingResponseWss = optionsDialog.getValue( OptionsForm.RESPONSE_WSS );

        tableModel.fitSizeToMaxRows();
View Full Code Here

TOP

Related Classes of com.eviware.soapui.model.settings.Settings

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.