com.cedarsoft.rest
Class UriContext

java.lang.Object
  extended by com.cedarsoft.rest.UriContext

public class UriContext
extends Object

Represents the URI context.

There is a local context (getUriBuilder()) which represents the current position. And there is access to the base uri using getBaseUriBuilder().

Author:
Johannes Schneider (js@cedarsoft.com)

Constructor Summary
UriContext(javax.ws.rs.core.UriBuilder baseUriBuilder, javax.ws.rs.core.UriBuilder uriBuilder)
           
 
Method Summary
 UriContext create(javax.ws.rs.core.UriBuilder newUriBuilder)
           
 javax.ws.rs.core.UriBuilder getBaseUriBuilder()
          Returns a clone of the base uri builder
 URI getUri()
          Returns the URI
 javax.ws.rs.core.UriBuilder getUriBuilder()
          Returns the uri builder for the local context
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UriContext

public UriContext(@NotNull
                  javax.ws.rs.core.UriBuilder baseUriBuilder,
                  @NotNull
                  javax.ws.rs.core.UriBuilder uriBuilder)
Method Detail

getBaseUriBuilder

@NotNull
public javax.ws.rs.core.UriBuilder getBaseUriBuilder()
Returns a clone of the base uri builder

Returns:
the base uri builder

getUriBuilder

@NotNull
public javax.ws.rs.core.UriBuilder getUriBuilder()
Returns the uri builder for the local context

Returns:
the uri builder

getUri

@NotNull
public URI getUri()
Returns the URI

Returns:
the URI

create

@NotNull
public UriContext create(@NotNull
                                 javax.ws.rs.core.UriBuilder newUriBuilder)


Copyright © 2011 cedarsoft GmbH. All Rights Reserved.