Package com.ikanow.infinit.e.data_model.api.ResponsePojo

Examples of com.ikanow.infinit.e.data_model.api.ResponsePojo.ResponseObject


  {
    try {
      String address = apiRoot + "config/source/delete/" + sourceId + "/" + communityId;
      String deleteResult = sendRequest(address, null);
      ResponsePojo internal_responsePojo = ResponsePojo.fromApi(deleteResult, ResponsePojo.class);
      ResponseObject internal_ro = internal_responsePojo.getResponse();
      responseObject = shallowCopy(responseObject, internal_ro);
     
      return responseObject.getMessage();
    }
    catch (Exception e)
View Full Code Here


      theUrl.append("?returnFullText=").append(returnFullText);
      theUrl.append("?returnRawData=").append(returnRawData);
     
      String getResult = sendRequest(theUrl.toString(), null);
      ResponsePojo internal_responsePojo = ResponsePojo.fromApi(getResult, ResponsePojo.class, DocumentPojo.class, new DocumentPojoApiMap())
      ResponseObject internal_ro = internal_responsePojo.getResponse();
      responseObject = shallowCopy(responseObject, internal_ro);
      return (DocumentPojo)internal_responsePojo.getData();
    }
    catch (Exception ex)
    {
View Full Code Here

      theUrl.append("?returnFullText=").append(returnFullText);
      theUrl.append("?returnRawData=").append(returnRawData);
     
      String getResult = sendRequest(theUrl.toString(), null);
      ResponsePojo internal_responsePojo = ResponsePojo.fromApi(getResult, ResponsePojo.class, DocumentPojo.class, new DocumentPojoApiMap())
      ResponseObject internal_ro = internal_responsePojo.getResponse();
      responseObject = shallowCopy(responseObject, internal_ro);
      return (DocumentPojo)internal_responsePojo.getData();
    }
    catch (Exception ex)
    {
View Full Code Here

        taskConfig.nextRunTime = taskConfig.firstSchedule.getTime();
      }
     
      String json = sendRequest(url.toString(), ApiManager.mapToApi(taskConfig, null));
      ResponsePojo internal_responsePojo = ResponsePojo.fromApi(json, ResponsePojo.class);
      ResponseObject internal_ro = internal_responsePojo.getResponse();
      response = shallowCopy(response, internal_ro);
     
      if (response.isSuccess()) {
        JsonPrimitive retValObj = (JsonPrimitive)internal_responsePojo.getData();
        retVal = new ObjectId(retValObj.getAsString());
View Full Code Here

      }
       
      String json = sendRequest(url.toString(), null);
      ResponsePojo internal_responsePojo = ResponsePojo.fromApi(json, ResponsePojo.class, CustomMapReduceResultPojo.class, new CustomMapReduceResultPojoApiMap());
     
      ResponseObject internal_ro = internal_responsePojo.getResponse();
      response = shallowCopy(response, internal_ro);
     
      if (response.isSuccess())
      {
        //JsonElement js = (JsonElement)internal_responsePojo.getData();
View Full Code Here

      }
      // (else get all)
     
      String json = sendRequest(url.toString(), null);
      ResponsePojo internal_responsePojo = ResponsePojo.fromApi(json, ResponsePojo.class);
      ResponseObject internal_ro = internal_responsePojo.getResponse();
      response = shallowCopy(response, internal_ro);
     
      if (response.isSuccess()) {
        retVal = ApiManager.mapListFromApi((JsonElement)internal_responsePojo.getData(),
                          CustomMapReduceJobPojo.listType(), null);
View Full Code Here

      StringBuilder url = new StringBuilder(apiRoot).append("custom/mapreduce/removejob/");
      url.append(jobtitle);
     
      String json = sendRequest(url.toString(), null);
      ResponsePojo internal_responsePojo = ResponsePojo.fromApi(json, ResponsePojo.class);
      ResponseObject internal_ro = internal_responsePojo.getResponse();
      response = shallowCopy(response, internal_ro);
    }
    catch (Exception e) {
      response.setSuccess(false);
      response.setMessage(e.getMessage());
View Full Code Here

      docDiscard.setDisambiguatedName("DOCUMENT_DISCARD");
      docDiscard.setType("SPECIAL");
      docDiscard.setIndex("DOCUMENT_DISCARD");
      contentForNewAliases = new BasicDBObject("DISCARD", discard.toDb());
      contentForNewAliases.put("DOCUMENT_DISCARD", docDiscard);
      ResponseObject response = new ResponseObject();
      shareForNewAliases = this.addShareJSON("Alias Share: " + communityIdStr, "An alias share for a specific community", "infinite-entity-alias", "{}", response);
      if ((null == shareForNewAliases) || !response.isSuccess()) {
        return null;
      }//TESTED
     
      // Remove share from personal community
      try {
        ShareCommunityPojo currCommunity =  shareForNewAliases.getCommunities().iterator().next();
        String removeCommunityIdStr = currCommunity.get_id().toString();
        if (!communityIdStr.equals(removeCommunityIdStr)) { // (obv not if this is my community somehow, don't think that's possible)
          this.removeShareFromCommunity(shareForNewAliases.get_id().toString(), removeCommunityIdStr, response);
          if (!response.isSuccess()) {
            return null;       
          }
        }
      }
      catch (Exception e) {} // do nothing I guess, not in any communities?
     
      this.addShareToCommunity(shareForNewAliases.get_id().toString(), "aliasComm", communityIdStr, response);
      if (!response.isSuccess()) {
        return null;       
      }
    }//TESTED
    shareContentCache.put(shareForNewAliases.get_id(), contentForNewAliases);
    return shareForNewAliases;
View Full Code Here

      url.append("/");     
      url.append(URLEncoder.encode(communityIdStr,"UTF-8"));
     
      String json = sendRequest(url.toString(), null);
      ResponsePojo internal_responsePojo = ResponsePojo.fromApi(json, ResponsePojo.class);
      ResponseObject internal_ro = internal_responsePojo.getResponse();
      response = shallowCopy(response, internal_ro);
     
      return new Gson().fromJson((JsonElement)internal_responsePojo.getData(), DimensionListPojo.class);   
    }
    catch (Exception e)
View Full Code Here

      url.append("/");     
      url.append(URLEncoder.encode(communityIdStr,"UTF-8"));
     
      String json = sendRequest(url.toString(), null);
      ResponsePojo internal_responsePojo = ResponsePojo.fromApi(json, ResponsePojo.class);
      ResponseObject internal_ro = internal_responsePojo.getResponse();
      response = shallowCopy(response, internal_ro);
     
      locations = ApiManager.mapListFromApi((JsonElement)internal_responsePojo.getData(), SearchSuggestPojo.listType(), null);     
    }
    catch (Exception e)
View Full Code Here

TOP

Related Classes of com.ikanow.infinit.e.data_model.api.ResponsePojo.ResponseObject

Copyright © 2018 www.massapicom. 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.