Examples of UpdateResponse


Examples of com.linkedin.restli.server.UpdateResponse

    // make sure the ID in the entity is consistent with the key in the database
    entity.setPhotoId(photoId);
    entity.setAlbumId(albumId);
    _db.getData().put(key, entity);
    return new UpdateResponse(HttpStatus.S_204_NO_CONTENT);
  }
View Full Code Here

Examples of com.rallydev.rest.response.UpdateResponse

        JsonObject updatedDefect = new JsonObject();
        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

Examples of oasis.names.tc.wsrp.v1.types.UpdateResponse

            PortletDriver portletDriver = consumerEnvironment.getPortletDriverRegistry().getPortletDriver(portlet);
            BlockingInteractionResponse response = portletDriver.performBlockingInteraction(
                    new WSRPRequestImpl(windowSession, request, consumerEnvironment), user.getUserID());

            if (response != null) {
                UpdateResponse update = response.getUpdateResponse();
                if (update != null) {
                    //update the WSRP portlet sessionContext
                    windowSession.getPortletSession().setSessionContext(update.getSessionContext());

                    MarkupContext markupContext = update.getMarkupContext();
                    if (markupContext != null) {
                        windowSession.updateMarkupCache(markupContext);
                    }

                    windowSession.setNavigationalState(update.getNavigationalState());

                    String windowState = null;
                    if ((windowState = update.getNewWindowState()) != null) {
                        windowSession.setWindowState(windowState);
                    }

                    String windowMode = null;
                    if ((windowMode = update.getNewMode()) != null) {
                        windowSession.setMode(windowMode);
                    }
                } else if (response.getRedirectURL() != null) {
                    this.getLogger().debug("response.getRedirectURL() != null");
                }
View Full Code Here

Examples of org.apache.solr.client.solrj.response.UpdateResponse

          // Note: I need to know whether the document has been permanently rejected or not, but we currently have
          // no means to determine that.  Analysis of SolrServerExceptions that have been thrown is likely needed.
          try
          {
            readFromDocumentStreamYet = true;
            UpdateResponse response = contentStreamUpdateRequest.process(solrServer);
           
            // Successful completion
            activityStart = new Long(fullStartTime);
            activityBytes = new Long(length);
            activityCode = "OK";
View Full Code Here

Examples of org.apache.solr.client.solrj.response.UpdateResponse

        // Do the operation!
        long fullStartTime = System.currentTimeMillis();
        // Open a socket to ingest, and to the response stream to get the post result
        try
        {
          UpdateResponse response = new UpdateRequest(postRemoveAction).deleteById(documentURI).process(solrServer);
           
          // Success
          activityStart = new Long(fullStartTime);
          activityCode = "OK";
          activityDetails = null;
View Full Code Here

Examples of org.apache.solr.client.solrj.response.UpdateResponse

      {
        try
        {
          // Do the operation!
          UpdateRequest updateRequest = new UpdateRequest(postUpdateAction + "?commit=true");
          UpdateResponse response = updateRequest.process(solrServer);
          //UpdateResponse response = solrServer.commit();
        }
        catch (InterruptedIOException ioe)
        {
          return;
View Full Code Here

Examples of org.apache.solr.client.solrj.response.UpdateResponse

          // Note: I need to know whether the document has been permanently rejected or not, but we currently have
          // no means to determine that.  Analysis of SolrServerExceptions that have been thrown is likely needed.
          try
          {
            readFromDocumentStreamYet = true;
            UpdateResponse response = contentStreamUpdateRequest.process(solrServer);
           
            // Successful completion
            activityStart = new Long(fullStartTime);
            activityBytes = new Long(length);
            activityCode = "OK";
View Full Code Here

Examples of org.apache.solr.client.solrj.response.UpdateResponse

        // Do the operation!
        long fullStartTime = System.currentTimeMillis();
        // Open a socket to ingest, and to the response stream to get the post result
        try
        {
          UpdateResponse response = new UpdateRequest(postRemoveAction).deleteById(documentURI).process(solrServer);
           
          // Success
          activityStart = new Long(fullStartTime);
          activityCode = "OK";
          activityDetails = null;
View Full Code Here

Examples of org.apache.solr.client.solrj.response.UpdateResponse

      {
        try
        {
          // Do the operation!
          UpdateRequest updateRequest = new UpdateRequest(postUpdateAction + "?commit=true");
          UpdateResponse response = updateRequest.process(solrServer);
          //UpdateResponse response = solrServer.commit();
        }
        catch (InterruptedIOException ioe)
        {
          return;
View Full Code Here

Examples of org.apache.solr.client.solrj.response.UpdateResponse

    return solrServer;
  }
 
  public Boolean commit() {
    try {
      UpdateResponse updateResponse = solrServer.commit();
      return successResponse(updateResponse);
    } catch (SolrServerException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      return false;
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.