Package com.eviware.soapui.config

Examples of com.eviware.soapui.config.RestResourceConfig


    return getConfig().getBasePath();
  }

  public RestResource addNewResource( String name, String path )
  {
    RestResourceConfig resourceConfig = getConfig().addNewResource();
    resourceConfig.setName( name );
    resourceConfig.setPath( path );

    RestResource resource = new RestResource( this, resourceConfig );
    resources.add( resource );

    fireOperationAdded( resource );
View Full Code Here


    return resource;
  }

  public RestResource cloneResource( RestResource resource, String name )
  {
    RestResourceConfig resourceConfig = ( RestResourceConfig )getConfig().addNewResource().set( resource.getConfig() );
    resourceConfig.setName( name );

    RestResource newResource = new RestResource( this, resourceConfig );
    resources.add( newResource );

    fireOperationAdded( newResource );
View Full Code Here

    return ( RestResource )getWsdlModelItemByName( resources, name );
  }

  public RestResource addNewChildResource( String name, String path )
  {
    RestResourceConfig resourceConfig = getConfig().addNewResource();
    resourceConfig.setName( name );
    resourceConfig.setPath( path );

    RestResource resource = new RestResource( this, resourceConfig );
    resources.add( resource );

    getInterface().fireOperationAdded( resource );
View Full Code Here

    return cloneResource( resource, name );
  }

  public RestResource cloneResource( RestResource resource, String name )
  {
    RestResourceConfig resourceConfig = ( RestResourceConfig )getConfig().addNewResource().set( resource.getConfig() );
    resourceConfig.setName( name );

    RestResource newResource = new RestResource( this, resourceConfig );
    resources.add( newResource );

    getInterface().fireOperationAdded( newResource );
View Full Code Here

    public String getTechnicalId() {
        return getConfig().getBasePath();
    }

    public RestResource addNewResource(String name, String path) {
        RestResourceConfig resourceConfig = getConfig().addNewResource();
        resourceConfig.setName(name);
        resourceConfig.setPath(path);

        RestResource resource = new RestResource(this, resourceConfig);
        resources.add(resource);

        fireOperationAdded(resource);
View Full Code Here

        fireOperationAdded(resource);
        return resource;
    }

    public RestResource cloneResource(RestResource resource, String name) {
        RestResourceConfig resourceConfig = (RestResourceConfig) getConfig().addNewResource().set(resource.getConfig());
        resourceConfig.setName(name);

        RestResource newResource = new RestResource(this, resourceConfig);
        resources.add(newResource);

        fireOperationAdded(newResource);
View Full Code Here

    public RestResource getChildResourceByName(String name) {
        return (RestResource) getWsdlModelItemByName(resources, name);
    }

    public RestResource addNewChildResource(String name, String path) {
        RestResourceConfig resourceConfig = getConfig().addNewResource();
        resourceConfig.setName(name);
        resourceConfig.setPath(path);

        RestResource resource = new RestResource(this, resourceConfig);
        resources.add(resource);

        getInterface().fireOperationAdded(resource);
View Full Code Here

    public RestResource cloneChildResource(RestResource resource, String name) {
        return cloneResource(resource, name);
    }

    public RestResource cloneResource(RestResource resource, String name) {
        RestResourceConfig resourceConfig = (RestResourceConfig) getConfig().addNewResource().set(resource.getConfig());
        resourceConfig.setName(name);

        RestResource newResource = new RestResource(this, resourceConfig);
        resources.add(newResource);

        getInterface().fireOperationAdded(newResource);
View Full Code Here

        RestResource one = restService.addNewResource("one", "/one{version}");

        RestParamProperty path = one.addProperty("version");
        path.setValue("v1");

        RestResourceConfig nestedResourceConfig = one.getConfig().addNewResource();
        nestedResourceConfig.setPath("/path/again");

        RestResource three = one.addNewChildResource("three", "/will/be/overwritten");
        three.setConfig(nestedResourceConfig);

        restService.addNewResource("two", "/two");
View Full Code Here

        assertThat(childResource.getFullPath(), not(containsString(childResourceParameterString)));
    }

    @Test
    public void listensToChangesInConfiguredParameters() throws Exception {
        RestResourceConfig config = RestResourceConfig.Factory.newInstance();
        RestParametersConfig restParametersConfig = config.addNewParameters();
        RestParameterConfig parameterConfig = restParametersConfig.addNewParameter();
        String parameterName = "theName";
        parameterConfig.setName(parameterName);
        parameterConfig.setStyle(RestParameterConfig.Style.Enum.forInt(RestParamsPropertyHolder.ParameterStyle.QUERY.ordinal()));
        config.setPath("/actual_path");

        RestResource restResource = new RestResource(parentService, config);
        restResource.getParams().getProperty(parameterName).setStyle(RestParamsPropertyHolder.ParameterStyle.TEMPLATE);
        assertThat(restResource.getPath(), containsString(parameterName));
View Full Code Here

TOP

Related Classes of com.eviware.soapui.config.RestResourceConfig

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.