Refine search
/** * Create new instance using existing Client instance, and a base URI and any parameters * */ public PurRepositoryPluginApiRevision( com.sun.jersey.api.client.Client client, URI baseUri ) { _client = client; _uriBuilder = UriBuilder.fromUri( baseUri ); _uriBuilder = _uriBuilder.path( "/pur-repository-plugin/api/revision" ); _templateAndMatrixParameterValues = new HashMap<String, Object>(); }
private static ThrowingConsumer<HttpServletResponse, IOException> passwordChangeRequired( final String username, final String baseURL ) { URI path = UriBuilder.fromUri( baseURL ).path( format( "/user/%s/password", username ) ).build(); return error( 403, map( "errors", singletonList( map( "code", Status.Security.Forbidden.code().serialize(), "message", "User is required to change their password." ) ), "password_change", path.toString() ) ); }
requestURI = UriBuilder.fromUri(requestURI) .replacePath( requestURIPath .substring(0, requestURIPath.lastIndexOf('/') + 1)) .build(); ? UriBuilder.fromPath(root).path("/application.wadl/") : UriBuilder.fromPath("./application.wadl/"); final URI rootURI = root != null ? UriBuilder.fromPath(root).build() : null; final URI schemaURI = extendedPath.clone().path(path).build(); final String schemaPath = rootURI != null ? requestURI.relativize(schemaURI).toString() : schemaURI.toString();
private ExternalTestContainer(final URI baseUri, final DeploymentContext context) { final UriBuilder uriBuilder = UriBuilder.fromUri(baseUri).path(context.getContextPath()); if (context instanceof ServletDeploymentContext) { uriBuilder.path(((ServletDeploymentContext) context).getServletPath()); } this.baseUri = uriBuilder.build(); if (LOGGER.isLoggable(Level.INFO)) { LOGGER.info("Creating ExternalTestContainer configured at the base URI " + this.baseUri); } }
public static URI updateWithQueryParameters( URI uri, Map<String, String> queryParameters) { if ((queryParameters == null) || queryParameters.isEmpty()) { return uri; } for (Map.Entry<String, String> parameter : queryParameters.entrySet()) { UriBuilder uriBuilder = UriBuilder.fromUri(uri); uri = uriBuilder.replaceQueryParam( parameter.getKey(), parameter.getValue() ).build(); } return uri; }
/** * Create new instance using existing Client instance, and a base URI and any parameters * */ public PurRepositoryPluginApiPurge( com.sun.jersey.api.client.Client client, URI baseUri ) { _client = client; _uriBuilder = UriBuilder.fromUri( baseUri ); _uriBuilder = _uriBuilder.path( "/pur-repository-plugin/api/purge" ); _templateAndMatrixParameterValues = new HashMap<String, Object>(); }
requestURI = UriBuilder.fromUri(requestURI) .replacePath( requestURIPath .substring(0, requestURIPath.lastIndexOf('/') + 1)) .build(); ? UriBuilder.fromPath(root).path("/application.wadl/") : UriBuilder.fromPath("./application.wadl/"); final URI rootURI = root != null ? UriBuilder.fromPath(root).build() : null; final URI schemaURI = extendedPath.clone().path(path).build(); final String schemaPath = rootURI != null ? requestURI.relativize(schemaURI).toString() : schemaURI.toString();
private URL getGoogleGeocoderUrl(String address) throws IOException { UriBuilder uriBuilder = UriBuilder.fromUri("http://maps.google.com/maps/api/geocode/json"); uriBuilder.queryParam("sensor", false); uriBuilder.queryParam("address", address); URI uri = uriBuilder.build(); return new URL(uri.toString()); }
private SimpleTestContainer(final URI baseUri, final DeploymentContext context) { final URI base = UriBuilder.fromUri(baseUri).path(context.getContextPath()).build(); if (!"/".equals(base.getRawPath())) { throw new TestContainerException(String.format( "Cannot deploy on %s. Simple framework container only supports deployment on root path.", base.getRawPath())); } this.baseUri = base; if (LOGGER.isLoggable(Level.INFO)) { LOGGER.info("Creating SimpleTestContainer configured at the base URI " + this.baseUri); } this.deploymentContext = context; }
/** * Create new instance using existing Client instance, and a base URI and any parameters * */ public PathIdPurge( com.sun.jersey.api.client.Client client, URI baseUri, String pathid ) { _client = client; _uriBuilder = UriBuilder.fromUri( baseUri ); _uriBuilder = _uriBuilder.path( "{pathId : .+}/purge" ); _templateAndMatrixParameterValues = new HashMap<String, Object>(); _templateAndMatrixParameterValues.put( "pathId", pathid ); }
requestURI = UriBuilder.fromUri(requestURI) .replacePath( requestURIPath .substring(0, requestURIPath.lastIndexOf('/') + 1)) .build(); ? UriBuilder.fromPath(root).path("/application.wadl/") : UriBuilder.fromPath("./application.wadl/"); URI rootURI = root != null ? UriBuilder.fromPath(root).build() : null; extendedPath.clone().path(path).build(); String schemaURIS = schemaURI.toString(); String requestURIs = requestURI.toString(); ? requestURI.relativize(schemaURI).toString() : schemaURI.toString();
private URL getYahooGeocoderUrl(String address) throws IOException { UriBuilder uriBuilder = UriBuilder.fromUri("http://where.yahooapis.com/geocode"); uriBuilder.queryParam("location", address); uriBuilder.queryParam("flags", "J"); uriBuilder.queryParam("appid", appId); if (locale != null) { uriBuilder.queryParam("locale", locale); uriBuilder.queryParam("gflags", "L"); } URI uri = uriBuilder.build(); return new URL(uri.toString()); }