Examples of toURL()


Examples of com.brewtab.ircbot.util.URLBuilder.toUrl()

            urlBuilder.setParameter("s", Joiner.on(' ').join(symbols));
            urlBuilder.setParameter("f", tags);

            log.info("Stock request: {}", urlBuilder.toString());

            InputStream s = urlBuilder.toUrl().openStream();
            ByteArrayOutputStream data = new ByteArrayOutputStream();
            byte[] buff = new byte[1024];

            while (true) {
                int n = s.read(buff);
View Full Code Here

Examples of com.dotcms.publisher.endpoint.bean.PublishingEndPoint.toURL()

                localDetail.getStatus() != PublishAuditStatus.Status.FAILED_TO_PUBLISH.getCode()) {

                PublishingEndPoint target = endpointAPI.findEndPointById(endpointId);

                if(target != null && !target.isSending()) {
                  webResource = client.resource(target.toURL()+"/api/auditPublishing");

                  try {
                    PublishAuditHistory remoteHistory =
                        PublishAuditHistory.getObjectFromString(
                        webResource
View Full Code Here

Examples of com.google.api.client.http.GenericUrl.toURL()

        HttpResponse response = this.getResponse(uri);
        Long content_length = response.getHeaders().getContentLength();

        if (content_length == null || content_length.intValue() <= 0) {
            throw new HttpException("Received a 200 response for " + uri
                    + " but there was no message body.", 200, uri.toURL());
        }

        String body = WebServiceClient.getSuccessBody(response, uri);

        InjectableValues inject = new InjectableValues.Std().addValue(
View Full Code Here

Examples of com.nexirius.util.XFile.toURL()

        infoDir.delete();

        DirectoryInfoModel sourceModel = new DirectoryInfoModel(sourceDir.getPath(), "+\"*\"-\"*\"", "+\"*\"");
        sourceModel.writeInfoToDirectory(infoDir.getPath());

        DirectoryInfoModel infoModel = new DirectoryInfoModel(infoDir.toURL());
        DirectoryInfoModel targetModel = new DirectoryInfoModel(targetDirectory.getPath(), "+\"*\"", "+\"*\"");

        targetModel.compareTo(infoModel);


View Full Code Here

Examples of com.ocpsoft.pretty.faces.url.URL.toURL()

                  REWRITE_MAPPING_ID_KEY + ":" + mapping.getId());

         URL url = context.getRequestURL();
         if (context.shouldProcessDynaview())
         {
            log.trace("Forwarding mapped request [" + url.toURL() + "] to dynaviewId [" + context.getDynaViewId() + "]");
            ((HttpInboundServletRewrite) event).forward(context.getDynaViewId());
         }
         else
         {
            String viewId = mapping.getViewId();
View Full Code Here

Examples of com.rallydev.rest.request.CreateRequest.toUrl()

        JsonObject newDefect = new JsonObject();
        newDefect.addProperty("Name", "Foo");
        CreateRequest request = new CreateRequest("defect", newDefect);

        doReturn(new Gson().toJson(response)).when(api.client).doPost(request.toUrl(), request.getBody());
        CreateResponse createResponse = api.create(request);

        verify(api.client).doPost(request.toUrl(), request.getBody());
        Assert.assertTrue(createResponse.wasSuccessful());
        JsonObject createdObj = createResponse.getObject();
View Full Code Here

Examples of com.rallydev.rest.request.DeleteRequest.toUrl()

        response.add("OperationResult", deleteResult);
        deleteResult.add("Errors", new JsonArray());
        deleteResult.add("Warnings", new JsonArray());

        DeleteRequest request = new DeleteRequest("/defect/1234");
        doReturn(new Gson().toJson(response)).when(api.client).doDelete(request.toUrl());
        DeleteResponse deleteResponse = api.delete(request);

        verify(api.client).doDelete(request.toUrl());
        Assert.assertTrue(deleteResponse.wasSuccessful());
    }
View Full Code Here

Examples of com.rallydev.rest.request.GetRequest.toUrl()

        defect.add("Errors", new JsonArray());
        defect.add("Warnings", new JsonArray());
        defect.addProperty("_ref", "/defect/1234");

        GetRequest request = new GetRequest("/defect/1234");
        doReturn(new Gson().toJson(response)).when(api.client).doGet(request.toUrl());
        GetResponse getResponse = api.get(request);

        verify(api.client).doGet(request.toUrl());
        Assert.assertTrue(getResponse.wasSuccessful());
        JsonObject obj = getResponse.getObject();
View Full Code Here

Examples of com.rallydev.rest.request.QueryRequest.toUrl()

            int receivedRecords = request.getPageSize();
            while (receivedRecords < request.getLimit() &&
                    (receivedRecords + request.getStart() - 1) < queryResponse.getTotalResultCount()) {
                QueryRequest pageRequest = request.clone();
                pageRequest.setStart(receivedRecords + request.getStart());
                QueryResponse pageResponse = new QueryResponse(client.doGet(pageRequest.toUrl()));
                if (pageResponse.wasSuccessful()) {
                    JsonArray results = queryResponse.getResults();
                    results.addAll(pageResponse.getResults());
                    receivedRecords += pageRequest.getPageSize();
                }
View Full Code Here

Examples of com.rallydev.rest.request.UpdateRequest.toUrl()

        updatedDefect.addProperty("Name", "Foo");
        UpdateRequest request = new UpdateRequest("/defect/1234", updatedDefect);
        doReturn(new Gson().toJson(response)).when(api.client).doPost(request.toUrl(), request.getBody());
        UpdateResponse updateResponse = api.update(request);

        verify(api.client).doPost(request.toUrl(), request.getBody());
        Assert.assertTrue(updateResponse.wasSuccessful());
        JsonObject obj = updateResponse.getObject();
        assertEquals(obj.get("_ref").getAsString(), "/defect/1234");
    }
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.