Examples of addPathSegment()


Examples of com.eclipsesource.restfuse.RequestContext.addPathSegment()

  private Destination getDestination() {
    Destination destination = new Destination( this,
                                               "http://search.maven.org/remotecontent?filepath="
                                           + "com/restfuse/com.eclipsesource.restfuse/{version}/" );
    RequestContext context = destination.getRequestContext();
    context.addPathSegment( "file", "com.eclipsesource.restfuse-1.1.1" ).addPathSegment( "version", "1.1.1" );
    return destination;
  }
}
View Full Code Here

Examples of com.eclipsesource.restfuse.RequestContext.addPathSegment()

    RequestConfiguration config = new RequestConfiguration( "http://www.fake.com",
                                                            description,
                                                            new Object() );
    RequestContext context = new RequestContext();

    context.addPathSegment( "id", "12345" );
    context.addPathSegment( "name", "name" );
    InternalRequest request = config.createRequest( context );
   
    assertEquals( "http://www.fake.com/people/12345/name", request.getUrl() );
  }
View Full Code Here

Examples of com.eclipsesource.restfuse.RequestContext.addPathSegment()

                                                            description,
                                                            new Object() );
    RequestContext context = new RequestContext();

    context.addPathSegment( "id", "12345" );
    context.addPathSegment( "name", "name" );
    InternalRequest request = config.createRequest( context );
   
    assertEquals( "http://www.fake.com/people/12345/name", request.getUrl() );
  }
 
View Full Code Here

Examples of com.eclipsesource.restfuse.RequestContext.addPathSegment()

    when( method.getAnnotation( HttpTest.class ) ).thenReturn( annotation );
    RequestConfiguration config = new RequestConfiguration( "http://www.fake.com",
                                                            method,
                                                            new Object() );
    RequestContext context = new RequestContext();
    context.addPathSegment( "id", "12345" );
    config.createRequest( context );
  }

  private HttpTest createAnnotation(final String path) {
    HttpTest annotation = new HttpTest() {
View Full Code Here

Examples of com.fasterxml.clustermate.api.RequestPathBuilder.addPathSegment()

    protected RequestPath _rootPathFor(IpAndPort serverAddress)
    {
        RequestPathBuilder builder = _client.pathBuilder(serverAddress);
        for (String component : _rootPathSegments) {
            builder = builder.addPathSegment(component);
        }
        return builder.build();
    }
   
    private void _addNode(IpAndPort key, ClusterServerNodeImpl state)
View Full Code Here

Examples of com.fasterxml.clustermate.api.RequestPathBuilder.addPathSegment()

    protected RequestPath _rootPathFor(IpAndPort serverAddress)
    {
        RequestPathBuilder builder = _client.pathBuilder(serverAddress);
        for (String component : _rootPathSegments) {
            builder = builder.addPathSegment(component);
        }
        return builder.build();
    }
   
    private void _addNode(IpAndPort key, ClusterServerNodeImpl state)
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.impl.UrlBuilder.addPathSegment()

        url.addPath(request.getContextPath());
        url.addPath(request.getServletPath());

        if (repositoryId != null) {
            url.addPathSegment(repositoryId);
        }

        return url;
    }
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.impl.UrlBuilder.addPathSegment()

    /**
     * Compiles a URL for links, collections and templates.
     */
    public static UrlBuilder compileUrlBuilder(UrlBuilder baseUrl, String resource, String id) {
        UrlBuilder url = new UrlBuilder(baseUrl);
        url.addPathSegment(resource);

        if (id != null) {
            url.addParameter("id", id);
        }

View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.impl.UrlBuilder.addPathSegment()

        String contentSrc = null;

        if (info.hasContent()) {
            UrlBuilder contentSrcBuilder = compileUrlBuilder(baseUrl, RESOURCE_CONTENT, info.getId());
            if (info.getFileName() != null) {
                contentSrcBuilder.addPathSegment(info.getFileName());
            }

            contentSrc = contentSrcBuilder.toString();
        }
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.impl.UrlBuilder.addPathSegment()

        urlBuilder = new UrlBuilder("http://host/test");
        urlBuilder.addParameter("query", "value");
        assertEquals("http://host/test?query=value", urlBuilder.toString());

        urlBuilder = new UrlBuilder("http://host/test");
        urlBuilder.addPathSegment("path");
        assertEquals("http://host/test/path", urlBuilder.toString());

        urlBuilder = new UrlBuilder("http://host/test/");
        urlBuilder.addPathSegment("path");
        assertEquals("http://host/test/path", urlBuilder.toString());
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.