Examples of SpreadsheetService


Examples of com.google.gdata.client.spreadsheet.SpreadsheetService

        }
        return service;
    }
   
    static public SpreadsheetService getSpreadsheetService(String token) {
        SpreadsheetService service = new SpreadsheetService(SERVICE_APP_NAME);
        if (token != null) {
            service.setAuthSubToken(token);
        }
        return service;
    }
View Full Code Here

Examples of com.google.gdata.client.spreadsheet.SpreadsheetService

    static private String uploadSpreadsheet(
            final Project project, final Engine engine, final Properties params,
            String token, String name, List<Exception> exceptions) {
       
        DocsService docsService = GDataExtension.getDocsService(token);
        final SpreadsheetService spreadsheetService = GDataExtension.getSpreadsheetService(token);
       
        try {
            SpreadsheetEntry spreadsheetEntry = new SpreadsheetEntry();
            spreadsheetEntry.setTitle(new PlainTextConstruct(name));
           
            final SpreadsheetEntry spreadsheetEntry2 = docsService.insert(
                new URL("https://docs.google.com/feeds/default/private/full/"), spreadsheetEntry);
           
            int[] size = CustomizableTabularExporterUtilities.countColumnsRows(
                    project, engine, params);
           
            URL worksheetFeedUrl = spreadsheetEntry2.getWorksheetFeedUrl();
            WorksheetEntry worksheetEntry = new WorksheetEntry(size[1], size[0]);
            worksheetEntry.setTitle(new PlainTextConstruct("Uploaded Data"));
           
            final WorksheetEntry worksheetEntry2 =
                spreadsheetService.insert(worksheetFeedUrl, worksheetEntry);
           
            spreadsheetEntry2.getDefaultWorksheet().delete();
           
            new Thread() {
                @Override
                public void run() {
                    spreadsheetService.setProtocolVersion(SpreadsheetService.Versions.V1);
                    try {
                        uploadToCellFeed(
                            project, engine, params,
                            spreadsheetService,
                            spreadsheetEntry2,
View Full Code Here

Examples of com.google.gdata.client.spreadsheet.SpreadsheetService

  private static final Logger logger = Logger.getLogger(GbSpreadsheetService.class.getName());

  public GbSpreadsheetService(String authSubToken) {
    this.authSubToken = authSubToken;
    ss = new SpreadsheetService("dstools");
    ss.setAuthSubToken(this.authSubToken);
    cs = new DocsService("dstools");
    cs.setAuthSubToken(this.authSubToken);
  }
View Full Code Here

Examples of com.google.gdata.client.spreadsheet.SpreadsheetService

   * @throws EPAuthenticationException
   */
  private SpreadsheetService getSsService()
    throws EPAuthenticationException {
    if (this.ssService == null) {
      SpreadsheetService ssService = new SpreadsheetService(APP_IDENTITY);
      try {
        if (ssAuthSubToken != null) {
          ssService.setAuthSubToken(ssAuthSubToken);
        } else if (ssUsername != null && ssPassword != null) {
          ssService.setUserCredentials(ssUsername, ssPassword);
        }
      } catch (com.google.gdata.util.AuthenticationException authEx) {
        throw new EPAuthenticationException("Bad spreadsheets credentials");
      }
      this.ssService = ssService;
View Full Code Here

Examples of com.google.gdata.client.spreadsheet.SpreadsheetService

   * @throws ServiceException
   */
  private void updateSsEventEditUrl(URL ssEditUrl, String calEditUrl,
      String baseEditUrl)
      throws EPAuthenticationException, IOException, ServiceException {
    SpreadsheetService ssService = getSsService();
    ListEntry ssEntry = ssService.getEntry(ssEditUrl, ListEntry.class);
    // remove spaces in the URL
    String calUrlFieldName = fieldMap.getCalendarUrlColumn();
    if (calEditUrl == null &&
        (ssEntry.getCustomElements().getValue(calUrlFieldName) == null ||
         "".equals(ssEntry.getCustomElements().getValue(calUrlFieldName)))){
View Full Code Here

Examples of com.google.gdata.client.spreadsheet.SpreadsheetService

  private List<SpreadsheetEntry> getSsListHelper()
    throws EPAuthenticationException {
    List<SpreadsheetEntry> returnList = null;

    try {
      SpreadsheetService ssService = getSsService();
      SpreadsheetFeed ssFeed = ssService.getFeed(
          new URL(SPREADSHEETS_META_FEED),
          SpreadsheetFeed.class);
      returnList = ssFeed.getEntries();
    } catch (com.google.gdata.util.AuthenticationException authEx) {
      throw new EPAuthenticationException(
View Full Code Here

Examples of com.google.gdata.client.spreadsheet.SpreadsheetService

  private List<WorksheetEntry> getWsListHelper(String wsFeedUrl)
  throws EPAuthenticationException {
    List<WorksheetEntry> returnList = null;

    try {
      SpreadsheetService ssService = getSsService();
      WorksheetFeed wsFeed = ssService.getFeed(
          new URL(wsFeedUrl),
          WorksheetFeed.class);
      returnList = wsFeed.getEntries();
    } catch (com.google.gdata.util.AuthenticationException authEx) {
      throw new EPAuthenticationException(
View Full Code Here

Examples of com.google.gdata.client.spreadsheet.SpreadsheetService

  private List<CellEntry> getColumnListHelper(String cellFeedUrl)
    throws EPAuthenticationException {
    List<CellEntry> returnList = null;

    try {
      SpreadsheetService ssService = getSsService();
      CellFeed cellFeed = ssService.getFeed(
          new URL(cellFeedUrl + "?min-row=1&max-row=1"),
          CellFeed.class);
      returnList = cellFeed.getEntries();
    } catch (com.google.gdata.util.AuthenticationException authEx) {
      throw new
View Full Code Here

Examples of com.google.gdata.client.spreadsheet.SpreadsheetService

  private List<ListEntry> getSsEntryListHelper()
    throws EPAuthenticationException {
    List<ListEntry> returnList = null;

    try {
      SpreadsheetService ssService = getSsService();
      ListFeed listFeed = ssService.getFeed(ssUrl, ListFeed.class);
      returnList = listFeed.getEntries();
    } catch (com.google.gdata.util.AuthenticationException authEx) {
      throw new EPAuthenticationException("SS read access not available");
    } catch (com.google.gdata.util.ServiceException svcex) {
      System.err.println("ServiceException while retrieving " +
View Full Code Here

Examples of com.google.gdata.client.spreadsheet.SpreadsheetService

    if (help || username == null || password == null) {
      usage();
      System.exit(1);
    }

    TableDemo demo = new TableDemo(new SpreadsheetService("Table Demo"),
        System.out);

    demo.run(username, password);
  }
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.