Package org.exoplatform.social.client.api.service

Examples of org.exoplatform.social.client.api.service.ServiceException


    try {
      HttpResponse response = executeGet(targetURL, POLICY.BASIC_AUTH);
      handleError(response);
      return SocialJSONDecodingSupport.parser(RestIdentity.class, response);
    } catch (IOException ioex) {
      throw new ServiceException(IdentityServiceImplV1Alpha1.class, "IOException when reads Json Content.", ioex);
    } catch (ParseException pex) {
      throw new ServiceException(IdentityServiceImplV1Alpha1.class, "ParseException when reads Json Content.", pex);
    }
  }
View Full Code Here


      String content = getContent(response);
      handleError(response);
      Map map = SocialJSONDecodingSupport.parser(content);
      return (String) map.get("id");
    } catch (IOException ioex) {
      throw new ServiceException(IdentityServiceImplV1Alpha1.class, "IOException when reads Json Content.", ioex);
    } catch (ParseException pex) {
      throw new ServiceException(IdentityServiceImplV1Alpha1.class, "ParseException when reads Json Content.", pex);
    }
  }
View Full Code Here

    try {
      HttpResponse response = SocialHttpClientSupport.executeGet(targetURL, POLICY.BASIC_AUTH);
      handleError(response);
      return SocialJSONDecodingSupport.parser(RestIdentity.class, response);
    } catch (IOException ioex) {
      throw new ServiceException(IdentityServiceImplV1Alpha2.class, "IOException when reads Json Content.", ioex);
    } catch (ParseException pex) {
      throw new ServiceException(IdentityServiceImplV1Alpha2.class, "ParseException when reads Json Content.", pex);
    }
  }
View Full Code Here

    try {
      HttpResponse response = SocialHttpClientSupport.executeGet(targetURL, POLICY.BASIC_AUTH);
      handleError(response);
      return SocialJSONDecodingSupport.parser(RestIdentity.class, response);
    } catch (IOException ioex) {
      throw new ServiceException(IdentityServiceImplV1Alpha2.class, "IOException when reads Json Content.", ioex);
    } catch (ParseException pex) {
      throw new ServiceException(IdentityServiceImplV1Alpha2.class, "ParseException when reads Json Content.", pex);
    }
  }
View Full Code Here

    try {
      response = executeGet(requestURL, POLICY.BASIC_AUTH);
      handleError(response);
    } catch (SocialHttpClientException e) {
      throw new ServiceException(e.getMessage(),e);
    }
    return this.getListActivitiesFromResponse(response);
  }
View Full Code Here

    queryParams.remove(QueryParams.MAX_ID_PARAM);
    try {
      response = executeGet(requestURL, POLICY.BASIC_AUTH);
      handleError(response);
    } catch (SocialHttpClientException e) {
      throw new ServiceException(e.getMessage(),e);
    }
    return this.getListActivitiesFromResponse(response);
  }
View Full Code Here

    }
    try {
      response = executeGet(requestURL, POLICY.BASIC_AUTH);
      handleError(response);
    } catch (SocialHttpClientException e) {
      throw new ServiceException(e.getMessage(),e);
    }
    return this.getListActivitiesFromResponse(response);
  }
View Full Code Here

      List<RestActivity> activities = SocialJSONDecodingSupport.JSONArrayObjectParser(RestActivity.class, jsonArray.toJSONString());
      List<RestActivity> copyRestActivities = new ArrayList(activities);
      Collections.copy(copyRestActivities, activities);
      return copyRestActivities;
    } catch (Exception e) {
      throw new ServiceException(ActivityService.class,"invalid response",null);
    }
  }
View Full Code Here

      handleError(response);
      Map versionMap = SocialJSONDecodingSupport.parser(content);
      List supportVersion = (LinkedList) versionMap.get(SUPPORTED_FIELD);
      return (String[]) supportVersion.toArray(new String[0]);
    } catch (Exception pex) {
      throw new ServiceException(VersionServiceImpl.class, "Failed to getSupported versions", pex);
    }
  }
View Full Code Here

    if (posterIdentityString != null && posterIdentityString.length() > 2) {
      try{
        restIdentity = SocialJSONDecodingSupport.parser(RestIdentity.class, posterIdentityString);
      } catch (Exception e) {
        throw new ServiceException(ActivityService.class,e.getMessage(), e);
      }
    } else {
      IdentityService service = ClientServiceFactoryHelper.getClientServiceFactory().createIdentityService();
      restIdentity = (RestIdentity) service.get(this.getIdentityId());
    }
View Full Code Here

TOP

Related Classes of org.exoplatform.social.client.api.service.ServiceException

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.