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

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


      JSONObject responseJson = (JSONObject)JSONValue.parse(responseContent);

      if(!(Boolean) responseJson.get("like")){
        return new RestLike(existingRestActivity.getId(), null);
      } else {
        throw new ServiceException(ActivityServiceImplV1Alpha1.class,"invalid response",null);
      }
    } catch (IOException e){
      throw new ServiceException(e.getMessage(),e);
    }
  }
View Full Code Here


        String responseContent = getContent(response);
        handleError(response);
        RestActivity restActivity = SocialJSONDecodingSupport.parser(RestActivity.class, responseContent);
        return restActivity;
      } catch (SocialHttpClientException e) {
        throw new ServiceException(ActivityServiceImplV1Alpha2.class,e.getMessage(), e);
      } catch (ParseException e) {
        throw new ServiceException(ActivityServiceImplV1Alpha2.class,e.getMessage(), e);
      }
  }
View Full Code Here

      String responseContent = getContent(response);
      handleError(response);
      RestActivity restActivity = SocialJSONDecodingSupport.parser(RestActivity.class, responseContent);
      return restActivity;
    } catch (SocialHttpClientException e) {
      throw new ServiceException(ActivityServiceImplV1Alpha2.class,e.getMessage(), e);
    } catch (ParseException e) {
      throw new ServiceException(ActivityServiceImplV1Alpha2.class,e.getMessage(), e);
    }
  }
View Full Code Here

        String responseContent = getContent(response);
        handleError(response);
        RestActivity restActivity = SocialJSONDecodingSupport.parser(RestActivity.class, responseContent);
        return restActivity;
      } catch (SocialHttpClientException e) {
        throw new ServiceException(ActivityServiceImplV1Alpha2.class,e.getMessage(), e);
      } catch (ParseException e) {
        throw new ServiceException(ActivityServiceImplV1Alpha2.class,e.getMessage(), e);
      }
  }
View Full Code Here

      String responseContent = getContent(response);
      handleError(response);
      RestActivity restActivity = SocialJSONDecodingSupport.parser(RestActivity.class, responseContent);
      return restActivity;
    } catch (SocialHttpClientException e) {
      throw new ServiceException(ActivityServiceImplV1Alpha2.class, e.getMessage(), e);
    } catch (ParseException e) {
      throw new ServiceException(ActivityServiceImplV1Alpha2.class, e.getMessage(), e);
    }
  }
View Full Code Here

        String responseContent = getContent(response);
        handleError(response);
        RestComment restComment = SocialJSONDecodingSupport.parser(RestComment.class, responseContent);
        return restComment;
      } catch (SocialHttpClientException e) {
        throw new ServiceException(ActivityServiceImplV1Alpha2.class, e.getMessage(), e);
      } catch (ParseException e) {
        throw new ServiceException(ActivityServiceImplV1Alpha2.class, e.getMessage(), e);
      }
  }
View Full Code Here

      String responseContent = getContent(response);
      handleError(response);
      RestComment restComment = SocialJSONDecodingSupport.parser(RestComment.class, responseContent);
      return restComment;
    } catch (SocialHttpClientException e) {
      throw new ServiceException(ActivityServiceImplV1Alpha2.class, e.getMessage(), e);
    } catch (ParseException e) {
      throw new ServiceException(ActivityServiceImplV1Alpha2.class, e.getMessage(), e);
    }
  }
View Full Code Here

      String responseContent = getContent(response);
      JSONObject responseJson = (JSONObject)JSONValue.parse(responseContent);
      if((Boolean) responseJson.get("liked")){
        return new RestLike(existingRestActivity.getId(), null);
      } else {
        throw new ServiceException(ActivityServiceImplV1Alpha2.class, "invalid response", null);
      }
    } catch (SocialHttpClientException e) {
      throw new ServiceException(ActivityServiceImplV1Alpha2.class, "invalid response", null);
    }
  }
View Full Code Here

      String responseContent = getContent(response);
      JSONObject responseJson = (JSONObject)JSONValue.parse(responseContent);
      if(!(Boolean) responseJson.get("liked")){
        return new RestLike(existingRestActivity.getId(), null);
      } else {
        throw new ServiceException(ActivityServiceImplV1Alpha2.class, "invalid response", null);
      }
    } catch (SocialHttpClientException e){
      throw new ServiceException(ActivityServiceImplV1Alpha2.class, e.getMessage(), e);
    }
  }
View Full Code Here

      handleError(response);
      String responseContent = getContent(response);
      RestActivity restActivity = SocialJSONDecodingSupport.parser(RestActivity.class, responseContent);
      return restActivity;
    } catch (SocialHttpClientException e) {
      throw new ServiceException(ActivityServiceImplV1Alpha2.class, e.getMessage(), e);
    } catch (ParseException e) {
      throw new ServiceException(ActivityServiceImplV1Alpha2.class, e.getMessage(), e);
    }
  }
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.