Package oauth.common

Examples of oauth.common.Calendar


      if (!checkPassed) {
          throw new WebApplicationException(403);
      }
      // end of the check
     
      Calendar calendar = getUserCalendar();
      calendar.getEntry(hour).setEventDescription(description);
  }
View Full Code Here


    }
   
    private void printUserCalendar() {
      WebClient client = createClient("http://localhost:" + port + "/services/social/accounts/calendar",
          "barry@social.com", "1234");
      Calendar calendar = client.get(Calendar.class);
      System.out.println(calendar.toString());
    }
View Full Code Here

        return redirectToFailureHandler(NO_OAUTH_ACCESS_TOKEN);
    }
   
    LOG.info("Completing the reservation request for a user: " + request.getReserveName());
       
    Calendar c = null;
    try {
        String authHeader = manager.createAuthorizationHeader(accessToken, "GET",
                  socialService.getCurrentURI().toString());
          socialService.replaceHeader("Authorization", authHeader);
         
          c = socialService.get(Calendar.class);
    } catch (RuntimeException ex) {
        return redirectToFailureHandler(CALENDAR_ACCESS_PROBLEM);
    }
   
      CalendarEntry entry = c.getEntry(request.getHour());
    if (entry.getEventDescription() == null || entry.getEventDescription().trim().isEmpty()) {
      String address = restaurantService.post(new Form().set("name", request.getReserveName())
                               .set("phone", request.getContactPhone())
                               .set("hour", request.getHour()),
                                String.class);
View Full Code Here

TOP

Related Classes of oauth.common.Calendar

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.