@GET
  @Produces(MediaType.APPLICATION_JSON)
  public Response findAllByUser(@Context SecurityContext sc, @Context HttpServletRequest req) {
    User user = userBean.getUserByEmail(sc.getUserPrincipal().getName());
    List<Activity> activityDetails = activityBean.getAllActivityByUser(user);
    GenericEntity<List<Activity>> projectActivities =
        new GenericEntity<List<Activity>>(activityDetails) {};

    return noCacheResponse
        .getNoCacheResponseBuilder(Response.Status.OK)
        .entity(projectActivities)
        .build();
  }
  @GET
  @Path("/query")
  @Produces(MediaType.APPLICATION_JSON)
  public Response findPaginatedByUser(
      @QueryParam("from") int from,
      @QueryParam("to") int to,
      @Context SecurityContext sc,
      @Context HttpServletRequest req) {
    User user = userBean.getUserByEmail(sc.getUserPrincipal().getName());
    List<Activity> activityDetails = activityBean.getPaginatedActivityByUser(from, to, user);
    GenericEntity<List<Activity>> projectActivities =
        new GenericEntity<List<Activity>>(activityDetails) {};

    return noCacheResponse
        .getNoCacheResponseBuilder(Response.Status.OK)
        .entity(projectActivities)
        .build();
  }