Package com.eviware.soapui.impl.rest.support

Examples of com.eviware.soapui.impl.rest.support.RestParamsPropertyHolder


      path = path.length() > 1 ? path.substring( 1 ) : "";

    resourceConfig.setPath( path );
    resourceConfig.setId( resource.getName() );

    RestParamsPropertyHolder params = resource.getParams();
    for( int c = 0; c < params.size(); c++ )
    {
      generateParam( resourceConfig.addNewParam(), params.getPropertyAt( c ) );
    }

    for( int c = 0; c < resource.getChildResourceCount(); c++ )
    {
      resourceConfig.addNewResource().set( generateWadlResource( resource.getChildResourceAt( c ) ) );
View Full Code Here


    Map<String, RestParamProperty> defaultParams = new HashMap<String, RestParamProperty>();
    for( RestParamProperty defaultParam : restMethod.getResource().getDefaultParams() )
      defaultParams.put( defaultParam.getName(), defaultParam );

    RestParamsPropertyHolder params = restMethod.getParams();
    for( int c = 0; c < params.size(); c++ )
    {
      RestParamProperty param = params.getPropertyAt( c );
      if( !defaultParams.containsKey( param.getName() ) || !param.equals( defaultParams.get( param.getName() ) ) )
        generateParam( requestConfig.addNewParam(), param );
    }

    if( restMethod.hasRequestBody() )
View Full Code Here

        .getProperty( BaseHttpRequestTransport.RESPONSE_PROPERTIES );

    MimeMultipart formMp = "multipart/form-data".equals( request.getMediaType() )
        && httpMethod instanceof EntityEnclosingMethod ? new MimeMultipart() : null;

    RestParamsPropertyHolder params = request.getParams();

    for( int c = 0; c < params.getPropertyCount(); c++ )
    {
      RestParamProperty param = params.getPropertyAt( c );

      String value = PropertyExpander.expandProperties( context, param.getValue() );
      responseProperties.put( param.getName(), value );

      List<String> valueParts = sendEmptyParameters( request ) ? RestUtils.splitMultipleParametersEmptyIncluded(
View Full Code Here

        MimeMultipart formMp = ("multipart/form-data".equals(request.getMediaType())
                || "multipart/mixed".equals(request.getMediaType()))
                && httpMethod instanceof HttpEntityEnclosingRequestBase ? new MimeMultipart() : null;

        RestParamsPropertyHolder params = request.getParams();

        for (int c = 0; c < params.getPropertyCount(); c++) {
            RestParamProperty param = params.getPropertyAt(c);

            String value = PropertyExpander.expandProperties(context, param.getValue());
            responseProperties.put(param.getName(), value);

            List<String> valueParts = sendEmptyParameters(request)
View Full Code Here

        UISupport.showDesktopPanel(restRequest);

    }

    protected RestParamsPropertyHolder extractParams(String URI) {
        RestParamsPropertyHolder params = new XmlBeansRestParamsTestPropertyHolder(null,
                RestParametersConfig.Factory.newInstance());
        extractAndFillParameters(URI, params);
        return params;
    }
View Full Code Here

    }

    private void addPropertyToLevel(String name, String value, ParameterStyle style, ParamLocation location,
                                    String requestLevelValue) {
        RestParamsPropertyHolder paramsPropertyHolder = null;
        switch (location) {
            case METHOD:
                paramsPropertyHolder = getRequest().getRestMethod().getParams();
                break;
            case RESOURCE:
                paramsPropertyHolder = getRequest().getResource().getParams();
                break;
        }

        if (paramsPropertyHolder != null) {
            paramsPropertyHolder.addProperty(name);
            RestParamProperty addedParameter = paramsPropertyHolder.getProperty(name);
            addedParameter.addPropertyChangeListener(restParamPropertyChangeListener);
            addedParameter.setValue(value);
            addedParameter.setDefaultValue(value);
            addedParameter.setStyle(style);
            //Override the request level value as well
View Full Code Here

        assertThat(requestDesktopPanel.resourcePanel.getText(), not(containsString("{" + PARAMETER_NAME + "}")));
    }

    @Test
    public void extractsQueryStringParamsFromUrl() throws Exception {
        RestParamsPropertyHolder params = restRequest.getParams();
        String url = restRequest.getEndpoint() + restRequest.getPath() + "?q=foo&page=2";
        RestUtils.extractParams(url, params, true);
        assertThat(params, hasParameter("q"));
        assertThat(params, hasParameter("page"));
    }
View Full Code Here

        }

        resourceConfig.setPath(path);
        resourceConfig.setId(resource.getName());

        RestParamsPropertyHolder params = resource.getParams();
        for (int c = 0; c < params.size(); c++) {
            generateParam(resourceConfig.addNewParam(), params.getPropertyAt(c));
        }

        for (int c = 0; c < resource.getChildResourceCount(); c++) {
            resourceConfig.addNewResource().set(generateWadlResource(resource.getChildResourceAt(c)));
        }
View Full Code Here

        Map<String, RestParamProperty> defaultParams = new HashMap<String, RestParamProperty>();
        for (RestParamProperty defaultParam : restMethod.getResource().getDefaultParams()) {
            defaultParams.put(defaultParam.getName(), defaultParam);
        }

        RestParamsPropertyHolder params = restMethod.getParams();
        for (int c = 0; c < params.size(); c++) {
            RestParamProperty param = params.getPropertyAt(c);
            if (!defaultParams.containsKey(param.getName()) || !param.equals(defaultParams.get(param.getName()))) {
                generateParam(requestConfig.addNewParam(), param);
            }
        }
View Full Code Here

        restRequest.setMethod(RestRequestInterface.HttpMethod.GET);
        return new RestRequestDesktopPanel(restRequest);
    }

    private RestParamsPropertyHolder addParamsToChildResource() {
        RestParamsPropertyHolder params = childResource.getParams();
        params.addProperty(PARAM_1);
        params.addProperty(PARAM_2);
        params.addProperty(PARAM_3);
        return params;
    }
View Full Code Here

TOP

Related Classes of com.eviware.soapui.impl.rest.support.RestParamsPropertyHolder

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.