Examples of GoogleService


Examples of com.google.gdata.client.GoogleService

        m_applicationName = settings.applicationName;
        m_subApplicationName = settings.subApplicationName;
        m_pollInterval = settings.pollInterval;
        m_distributer = distributer;
       
        service = new GoogleService("fusiontables", "h-store.ClientStatsFusionLoader");
        try {
            service.setUserCredentials(settings.databaseUser, settings.databasePass, ClientLoginAccountType.GOOGLE);
        } catch (Exception e) {
            LOG.debug("Could not connect to Fusion Tables site");
            String msg = "Failed to connect to Google FusionTables reporting server with message:\n";
View Full Code Here

Examples of com.google.gdata.client.GoogleService

       
        //System.out.println("[Debug Info] binding.getServiceType()" + serviceType);
        //System.out.println("[Debug Info] binding.getName()" +usernane);
        //System.out.println("[Debug Info] binding.getPassword()" + password);   
       
        googleService = new GoogleService(serviceType, "");
        if(binding.getUsername().equals("admin") == false && binding.getPassword().equals("admin")==false){
            googleService.setUserCredentials(binding.getUsername(),binding.getPassword());    
        }

        // Create an HTTP client
View Full Code Here

Examples of com.google.gdata.client.GoogleService

     
      // Capture the version used to process the request
      String versionHeader =
        httpConn.getHeaderField(GDataProtocol.Header.VERSION);
      if (versionHeader != null) {
        GoogleService service = activeService.get();
        if (service != null) {
          responseVersion = new Version(service.getClass(), versionHeader);
        }
       
      }
    } finally {
      activeService.set(null);
View Full Code Here

Examples of com.google.gdata.client.GoogleService

      Map<String, List<String>> cookieHeaders =
        new HashMap<String, List<String>>();

      // Only service requests initiated by GData services with cookie
      // handling enabled.
      GoogleService service = activeService.get();
      if (service != null && service.handlesCookies()) {

        // Get the list of matching cookies and accumulate a buffer
        // containing the cookie name/value pairs.
        Set<GoogleCookie> cookies = service.getCookies();
        StringBuilder cookieBuf = new StringBuilder();
        for (GoogleCookie cookie : cookies) {
          if (cookie.matches(uri)) {
            if (cookieBuf.length() > 0) {
              cookieBuf.append("; ");
View Full Code Here

Examples of com.google.gdata.client.GoogleService

                    Map<String, List<String>> responseHeaders)
        throws IOException {

      // Only service requests initiated by GData services with cookie
      // handling enabled.
      GoogleService service = activeService.get();
      if (service != null && service.handlesCookies()) {
        List<String> setCookieList = responseHeaders.get("Set-Cookie");
        if (setCookieList != null && setCookieList.size() > 0) {
          for (String cookieValue : setCookieList) {
            GoogleCookie cookie = new GoogleCookie(uri, cookieValue);
            service.addCookie(cookie);
            logger.fine("Adding cookie:" + cookie);
          }
        }
      } else {
        if (nextHandler != null) {
View Full Code Here

Examples of com.google.gdata.client.GoogleService

    // Initialize the variables needed to make the request
    URL feedUrl = new URL(variables.getFeedUrl());
    System.out.println("Sending request to " + feedUrl.toString());
    System.out.println();
    GoogleService googleService =
        new GoogleService(variables.getGoogleServiceName(), "oauth-sample-app");

    // Set the OAuth credentials which were obtained from the step above.
    googleService.setOAuthCredentials(oauthParameters, signer);

    // Make the request to Google
    BaseFeed resultFeed = googleService.getFeed(feedUrl, Feed.class);
    System.out.println("Response Data:");
    System.out.println("=====================================================");
    System.out.println("| TITLE: " + resultFeed.getTitle().getPlainText());
    if (resultFeed.getEntries().size() == 0) {
      System.out.println("|\tNo entries found.");
View Full Code Here

Examples of com.google.gdata.client.GoogleService

        + variables.getVariable("xoauth_requestor_id");
    URL feedUrl = new URL(feedUrlString);

    System.out.println("Sending request to " + feedUrl.toString());
    System.out.println();
    GoogleService googleService =
        new GoogleService(variables.getGoogleServiceName(),
            "2-legged-oauth-sample-app");

    // Set the OAuth credentials which were obtained from the steps above.
    googleService.setOAuthCredentials(oauthParameters, signer);

    // Make the request to Google
    BaseFeed resultFeed = googleService.getFeed(feedUrl, Feed.class);
    System.out.println("Response Data:");
    System.out.println("=====================================================");
    System.out.println("| TITLE: " + resultFeed.getTitle().getPlainText());
    if (resultFeed.getEntries().size() == 0) {
      System.out.println("|\tNo entries found.");
View Full Code Here

Examples of com.google.gdata.client.GoogleService

    service = new DocsService(applicationName);

    // Creating a spreadsheets service is necessary for downloading
    // spreadsheets
    spreadsheetsService = new GoogleService(SPREADSHEETS_SERVICE_NAME, applicationName);

    this.applicationName = applicationName;
    this.authProtocol = authProtocol;
    this.authHost = authHost;
    this.protocol = protocol;
View Full Code Here

Examples of com.google.gdata.client.GoogleService

      Map<String, List<String>> cookieHeaders =
        new HashMap<String, List<String>>();

      // Only service requests initiated by GData services with cookie
      // handling enabled.
      GoogleService service = activeService.get();
      if (service != null && service.handlesCookies()) {

        // Get the list of matching cookies and accumulate a buffer
        // containing the cookie name/value pairs.
        Set<GoogleCookie> cookies = service.getCookies();
        StringBuilder cookieBuf = new StringBuilder();
        for (GoogleCookie cookie : cookies) {
          if (cookie.matches(uri)) {
            if (cookieBuf.length() > 0) {
              cookieBuf.append("; ");
View Full Code Here

Examples of com.google.gdata.client.GoogleService

                    Map<String, List<String>> responseHeaders)
        throws IOException {

      // Only service requests initiated by GData services with cookie
      // handling enabled.
      GoogleService service = activeService.get();
      if (service != null && service.handlesCookies()) {
        List<String> setCookieList = responseHeaders.get("Set-Cookie");
        if (setCookieList != null && setCookieList.size() > 0) {
          for (String cookieValue : setCookieList) {
            GoogleCookie cookie = new GoogleCookie(uri, cookieValue);
            service.addCookie(cookie);
            logger.fine("Adding cookie:" + cookie);
          }
        }
      } else {
        if (nextHandler != null) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.