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

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


    try
    {
      String address = apiRoot + "auth/login/" + username + "/" + URLEncoder.encode(password, "UTF-8");
      String loginResult;
      loginResult = sendRequest(address, null);
      ResponsePojo internal_responsePojo = ResponsePojo.fromApi(loginResult, ResponsePojo.class);
      ResponseObject internal_ro = internal_responsePojo.getResponse();
      responseObject = shallowCopy(responseObject, internal_ro);
      return responseObject.isSuccess();
    }
    catch (Exception e)
    {
View Full Code Here


    cookie = null;
    try {
      String address = apiRoot + "auth/login/admin/" + username + "/" + encryptEncodePassword(password);
      String loginResult;
      loginResult = sendRequest(address, null);
      ResponsePojo internal_responsePojo = ResponsePojo.fromApi(loginResult, 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 address = apiRoot + "auth/logout/";
      String logoutResult;
      logoutResult = sendRequest(address, null);
      ResponsePojo response = ResponsePojo.fromApi(logoutResult, ResponsePojo.class);

      //cookie set to null so that new cookie will be grabbed on next login
      cookie = null;

      return response.getResponse().isSuccess();
    }
    catch (Exception e)
    {
      cookie = null;
      return false;
View Full Code Here

      if (bAdminOnly) {
        address += "/admin";
      }
      String logoutResult;
      logoutResult = sendRequest(address, null);
      ResponsePojo response = ResponsePojo.fromApi(logoutResult, ResponsePojo.class);
      return response.getResponse().isSuccess();
    }
    catch (Exception e)
    {
      return false;
    }
View Full Code Here

    {
      String deactivateAddress = apiRoot + "auth/deactivate?username=" + URLEncoder.encode(username,"UTF-8");
     
      String deactivateResult = sendRequest(deactivateAddress, null);

      ResponsePojo response = ResponsePojo.fromApi(deactivateResult, ResponsePojo.class);
      return response.getResponse().isSuccess();

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

      if (null != parentid)
        createCommunityAddress += "/" + URLEncoder.encode(parentid,"UTF-8");
     
      String communityresult = sendRequest(createCommunityAddress, null);

      ResponsePojo internal_responsePojo = ResponsePojo.fromApi(communityresult, ResponsePojo.class, CommunityPojo.class, new CommunityPojoApiMap());
      ResponseObject internal_ro = internal_responsePojo.getResponse();
      responseObject = shallowCopy(responseObject, internal_ro);
     
      return (CommunityPojo)internal_responsePojo.getData();

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

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

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

      return responseObject.getMessage();

    }
View Full Code Here

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

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

      return responseObject.getMessage();

    }
View Full Code Here

    {
      String addToCommunityAddress = apiRoot + "social/community/member/invite/" + URLEncoder.encode(communityId,"UTF-8") + "/" +
          URLEncoder.encode(personId,"UTF-8") + "/?skipinvitation=true";
      String inviteresult = sendRequest(addToCommunityAddress, null);

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

      return responseObject.getMessage();

    }
View Full Code Here

    try
    {
      String getCommunityAddress = apiRoot + "social/community/get/" + URLEncoder.encode(communityIdentifier,"UTF-8") + "";
      String getResult = sendRequest(getCommunityAddress, null);

      ResponsePojo internal_responsePojo = ResponsePojo.fromApi(getResult, ResponsePojo.class, CommunityPojo.class, new CommunityPojoApiMap());
      ResponseObject internal_ro = internal_responsePojo.getResponse();
      responseObject = shallowCopy(responseObject, internal_ro);

      return (CommunityPojo)internal_responsePojo.getData();

    }
    catch (Exception e)
    {
      e.printStackTrace();
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.