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

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


    try
    {
      String getCommunityAddress = apiRoot + "social/community/getpublic";
      String getResult = sendRequest(getCommunityAddress, null);
     
      ResponsePojo internal_responsePojo = ResponsePojo.fromApi(getResult, ResponsePojo.class);
      ResponseObject internal_ro = internal_responsePojo.getResponse();
      responseObject = shallowCopy(responseObject, internal_ro);
     
      List<CommunityPojo> communities = null;
     
      communities = ApiManager.mapListFromApi((JsonElement)internal_responsePojo.getData(),
                              CommunityPojo.listType(), null);     
     
      return communities;
    }
    catch (Exception e)
View Full Code Here


    try
    {
      String getCommunityAddress = apiRoot + "social/community/getall";
      String getResult = sendRequest(getCommunityAddress, null);
     
      ResponsePojo internal_responsePojo = ResponsePojo.fromApi(getResult, ResponsePojo.class);
      ResponseObject internal_ro = internal_responsePojo.getResponse();
      responseObject = shallowCopy(responseObject, internal_ro);
     
      List<CommunityPojo> communities = null;
     
      communities = ApiManager.mapListFromApi((JsonElement)internal_responsePojo.getData(),
                              CommunityPojo.listType(), null);     
     
      return communities;
    }
    catch (Exception e)
View Full Code Here

    try
    {
      String addToCommunityAddress = apiRoot + "social/community/remove/" + URLEncoder.encode(communityId,"UTF-8");
      String inviteresult = sendRequest(addToCommunityAddress, null);

      ResponsePojo internal_responsePojo = ResponsePojo.fromApi(inviteresult, ResponsePojo.class);
      ResponseObject internal_ro = internal_responsePojo.getResponse();
      responseObject = shallowCopy(responseObject, internal_ro);

      return responseObject.isSuccess();

    }
View Full Code Here

  public Boolean updateCommunity(String communityId, CommunityPojo communityPojo, ResponseObject responseObject)
  {
    try{
      String addToCommunityAddress = apiRoot + "social/community/update/" + URLEncoder.encode(communityId,"UTF-8");
      String updateResult = sendRequest(addToCommunityAddress, new Gson().toJson(communityPojo));
      ResponsePojo internal_responsePojo = ResponsePojo.fromApi(updateResult, ResponsePojo.class);
      ResponseObject internal_ro = internal_responsePojo.getResponse();
      responseObject = shallowCopy(responseObject, internal_ro);

      return responseObject.isSuccess();

    }
View Full Code Here

    try
    {
      String updateCommunityMemberUrl = apiRoot + "social/community/member/update/type/" + URLEncoder.encode(communityId,"UTF-8") +
      "/" + URLEncoder.encode(personId,"UTF-8") + "/" + URLEncoder.encode(userType,"UTF-8");
      String updateResult = sendRequest(updateCommunityMemberUrl, null);
      ResponsePojo internal_responsePojo = ResponsePojo.fromApi(updateResult, ResponsePojo.class);
      ResponseObject internal_ro = internal_responsePojo.getResponse();
      responseObject = shallowCopy(responseObject, internal_ro);

      return responseObject.isSuccess();
    }
    catch (Exception e)
View Full Code Here

    try
    {
      String updateCommunityMemberUrl = apiRoot + "social/community/member/update/status/" + URLEncoder.encode(communityId,"UTF-8") +
      "/" + URLEncoder.encode(personId,"UTF-8") + "/" + URLEncoder.encode(userStatus,"UTF-8");
      String updateResult = sendRequest(updateCommunityMemberUrl, null);
      ResponsePojo internal_responsePojo = ResponsePojo.fromApi(updateResult, ResponsePojo.class);
      ResponseObject internal_ro = internal_responsePojo.getResponse();
      responseObject = shallowCopy(responseObject, internal_ro);

      return responseObject.isSuccess();
    }
    catch (Exception e)
View Full Code Here

        else
          url.append("?");
        url.append("searchParent=true");
      }
      String deleteResult = sendRequest(url.toString(), null);
      ResponsePojo internal_responsePojo = ResponsePojo.fromApi(deleteResult, ResponsePojo.class);
      ResponseObject internal_ro = internal_responsePojo.getResponse();
      responseObject = shallowCopy(responseObject, internal_ro);
     
      List<SharePojo> shares = null;
     
      shares = ApiManager.mapListFromApi((JsonElement)internal_responsePojo.getData(),
                              SharePojo.listType(), null);     
     
      return shares;
    }
    catch (Exception e) {
View Full Code Here

  public SharePojo getShare(String shareId, ResponseObject responseObject)
  {
    try{
      String getShareAddress = apiRoot + "social/share/get/" + URLEncoder.encode(shareId,"UTF-8");
      String getResult = sendRequest(getShareAddress, null);
      ResponsePojo internal_responsePojo = ResponsePojo.fromApi(getResult, ResponsePojo.class, SharePojo.class, new SharePojoApiMap(null));
      ResponseObject internal_ro = internal_responsePojo.getResponse();
      responseObject = shallowCopy(responseObject, internal_ro);

      return (SharePojo)internal_responsePojo.getData();

    }
    catch (Exception e)
    {
      e.printStackTrace();
View Full Code Here

  {
    try
    {
      String addShareAddress = apiRoot + "social/share/add/json/" + URLEncoder.encode(type, "UTF-8") + "/" + URLEncoder.encode(title,"UTF-8") + "/" + URLEncoder.encode(description,"UTF-8");
      String addResult = sendRequest(addShareAddress, jsonString);
      ResponsePojo internal_responsePojo = ResponsePojo.fromApi(addResult, ResponsePojo.class, SharePojo.class, new SharePojoApiMap(null));
      ResponseObject internal_ro = internal_responsePojo.getResponse();
      responseObject = shallowCopy(responseObject, internal_ro);

      return (SharePojo)internal_responsePojo.getData();

    }
    catch (Exception e)
    {
      e.printStackTrace();
View Full Code Here

  public Boolean updateShareJSON(String shareId, String title, String description, String type, String jsonString , ResponseObject responseObject)
  {
    try{
      String updateShareAddress = apiRoot + "social/share/update/json/" + shareId + "/" + URLEncoder.encode(type,"UTF-8") + "/" + URLEncoder.encode(title,"UTF-8") + "/" + URLEncoder.encode(description,"UTF-8");
      String updateResult = sendRequest(updateShareAddress, jsonString);
      ResponsePojo internal_responsePojo = ResponsePojo.fromApi(updateResult, ResponsePojo.class);
      ResponseObject internal_ro = internal_responsePojo.getResponse();
      responseObject = shallowCopy(responseObject, internal_ro);

      return responseObject.isSuccess();

    }
View Full Code Here

TOP

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

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.