Examples of DocumentServiceException


Examples of com.amazonaws.services.cloudsearchdomain.model.DocumentServiceException

        }
    }

    @Override
    public AmazonServiceException unmarshall(JSONObject json) throws Exception {
        DocumentServiceException e = (DocumentServiceException)super.unmarshall(json);
        e.setErrorCode("DocumentServiceException");

        e.setStatus(parseMember("Status", json));
       
        return e;
    }
View Full Code Here

Examples of org.latexlab.docs.client.gdocs.DocumentServiceException

      MediaByteArraySource source = new MediaByteArraySource(contents.getBytes("UTF8"), "text/plain");
      newDocument.setMediaSource(source);
      entry = svc.insert(new URL(DOCS_SCOPE + "default/private/full"), newDocument);
    } catch (Exception e) {
      e.printStackTrace();
      throw new DocumentServiceException(e.getMessage());
    }
    return getDocumentReference(entry);
  }
View Full Code Here

Examples of org.latexlab.docs.client.gdocs.DocumentServiceException

    svc.getRequestFactory().setHeader("If-Match", etag);
    try {
      svc.delete(new URL(documentUri));
    } catch (Exception e) {
      e.printStackTrace();
      throw new DocumentServiceException(e.getMessage());
    }
    return true;
  }
View Full Code Here

Examples of org.latexlab.docs.client.gdocs.DocumentServiceException

* @throws DocumentServiceException
   */
  private DocsService getDocsService() throws DocumentServiceException {
  AuthenticationToken token = this.store.getUserToken();
  if (token == null) {
    throw new DocumentServiceException("Service requires authentication.");
  }
  PrivateKey key = AuthenticationKey.getAuthSubKey();
    DocsService svc = new DocsService(GDATA_CLIENT_APPLICATION_NAME);
    svc.setConnectTimeout(0);
    svc.setReadTimeout(0);
View Full Code Here

Examples of org.latexlab.docs.client.gdocs.DocumentServiceException

          reader.close();
        }
      }
    }catch (Exception e) {
      e.printStackTrace();
      throw new DocumentServiceException(e.getMessage());
    }
  }
View Full Code Here

Examples of org.latexlab.docs.client.gdocs.DocumentServiceException

   */
  @Override
  public DocumentSignedLocation[] getDocumentContentUrls(String[] documentLinks) throws DocumentServiceException {
  AuthenticationToken token = this.store.getUserToken();
  if (token == null) {
    throw new DocumentServiceException("Service requires authentication.");
  }
  try {
    DocumentSignedLocation[] dsls = new DocumentSignedLocation[documentLinks.length];
    for (int i=0; i<documentLinks.length; i++) {
    String documentUrl = documentLinks[i];
      String documentUrlSig;
    documentUrlSig = AuthSubUtil.formAuthorizationHeader(
            token.getToken(), AuthenticationKey.getAuthSubKey(), new URL(documentUrl), "GET");
        DocumentSignedLocation dsl =
          new DocumentSignedLocation(documentUrl, documentUrlSig);
      dsls[i] = dsl;
    }
    return dsls;
  } catch (Exception e) {
    e.printStackTrace();
      throw new DocumentServiceException(e.getMessage());
  }
  }
View Full Code Here

Examples of org.latexlab.docs.client.gdocs.DocumentServiceException

    String documentUri = DOCS_SCOPE + "default/private/full/document%3A" + documentId;
    try {
      return svc.getEntry(new URL(documentUri), DocumentListEntry.class);
    } catch (Exception e) {
      e.printStackTrace();
      throw new DocumentServiceException(e.getMessage());
    }
  }
View Full Code Here

Examples of org.latexlab.docs.client.gdocs.DocumentServiceException

      for (DocumentListEntry entry : feed.getEntries()) {
        docs.add(getDocumentReference(entry));
      }
    } catch (Exception e) {
      e.printStackTrace();
      throw new DocumentServiceException(e.getMessage());
    }
    Collections.sort(docs, new Comparator<DocumentServiceEntry>() {
    @Override
    public int compare(DocumentServiceEntry arg0, DocumentServiceEntry arg1) {
        if (arg0.getType().equalsIgnoreCase(arg1.getType())) {
View Full Code Here

Examples of org.latexlab.docs.client.gdocs.DocumentServiceException

        UserService userService = UserServiceFactory.getUserService();
        URI url = new URI(this.getThreadLocalRequest().getRequestURL().toString());
        return userService.createLogoutURL("http://" + url.getAuthority() + LOGOUT_RETURN_RELATIVE_PATH);
      } catch (Exception e) {
        e.printStackTrace();
        throw new DocumentServiceException(e.getMessage());
      }
    }
    return "/";
  }
View Full Code Here

Examples of org.latexlab.docs.client.gdocs.DocumentServiceException

      entry.setTitle(new PlainTextConstruct(newTitle));
      entry.update();
      return getDocument(documentId);
    } catch (Exception e) {
      e.printStackTrace();
      throw new DocumentServiceException(e.getMessage());
    }
  }
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.